Skip to content

OCR env fix, --tone-purple token, and header chrome CSS layering - #181

Merged
BigSimmo merged 6 commits into
mainfrom
claude/kind-visvesvaraya-beb836
Jul 2, 2026
Merged

OCR env fix, --tone-purple token, and header chrome CSS layering#181
BigSimmo merged 6 commits into
mainfrom
claude/kind-visvesvaraya-beb836

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Continues the maintenance plan (items 1–2; item 3 decomposition follows as a separate PR). Three focused changes plus verification tooling:

  • Item 1 — OCR prerequisites (machine, no code): npm run check:indexing failed at the Python prerequisite step only because PYTHON_BIN defaulted to bare python, which resolves to an agent tool-venv (3.11, missing PyMuPDF/pytesseract) instead of the real Python 3.12 that has them. Fixed by setting PYTHON_BIN to the absolute 3.12 path in the (gitignored) .env.local. check:indexing now runs green end-to-end (2,065 docs, 0 failed) and tests/pdf-extractor.test.ts passes. No repo code change; documented here for the record.
  • --tone-purple token: replaces the one raw bg-violet-600 (the Youth service-pathway dot) introduced by Unified mode homes, branded sidebar, and global header/footer across all pages #171 with a themed token — light #7c3aed (= violet-600, so light mode is unchanged), brighter #a78bfa on dark, CanvasText under forced-colors.
  • Header chrome CSS layering (reduced Item 2): moves edge-glass-header (+ responsive padding), universal-header, universal-header-mode-button, and universal-header-icon-control into @layer components so Tailwind utilities on those elements win. The header/mode-pill was the source of the recurring overlap+shadow bugs. Reconciled the three shadow conflicts so output is unchanged, proven byte-identical across 16 states (home/answer/focus/document × mobile/desktop × light/dark) with the new scripts/capture-chrome-parity.ts.
  • Deferred (documented): the frosted composer chrome stays unlayered — PR Unified mode homes, branded sidebar, and global header/footer across all pages #171's rework pushed it from ~19 to ~92 computed-style conflicts concentrated in shared ui-primitives constants; a base/delta split is tracked in docs/process-hardening.md.

Verification

  • npm run check:indexing — green end-to-end (item 1)
  • Computed-style parity — 16 states byte-identical before/after (scripts/capture-chrome-parity.ts)
  • npm run verify:cheap — 834 unit tests passed
  • npm run verify:ui — 64 Chromium tests passed (incl. the merged ui-overlap suite, 10/10)
  • npm run format:check / typecheck / lint — clean
  • verify:release — not run (no release claim)

Merged latest origin/main (through #178); no conflicts.

Clinical Governance Preflight

Styling/tooling/config only — no ingestion, answer generation, search/ranking, document access, privacy, or clinical output behavior touched.

  • Source-backed claims still require linked source verification
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys / private document access remain server-only
  • Demo/synthetic content remains separated from real sources
  • Source metadata / outdated-source behavior unchanged
  • TGA SaMD impact — N/A, no decision-support behavior changed

Notes

  • scripts/capture-chrome-parity.ts is reusable infrastructure for the deferred composer-layering work. Gotcha documented: only reliable once the dev server has settled on the current CSS (capture twice, confirm agreement).

🤖 Generated with Claude Code

BigSimmo and others added 4 commits July 2, 2026 20:30
Adds scripts/capture-chrome-parity.ts: drives Playwright against the dev
server with the smoke suite's demo API mocks and dumps getComputedStyle
(incl. ::placeholder/::after) for the header + composer chrome across 16
states (home/answer/focus/document x mobile/desktop x light/dark).
Selectors are refactor-stable (testids/aria/structure), never the chrome
class names being migrated. --compare diffs two snapshots and exits
nonzero on any difference, proving the @layer migration is pixel-identical.
Snapshots write to the git-ignored scratch/ dir (machine-specific).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The "purple" mode-home pill tone (Youth service pathway dot) used a raw
Tailwind palette color, the only non-token color introduced by #171. It
did not adapt to dark mode or forced-colors like the surrounding tokens.
Add --tone-purple (light #7c3aed == violet-600 so light mode is
unchanged; brighter #a78bfa on dark; CanvasText under forced-colors) and
reference it via bg-[color:var(--tone-purple)].

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…cal)

The header + mode pill was the source of the recurring overlap/shadow
bugs. Move edge-glass-header (+ responsive padding), universal-header,
universal-header-mode-button, and universal-header-icon-control into
@layer components so Tailwind utilities on those elements now win instead
of silently losing to the unlayered class.

Reconciled the three shadow conflicts so rendered output is unchanged:
drop the dead shadow-[var(--shadow-tight)] on the two edge-glass-header
headers (class already sets box-shadow:none), and drop
shadow-[var(--shadow-inset)] on the mode button and the New-chat icon
control so the layered class supplies its shadow directly (avoids
Tailwind's shadow utility injecting transparent ring-placeholder layers).

Verified byte-identical computed styles across 16 states
(home/answer/focus/document x mobile/desktop x light/dark) with
scripts/capture-chrome-parity.ts. The frosted COMPOSER chrome stays
unlayered (deferred): PR #171 pushed it to ~92 conflicts in shared
ui-primitives constants; tracked in docs/process-hardening.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37e1bde1e2

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/capture-chrome-parity.ts Outdated
Comment thread scripts/capture-chrome-parity.ts Outdated
@BigSimmo
BigSimmo merged commit 1450078 into main Jul 2, 2026
4 checks passed
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