fix: folder palette single-source, spec sync, new-chat row labels - #1681
Conversation
Design Review (Fable 5) — ✅ PASSAdvisory design-level review of Design-Verdict: PASS Genuine drift risk closed at its root (one catalog, one fail-closed CI pin); every hunk is backed and proportionate. [DESIGN-REVIEWED] e346668 |
UX Review (Fable 5) — ✅ PASSAdvisory UX-level review of UX-Verdict: PASS Strictly clarifying change: swatches gain real color names, rows name their folder — screenshots confirm the rendered result matches the claims. Suggestions
[UX-REVIEWED] e346668 |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
2b7b4ef to
e82e651
Compare
e82e651 to
74778ea
Compare
Follow-up to the sidebar folder redesign (#1211). Palette: the Artifacts page imports the shared FOLDER_COLOR_PALETTE (12 hues) from folderColorCatalog.tsx instead of carrying a private 8-hex list, so both folder systems offer the same colors and the swatch aria labels reuse the localized color names. A backend test pins _FOLDER_COLOR_PALETTE to the frontend catalog by parsing the hexes out of the tsx, turning palette drift into a CI failure rather than a swatch the backend rejects at runtime. The allowlist comment now points at the real catalog file and names the pinning test. Spec: learn-cron-dashboard.md documents the shipped folder API: color accepted on create and PATCH (allowlisted, machine-readable color_invalid code, empty or null clears), no icon field on the folder model, and no LLM generation anywhere in the chat-folder lifecycle (the artifact-library emoji generator is separate). Labels: the empty-folder new-chat rows (list and board) show the interpolated "New chat in {{name}}" as their visible label instead of the generic string, and the folder-header new-chat buttons use it for their tooltips and aria labels, replacing one hardcoded English template literal on the board-view button.
74778ea to
e346668
Compare
…rodotdev#1681) Follow-up to the sidebar folder redesign (kirodotdev#1211). Palette: the Artifacts page imports the shared FOLDER_COLOR_PALETTE (12 hues) from folderColorCatalog.tsx instead of carrying a private 8-hex list, so both folder systems offer the same colors and the swatch aria labels reuse the localized color names. A backend test pins _FOLDER_COLOR_PALETTE to the frontend catalog by parsing the hexes out of the tsx, turning palette drift into a CI failure rather than a swatch the backend rejects at runtime. The allowlist comment now points at the real catalog file and names the pinning test. Spec: learn-cron-dashboard.md documents the shipped folder API: color accepted on create and PATCH (allowlisted, machine-readable color_invalid code, empty or null clears), no icon field on the folder model, and no LLM generation anywhere in the chat-folder lifecycle (the artifact-library emoji generator is separate). Labels: the empty-folder new-chat rows (list and board) show the interpolated "New chat in {{name}}" as their visible label instead of the generic string, and the folder-header new-chat buttons use it for their tooltips and aria labels, replacing one hardcoded English template literal on the board-view button.
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
Problem
Follow-up to the sidebar folder redesign (#1211). Three loose ends from that change:
docs/system-specs/modules/learn-cron-dashboard.md) still documented the removed icon contract: background LLM emoji-icon generation on create andiconon PATCH. An agent reading the spec would code against a removed API.Why it matters
Palette drift is a silent runtime failure (UI offers, backend 400s). The stale spec violates the repo's same-commit doc rule and misleads the next contributor. The generic row label wastes an already-localized, more informative string.
Fix (symptoms -> root cause -> change)
Palette single-sourcing:
ArtifactsPage.tsxdrops its privateFOLDER_COLORS(an exact subset of the 12) and imports the sharedFOLDER_COLOR_PALETTEfromfolderColorCatalog.tsx, so artifact folders gain the four missing hues (orange, lime, teal, indigo) and the swatch aria labels become the localized color names instead of a hardcodedColor #hexliteral. Existing artifact-folder colors are unaffected (the artifacts backend shape-validates#rrggbbonly, and the old 8 remain in the 12). The backend allowlist stays a separate Python constant by necessity, buttest_folder_color_palette_matches_frontend_catalognow parses the hexes out of the tsx and asserts set-equality, so drift fails CI. The allowlist comment points at the real catalog file and names the test.Spec sync: the Chat Folders section now documents the shipped contract:
coloron create and PATCH (allowlisted, 400 with machine-readablecode: "color_invalid", empty or null clears), noiconfield on the folder model, stale stored icon values ignored, and no LLM generation in the chat-folder lifecycle (the artifact-library emoji generator is a separate, unaffected system).Row labels: both empty-folder new-chat rows (list and board views) render
New chat in {{name}}as their visible label, and the folder-header new-chat buttons use the same interpolated string for tooltip and aria, replacing one hardcoded English template literal on the board-view button.Tests
test_folder_color_palette_matches_frontend_catalog(backend): pins the backend allowlist to the frontend catalog; either side drifting breaks CI.i18n:check,docs-lint.Manual verification
N/A: unit and gate coverage sufficient. The changes are a constant import swap, prose, and i18n key substitutions on existing rows; no new visual states beyond four additional swatches rendering identically to the existing eight.
Screenshots
Before/after for both user-visible surfaces (rendered from the shipped components in a capture harness):
Artifacts folder color swatches: 8 hues with hex-only labels, now the shared 12-hue catalog with localized color-name tooltips.
Empty-folder new-chat row: generic label, now the folder's name interpolated.
The spec and pinning-test changes have no visual surface.