8000 Move the Rail to colour names, with focus rings by kiran-brahma · Pull Request #80 · kiran-brahma/writing-tool · GitHub
[go: up one dir, main page]

Skip to content

Move the Rail to colour names, with focus rings - #80

Merged
kiran-brahma merged 3 commits into
v1.3from
v1.3-60
Sep 26, 2026
Merged

kiran-brahma merged 3 commits into
v1.3from
v1.3-60

Conversation

@kiran-brahma
@kiran-brahma kiran-brahma commented Sep 26, 2026 •
Copy link
Copy Markdown
Owner

Part of #57. Closes #60.

Batch 2 of the colour refactor. Every palette class in the Rail's files (WorkingOrderRail, BandPanel, FindingRow, FindingsSidebar, JudgePanel, MetricsPanel, OutlinePanel, RuleConfigEditor, RulePassesPanel, ViolationDisplay, AccountDisplay; ElapsedTimer had none) now uses the colour-name table in src/index.css, including its context-dependent entries: the Current Finding's row is mark-wash, the Judge's word diff is added/added-ink and removed/removed-ink, and agreement is agreement-*.

  • Milestone (story 208): only --color-milestone and --color-milestone-ink changed, from amber-200/amber-900 to violet-200/violet-900 (Tailwind's oklch values, copied exactly). The badge now uses text-milestone-ink. Text on the badge measures 7.95:1 (it was 7.28:1). No other token was added or changed.
  • Focus rings (story 209): four Rail controls had no visible keyboard ring, and now use the shared convention: the Raw response and Milestones only checkboxes, the milestone note textarea (which had focus:outline-none and nothing else) and the focusable Rail tab panel (inset, so overflow-y-auto can't clip it). The ink-filled controls (Flag this revision, Judge, the active Judge toggles, and the rule config Save button) get focus-visible:ring-offset-2.
  • Failures and warnings (spec Spec — Obelus v1.3: the page and the mark #57: amber for warnings, red for failures). Every notice that reports something that failed now uses border-failure-rule bg-failure-surface text-failure. text-failure on failure-surface measures 5.87:1.
    • Failure: the model Run error (WorkingOrderRail, handle.runError), the Reader Pass Run error (BandPanel, ReaderPassBlock), the Audit Run error (BandPanel), and the Judge error (JudgePanel). The Cancel run button already used the failure colours.
    • Warning (advisory, nothing failed): the document is past the character limit for a single call (WorkingOrderRail); a solo rule pass is holding the others (BandPanel, RulePassesPanel); assign a critic and a judge connection (JudgePanel); the same-model warning (JudgePanel); a Prediction the Judge disagreed with (JudgePanel); an Unstable verdict (JudgePanel).
  • No structural change to the Rail. Rebased on the latest v1.3 (Move the other screens to colour names, type scale and focus rings #61 merged).

Acceptance criteria

  • No raw palette colour class remains in any Rail panel. Verified after the rebase: a grep over all 12 files finds no bg|text|border|ring|divide|decoration-<palette> class and no bg-white.
  • The Milestone badge no longer uses the warning or mark colour. Verified in the running app: the badge renders rgb(77,23,154) on rgb(221,214,255). Before, it was rgb(123,51,6) on rgb(254,230,133).
  • Every Rail control shows a visible focus ring from the keyboard. Verified in headless Chromium by tabbing through the whole Rail (All mode, with Findings, the Judge, Milestones, Revisions, Reference, Outline and Metrics). Every control that took focus had a 2px focus-coloured ring, and the ink-filled ones also had a 2px offset. On v1.3 before this change, the tab panel and the milestone note showed no ring and the checkboxes showed only the browser's default outline. The Pass checkboxes in the Band panels already had rings, which I checked in source only.
  • Contrast minimums of story 187 still hold (disabled Pass names ≥ 4.5:1). Verified in the running app: I disabled each Pass in Structure, Paragraph and Word in turn (19 Passes) and composited the real background chain. Every disabled name measures 7.11:1 at 14px.
  • The Rail looks unchanged apart from the badge and focus rings. Verified by comparing the computed colours, borders, opacity and shadows of every element in the Rail, on this branch and on v1.3, in the Structure, Paragraph, Word and All modes and after flagging a milestone. The only difference beyond 1/255 per channel was the Milestone badge. That comparison ran before the failure recolour, which changes the four failure notices on purpose, as the spec requires. Not exercised in the app: the Current Finding row, Judge results, Prediction agreement, run-error notices and Violation display. These need a Connection or a model Run, so they are verified only through the class-to-name mapping.
  • Tests, typecheck and agent gates pass. After the rebase, pnpm test (1021 passed), pnpm typecheck, pnpm run gates and pnpm build all pass.

No affordance inserts model-derived text. No Worker route was added, and there is no Dexie migration or DOM test layer. The findings schema is unchanged, and no Highlight styling was touched.

🤖 Generated with Claude Code

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Sep 26, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-26T09:58:19.460320Z 029b204 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Every Rail panel now uses the colour names from index.css instead of
palette classes. The Milestone badge takes a violet milestone pair, no
longer the warning amber (story 208). The Raw response and Milestones
only checkboxes, the milestone note and the Rail's tab panel gain the
shared focus ring (story 209).

Part of #57. Closes #60.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
A ring in the focus colour with no offset disappears against an ink
fill, so Flag this revision, Judge, the active Judge toggles and the
rule config Save button carry ring-offset-2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
A failed model Run, a failed Reader or Audit Run and a failed Judge call
report something that went wrong, so they take failure rather than
warning (spec #57: amber for warnings, red for failures). Advisory
notices stay warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
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.

2 participants

0