Fold the document viewer into the global shell - #205
Merged
Conversation
Render /documents/* inside GlobalSearchShell (documents mode) so the viewer gets the shared sidebar + global header like every other page. The shell's search composer stays hidden here - the viewer is a reading surface with its own search-within-document field. The viewer's local sticky header becomes a compact in-page toolbar: back link, scope-this-document, and document-actions buttons are kept; the redundant Answer/Documents segmented toggle (now covered by the global mode pill) is removed, along with the duplicate #main-content id and page-level backdrop the shell now provides. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cf6960392
ℹ️ 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".
BigSimmo
enabled auto-merge (squash)
July 2, 2026 17:20
…e skip target - Add dashboard-composer-edge to the viewer's fixed bottom composer so it centres against the content area (not the full viewport) now that the route renders inside the shell with the desktop sidebar - Make the shell's #main-content wrapper focusable (tabIndex -1, outline suppressed) so the root skip link still moves focus into the page content after the viewer's main lost the id Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…igSimmo/Database into claude/doc-viewer-global-shell
BigSimmo
added a commit
that referenced
this pull request
Aug 1, 2026
…1569) * Start Therapy Compass teardown: shared layer off tc-* one-offs First slice of #183. ui.tsx is now completely free of tc-* classes, and nav.tsx, workspace.tsx and therapy-card.tsx no longer use any numbered one-off class. Sizes map to the nearest scale rung so the mode does not visibly change, per the agreed constraint. The audit corrected the scope: therapy-compass.css defines 459 selectors across 3286 lines, not the 81 base classes #183 recorded. 353 of those are auto-extracted numbered one-offs (.tc-screens-search-screen-009 and friends), which are per-element and carry no cross-file coupling. That makes them the safe independent unit, so this slice migrates only those plus the primitive kit. Three ordering constraints the audit surfaced, recorded for the rest of the teardown: - tc-root must be removed LAST. Every numbered rule is scoped `.tc-root .tc-*`, so dropping it early unstyles every un-migrated screen. workspace.tsx keeps it with a comment saying so. - controls.ts and its call sites must move together. State modifiers are two-class selectors (.tc-control-outline.tc-is-selected), so retiring the base class without the call sites silently drops the selected state. - Some rules are irreducible to utilities and need a home in globals.css rather than deletion: the print isolation block (body:has(.tc-root) * visibility plus the named @page), the #phone-header-collapse-addon-slot contextual override, and the tc-scroll scrollbar styling. Tone handling reuses the shared recipes where they are provably identical: --success is an alias of --success-text and --success-soft of --success-bg, so toneSuccess/toneInfo/toneWarning render exactly as the tc classes did. Therapy keeps local neutral/purple/accent, which the shared kit lacks, and keeps its centred loading/empty states rather than the left-aligned shared EmptyState, so the CSS retires without the mode changing. Two gates had to move with the code, both preserving their intent: - check-design-system-contract.mjs allowed only the --tc-meter-width inline style in ui.tsx. That variable existed solely to hand a data-driven percentage to the stylesheet being retired, so the exemption now covers setting the width directly. - therapy-compass-responsive-contract.test.ts counted phone reflow only as tc-stack-sm / tc-mobile-stack. It now also counts the Tailwind grid-cols-1 + sm:grid-cols-* expression of the same guarantee, and checks the disabled Favourite button by its cursor-not-allowed utility rather than a class name that is going away. Note for the endgame: check-design-system-contract.mjs asserts on therapy-compass.css contents (--tc-paper-muted, the .tc-paper focus rule, .tc-btn hover/disabled, and the paper rule boundaries). Deleting the file fails that gate until those assertions are rewritten against the migrated markup. Gate: check:design-system-contract, check:type-scale, check:icon-scale, lint, prettier all pass; therapy-compass-responsive-contract 10/10 passed. Co-authored-by: Cursor <cursoragent@cursor.com> * Retire Therapy Compass parallel CSS into Clinical Sky tokens. Delete therapy-compass.css after migrating screens and control recipes to token-backed Tailwind, keep only print/paper/compare residuals in globals.css, and close ledger #183 once verify:cheap is green. Co-authored-by: Cursor <cursoragent@cursor.com> * Format therapy teardown after Prettier pass Follow-up to the CSS retirement commit so the push blob matches format:check. Co-authored-by: Cursor <cursoragent@cursor.com> * docs: record therapy-compass CSS teardown as issue #205 (resolved in PR-T) The diverged therapy branch had locally reused #183 for this teardown, but #183 on main is the Sentry metric-alert task. Allocate a fresh id via the issues writer instead and close it in the same PR. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(therapy): define local focusRing after ui-primitives rename Co-authored-by: Cursor <cursoragent@cursor.com> * docs: append branch-review-ledger row for PR-T therapy teardown Co-authored-by: Cursor <cursoragent@cursor.com> * docs: supersede PR-T ledger row for post-append tip Co-authored-by: Cursor <cursoragent@cursor.com> * Update recommend-screen.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update sheets-screen.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update brief-screen.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> * Update brief-screen.tsx Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Clinical governance preflight
🤖 Generated with Claude Code