feat(web): add project sidebar accents - #7972
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Reviewed the sidebar project-accent styling for consistency with the existing row surface model and CSS ownership rules. Three findings, all in the new accent styling: the accent rules are scoped to an ancestor attribute that does not exist in the mobile sidebar, the hover rule is not pointer-gated like the row's Tailwind hover: utilities, and the accent state attribute collapses route-active and multi-select into one surface.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
Project icons are easy to miss in a busy sidebar. Checked-in accent colors keep each project's thread rows identifiable across idle, hover, and selected states.
…select The accent rules required a [data-app-sidebar] ancestor that the mobile sheet sidebar never renders, the bare :hover left sticky tints on touch pointers, and routed-active plus multi-selected rows collapsed into one surface. Drop the ancestor scope, gate :hover behind (hover: hover), and emit distinct active and selected states mixed over their own row tokens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
34f80a0 to
f2082f3
Compare


What changed
Projects can define a checked-in sidebar accent in
t3.json.idle,hover, andselectedcolors.This applies to the web sidebar and desktop wrapper. The separate mobile thread list is unchanged.
Why
Project icons are easy to miss when the sidebar contains threads from several repositories. A persistent, low-contrast tint makes project groups faster to identify while keeping the existing row layout and interaction states.
UI changes
The T3 Code repository uses
#1688f0in simple mode for the after view.Verification
git diff --checkpass.Checklist
Note
Medium Risk
Touches asset URL issuance and project-file schema, so favicon URL failures now include accent-resolution errors. UI-only tinting otherwise; no auth or data-store changes.
Overview
Projects can set an optional
accentColorint3.json(one six-digit hex, or exact idle/hover/selected colors) so web sidebar thread rows stay tinted by project.The server reads the accent through
ProjectFaviconResolver.resolveAccentand returns it on the existing project-favicon asset URL, so rows reuse that fetch. Sidebar rows apply CSS variables anddata-project-accentstates; a single color generates restrained tints, while a palette uses the exact colors.Docs now cover project appearance. Invalid or missing project files yield no accent. Favicon URL issuance fails if accent resolution throws, before path resolution.
Reviewed by Cursor Bugbot for commit f2082f3. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add project sidebar accent colors from
t3.jsonaccentColorfield int3ProjectFile.tsaccepting either a single six-digit hex color or a palette ofidle,hover, andselectedcolorsProjectFaviconResolver.resolveAccentand includes it inAssetCreateUrlResult; resolution failures now raiseAssetProjectFaviconResolutionErrordata-project-accentattributes and CSS variables, reusing the favicon asset state to avoid a duplicate fetchprojectAccentRowStateandprojectAccentRowStylehelpers and documents the feature under "Customize project appearance"issueAssetUrlnow fails withAssetProjectFaviconResolutionErrorwhenresolveAccentthrows for project-favicon assets, before path resolution occursMacroscope summarized f2082f3.