Repository navigation
feat(theme-center): style limits, phase label and alias caps, bullet/tick icon picker - #215
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f8904a93c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
3f8904a to
e5a271c
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…ases, pick bullet and tick icons One zod-free constant per limit (@dirework/api/style-limits, chat-text, chat-commands) feeds both the save schemas and the editors: every Theme Center length has a px range (plus %/vw/vh where it makes sense, never negative), ring width/gap and scroll take integer ranges, phase labels hold 16 graphemes / 48 bytes, aliases 25 characters, and a reply template repeats one placeholder at most 4 times. Fields show the range inline, arrow keys stop at its ends, counters appear from 80%, and Save blocks. The free-text bullet and tick glyphs become a lucide icon picker; the id is stored in the existing columns. Nothing is migrated: the build helpers clamp old values on read (old glyphs map to their icon), so a whole-group save of a loaded theme always passes. The Starting label default becomes Pack Gathering (the frozen 18-character column default upgrades on read).
…s range lengthIssue returned "range" at the first out-of-range part, so a stored shorthand like "80px 10%" (accepted by the old allowlist) reached the part-by-part clamp with a unit the field no longer takes, and the read threw. Format and unit are now checked for every part first; a value with any unreadable part falls back to the default, and every clamped read passes the save schema (shorthand, mixed-unit, negative and 3/4-part cases).
|
@codex review |
53b2666 to
0c3c4f4
Compare
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Builds on #214 (branched from
fix/overlay-task-wrap; until #214 merges this diff includes its commits — will rebase onto main once it lands).What
@dirework/api/style-limits, plusMAX_PLACEHOLDER_REPEATSinchat-textandALIAS_MAX_LENGTHinchat-commands), read by the save schemas (boundedLengthSchema,phaseLabelSchema,overlayIconSchema,chatMessageSchema,normalizeAliases) and by the editors.TIMER_STYLE_FIELDS/TASK_STYLE_FIELDS(negatives rejected; rem/em = 16px;%/vw/vhonly where they make sense, e.g. timer size 120–1200px / 10–100% / 10–100vw/vh). Ring width & gap 0–40, scroll speed 1–200, loop gap 0–300. Inline error names the range, ArrowUp/Down stop at the bounds, Save is blocked (existingupdateStylesInput.safeParse).Intl.Segmenter) and 48 bytes; counter from 13. The "Starting" default "Gathering the Pack" (18) becomes "Pack Gathering": the column default is frozen (PHASE_LABEL_COLUMN_DEFAULTS) and upgrades on read, same as bot replies.!),too-longissue, inputs cap at 26, counter.components/overlay-icon.tsx; dot is a hand-drawn disc). Stored in the existing*_charcolumns, no migration. Config keys renamedcheckbox.tickChar→tickIcon,bullet.char→icon(the old key from a web worker that is mid-deploy is stripped, not rejected). Picker is a radiogroup with roving tabindex vianextGridIndex.clampTimerStyles/clampTaskStyles(nearest bound, or the default when a unit is no longer accepted),toOverlayIcon(✔ → check, • → dot, else default),clampPhaseLabel,limitPlaceholderRepeats, and aliases re-run throughnormalizeAliasesinbuildBotConfig(which also canonicalizes legacy!-prefixed records).Cost
No new requests, polls, writes, or bindings. The overlay poll's read path does a few string checks more. Bundle budget: api 541 KiB, web 2112 KiB gzip (budget 2560).
Tests
style-limits.test.ts,clamp-on-read.test.ts(clamped reads passupdateStylesInput/updateBotSettingsInput), schema cases invalidation-primitives, alias length cases; db defaults test for the frozen phase labels.stepLengthbounds,lengthFieldErroragrees with the schema,phaseLabelBudgetagrees with the schema.42-style-limits(icon picker changes the overlay bullet; out-of-range length shows its range and blocks Save; long phase label is counted and blocks Save). Ran 00, 40, 42, 80, 90 locally on ports 3980/3981: all pass.Not done