Skip to content

fix: folder palette single-source, spec sync, new-chat row labels - #1681

Merged
CrysisDeu merged 1 commit into
mainfrom
fix/sidebar-redundant-rows
Aug 6, 2026
Merged

fix: folder palette single-source, spec sync, new-chat row labels#1681
CrysisDeu merged 1 commit into
mainfrom
fix/sidebar-redundant-rows

Conversation

@krishdhasmana

@krishdhasmana krishdhasmana commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Problem

Follow-up to the sidebar folder redesign (#1211). Three loose ends from that change:

  • The folder color palette existed in three places with only comments holding them together: the backend allowlist (12 hexes), the frontend catalog (12), and a private 8-hex list on the Artifacts page. Nothing enforced agreement, and the backend's KEEP-IN-SYNC comment pointed at a file that no longer exists. Drift would mean the modal offers a swatch the backend rejects with a 400.
  • The folder API spec (docs/system-specs/modules/learn-cron-dashboard.md) still documented the removed icon contract: background LLM emoji-icon generation on create and icon on PATCH. An agent reading the spec would code against a removed API.
  • The empty-folder "new chat" rows showed the generic "New chat in folder" as their visible label while the stronger interpolated "New chat in {{name}}" string, already localized in every catalog, was only used for aria.

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.tsx drops its private FOLDER_COLORS (an exact subset of the 12) and imports the shared FOLDER_COLOR_PALETTE from folderColorCatalog.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 hardcoded Color #hex literal. Existing artifact-folder colors are unaffected (the artifacts backend shape-validates #rrggbb only, and the old 8 remain in the 12). The backend allowlist stays a separate Python constant by necessity, but test_folder_color_palette_matches_frontend_catalog now 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: color on create and PATCH (allowlisted, 400 with machine-readable code: "color_invalid", empty or null clears), no icon field 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.
  • Existing suites cover the touched surfaces: 69 targeted backend folder/color tests, 501 frontend tests across sidebar/folder/artifact suites, strict 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.

Artifacts folder swatches before and after

Empty-folder new-chat row: generic label, now the folder's name interpolated.

Empty-folder new-chat row before and after

The spec and pinning-test changes have no visual surface.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Advisory design-level review of e346668d70876ad486f63e01619f431df75b8892 — updated in place on each push; does not block merge.

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

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

Advisory UX-level review of e346668d70876ad486f63e01619f431df75b8892 — updated in place on each push; does not block merge.

UX-Verdict: PASS

Strictly clarifying change: swatches gain real color names, rows name their folder — screenshots confirm the rendered result matches the claims.

Suggestions

  • In ChatSidebar.tsx, the empty-folder row's <span>{i18nT('pages.chatSidebar.new_chat_in_name', …)}</span> has no truncate while every sibling folder-name span does — a long folder name now wraps the row to multiple lines; add truncate min-w-0 (the title already carries the full string).

[UX-REVIEWED] e346668

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed e346668d70876ad486f63e01619f431df75b8892 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] e346668

Verdict parsed from the review's SHA-scoped output markers for commit e346668d70876ad486f63e01619f431df75b8892.

False positive or not applicable? A repository writer can comment:
/ai-review override fable e346668d70876ad486f63e01619f431df75b8892: <one-sentence reason>

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of e346668d70876ad486f63e01619f431df75b8892 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e346668

False positive or not applicable? A repository writer can comment:
/ai-review override gpt e346668d70876ad486f63e01619f431df75b8892: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Aug 5, 2026
@krishdhasmana
krishdhasmana force-pushed the fix/sidebar-redundant-rows branch from 2b7b4ef to e82e651 Compare August 5, 2026 22:13
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Aug 5, 2026
@krishdhasmana
krishdhasmana marked this pull request as ready for review August 5, 2026 22:39
@krishdhasmana
krishdhasmana requested a review from a team August 5, 2026 22:39
@krishdhasmana
krishdhasmana requested a review from a team as a code owner August 5, 2026 22:39
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Aug 5, 2026
@krishdhasmana
krishdhasmana force-pushed the fix/sidebar-redundant-rows branch from e82e651 to 74778ea Compare August 5, 2026 23:08
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Aug 5, 2026
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.
@krishdhasmana
krishdhasmana force-pushed the fix/sidebar-redundant-rows branch from 74778ea to e346668 Compare August 5, 2026 23:17
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Aug 5, 2026
@CrysisDeu
CrysisDeu merged commit 3dfb1e2 into main Aug 6, 2026
47 checks passed
@CrysisDeu
CrysisDeu deleted the fix/sidebar-redundant-rows branch August 6, 2026 00:59
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Aug 6, 2026
encomjp pushed a commit to encomjp/kirocrew-customapi that referenced this pull request Aug 22, 2026
…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.
@bolichen97

Copy link
Copy Markdown
Collaborator

Open PR relationship audit

This 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

  • PR #7353 is OVERLAPPING relative to this PR. The goals differ or the implementations can complement each other; this is not a duplicate claim. Recommended action for PR #7353: MERGE_DISCUSSION. Reinforces the PR #1211 finding: the no-icon position is documented as an invariant by a second merged change, so accepting PR #7353 is an explicit spec reversal that the maintainer should sign off on rather than a documentation catch-up. Files: docs/system-specs/modules/learn-cron-dashboard.md.

No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants