Skip to content

feat(web): focus ring, state colours, full-width code pages and signed-out Appearance - #360

Merged
PastaPastaPasta merged 6 commits into
masterfrom
feat/e8-visual-p0
Oct 4, 2026
Merged

PastaPastaPasta merged 6 commits into
masterfrom
feat/e8-visual-p0

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

What

The P0 visual fixes from the theming review (E8, quick win 6, and the Appearance half of quick win 14):

  • Focus ring. The light ring moves from forge-400 (2.17:1 against the page) to forge-700, via a new --focus token (forge-700 light, forge-400 dark). The contrast test now checks the ring against every surface in both themes at 3:1 (WCAG 1.4.11).
  • State colours. Issue and pull request states get their own --state-* tokens instead of the trust colours: open green, merged and completed violet, closed PR red, draft and not planned grey. One table (lib/design/state.ts) feeds the PR and issue badges, both lists, the timeline, linked PRs and the close button. The fills are tested behind white text (4.5:1+) and the text tokens on every surface, in both themes. A draft PR in the linked-PRs list now gets the draft icon.
  • Code gets the width. Blob, blame and commit pages drop the 296 px rail and lead with the Verification card collapsed to one line (the pattern compare already uses). The commit diff goes from ~910 px to the full 1232 px at 1280.
  • Appearance, signed out. Settings has a new Appearance section (System / Light / Dark radios, plus the three diff choices) that renders for signed-out readers too. The merge identity stays behind sign-in, now titled "Merge commits".

Why

The light focus ring failed WCAG non-text contrast; state badges spent the "verified" green, the identity blue and the primary-button orange on "open", "merged" and "closed"; code pages carried an empty rail; and diff colours (including the colour-blind palette) were only reachable after sign-in although reading needs no identity.

The new colours are CSS variables exposed to Tailwind as rgb(var(--x) / <alpha-value>), so each class serves both themes with no dark: twin. That is the shape the semantic-token work will extend.

How tested

  • tsc, eslint --max-warnings 0, full vitest (5,676 tests). Under load, 4 crypto-heavy auth tests timed out; re-run alone, they pass (40/40).
  • New tests: the theme-token contrast checks in lib/design/contrast.test.ts (focus ring, state text, state fills) and components/appearance-panel.test.tsx, which covers the radios, the stored diff choices and rendering before the sign-in check.
  • Static export against sakura, screenshotted at 1280 and 390 px in both themes. Evidence: dash-forge-qa/evidence/p0/e8/before/ (live site) and dash-forge-qa/evidence/p0/e8/after-pr1/.

Limits

  • The "Code ▾" clone popover the review suggested for code pages is not added. Like GitHub's file view, blob and commit pages have no clone box; the repo home still has it.
  • The header theme button is still a 3-state cycle; the popover belongs to the theme-token epic.
  • Diffs (word breaks, syntax and intra-line highlighting, dark tints, collapsed commit bodies) follow in a separate PR.

🤖 Generated with Claude Code

…d-out Appearance

The light focus ring moves to forge-700 (a --focus token, 3:1 or more on every surface, now in the contrast test). Issue and pull request states get their own --state-* tokens (open green, merged and completed violet, closed red, draft and not planned grey) instead of the trust colours. Blob, blame and commit pages drop the rail and lead with the collapsed Verification card, so code gets the full width. Settings shows a new Appearance section (theme and diff choices) signed out too; the merge identity stays under Merge commits.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dcc2011b-c658-47a9-b69a-886a87f6873e
📥 Commits

Reviewing files that changed from the base of the PR and between 0725af0 and 9c8a6d4.

📒 Files selected for processing (27)
  • docs/design/style-guide.md
  • forge-web/app/globals.css
  • forge-web/app/repo/blame/client.tsx
  • forge-web/app/repo/blob/client.tsx
  • forge-web/app/repo/commit/client.tsx
  • forge-web/app/settings/page.tsx
  • forge-web/components/appearance-panel.test.tsx
  • forge-web/components/appearance-panel.tsx
  • forge-web/components/display-prefs-panel.tsx
  • forge-web/components/repo/branch-commit-panel.tsx
  • forge-web/components/repo/close-issue-button.tsx
  • forge-web/components/repo/compare-content.tsx
  • forge-web/components/repo/issue-content.tsx
  • forge-web/components/repo/issues-content.tsx
  • forge-web/components/repo/linked-pulls.tsx
  • forge-web/components/repo/pull-content.tsx
  • forge-web/components/repo/pull-state.tsx
  • forge-web/components/repo/pulls-content.tsx
  • forge-web/components/repo/repo-scaffold.tsx
  • forge-web/components/repo/timeline.tsx
  • forge-web/e2e/page-budget.spec.ts
  • forge-web/e2e/review-round-trip-web.spec.ts
  • forge-web/e2e/review-suggestions.spec.ts
  • forge-web/e2e/v2-pulls.spec.ts
  • forge-web/lib/design/contrast.test.ts
  • forge-web/lib/design/state.ts
  • forge-web/tailwind.config.js
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 5 commits October 4, 2026 12:19
…nd settings

The contrast test now resolves hyphenated theme fills (bg-state-*) behind white text instead of skipping them. The PR close/reopen toggle and the duplicate and not-planned icons use the state tokens. A legacy close event, which cannot say whether it closed an issue or a PR, gets a neutral icon. The commit page's Verification card attests the commit shown, compare shares the same card component, and one table gives a PR's state label and icon. Settings calls the browser commit identity what it is: it applies to every browser commit, not just merges.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit e5ba904 into master Oct 4, 2026
13 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the feat/e8-visual-p0 branch October 4, 2026 18:33
@PastaPastaPasta
PastaPastaPasta restored the feat/e8-visual-p0 branch October 4, 2026 18:33
@PastaPastaPasta
PastaPastaPasta deleted the feat/e8-visual-p0 branch October 4, 2026 18:34
@PastaPastaPasta

Copy link
Copy Markdown
Owner Author

Review record: a high-effort code review of this PR found ten items, all fixed in e88665e before merge.

  • The contrast test's white-text scan skipped hyphenated theme fills (bg-state-*); it now resolves and checks them, with a regression case.
  • The PR close/reopen toggle, the duplicate and not-planned icons now use the state tokens.
  • A legacy close event (issue or PR unknown) gets a neutral icon instead of "completed" violet.
  • The commit page's Verification card attests the commit shown (refParam={oid}), not the default branch; compare shares the same card component.
  • One table gives a PR's state label, icon and colour (components/repo/pull-state.tsx).
  • Settings → "Commit identity" (it applies to every browser commit, not just merges).
  • pb-3 retitled for what it checks now; the style guide states which code pages lead with the card; a dead allow-list removed.

🤖 Posted autonomously by Claude on behalf of pasta.

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.

1 participant