Skip to content

Design audit 2/4: shell (wayfinding, one delete rule, pending states, page headers) - #126

Merged
Programcode merged 8 commits into
mainfrom
design-audit/shell
Oct 11, 2026
Merged

Programcode merged 8 commits into
mainfrom
design-audit/shell

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Second of four stacked PRs for the 2026-10-09 design audit. Base: #124 (Foundations).

What changed

Wayfinding

  • The header's "Home" is now Tools. Current debate is a link to the debate page with its own chevron for the menu, and it shows as active on the debate page and on all eight tool routes. On the Tools page and Timer, Tools is active. Before this, nothing showed as active on any tool route.
  • The brand is a <span>, not a second <h1>. The Tools page h1 says "What are you working on?" in en, es and hu.
  • The nav pill (scaleX(0) with a glow) and the nav-glow hover are gone; active is just bg-primary/10 text-primary. The header edge only appears once the page scrolls, and the icon controls have tooltips instead of title.
  • Language is a two-tap popover (open, pick), with the AI output language underneath. It used to be a dialog with two Selects.
  • The mobile menu is a modal panel with a scrim: 180ms fade and 4px in, 120ms out, focus kept inside, opening below the whole two-row header. It used to be a 420ms motion-reveal with the page still live underneath. The theme toggle leaves the crowded mobile header; it stays in Settings.
  • On phones, side sheets (Library source, Ask's saved chats, debate context review) become Vaul bottom sheets with drag-to-dismiss.
  • 404, Terms, Privacy, Sources, shared links and Login all have a way home. The route error screen offers "Go to Home" next to Reload. The 404 is an in-app link, so it no longer reloads through the startup shell.

One delete rule. If the app can put the item back exactly, it deletes at once and the toast offers Undo: Library sources here, and flowchart nodes and saved flowcharts in PR3. Otherwise there is a destructive-styled AlertDialog: saved cases, sparring rounds, Clear Library, a folder merge (which replaces window.confirm), and the Settings deletes. A debate keeps its inline confirm, which already names what goes with it. Admin Ban, Unban, Make admin and Remove admin now go through a confirmation dialog.

Pending states. Sign out, Delete all data, switching or deleting a debate, Continue on the idle gate, and Library file import all show they are working and can't be clicked twice. The file input resets so the same file can be picked again. Announcement dismiss is optimistic and comes back if the server refuses, and the banner renders from a session cache, so it no longer pushes the page down after a fetch. The 160px pulsing admin placeholder is gone.

Pages

  • One PageHeader (h1 text-3xl font-bold leading-tight tracking-tight, optional eyebrow, meta and actions). Card titles are text-lg with size-specific tracking.
  • Tools and the debate page share one ToolLink list labelled with the tool pages' own h1s. The debate page puts the tools first, and its actions are quieter ghost buttons. Lists cut at 4 or 6 get "View all (N)".
  • Library:
    • The title is the row's button; the row is no longer a role=button wrapping a link, a button and a switch.
    • Labels are tied to their fields with htmlFor.
    • Required fields show an inline role="alert" under the field and move focus there, instead of a toast after submit.
    • The duplicate folder Select, the second Folder select and the three stat tiles are gone, replaced by one meta line.
    • The invisible file input gets a focus ring.
    • Text has a text-xs floor; it was 9–11px.
  • History keeps its tab in the URL, so Back returns to it. Lists scroll with the page on phones; the 500px inner boxes stay on wide screens only.
  • Settings tier badges are tinted (bg-amber-500/15 text-amber-800, and so on); white on amber and white on green were about 2:1. The pricing modal badges the plan you are actually on, and the limit modal has "Not now".
  • The idle gate treats Escape as "Continue", so it never traps you, including on Settings.
  • Login has the real mark and a link home. Errors show under the field they are about, and Supabase and demo-code errors are mapped to i18n, so Spanish and Hungarian users no longer see raw English.
  • Shared links render a readable view instead of a 600px <pre> of JSON: the tool's own result view when the data passes its schema, plain labels and values otherwise. The "Import to Account" dead end is gone.
  • The onboarding tour starts as soon as its target exists, with a 500ms cap, and pauses when you leave the Tools page, so it no longer covers Generate's form on phones.
  • Touch: header controls, the debate menu chevron, footer links and Select triggers are all at least 44px with a coarse pointer.

Changes from the audit's literal After

  • The logo tile in dark mode is not done. favicon-72.png is RGB with no alpha, so the white is baked into the mark itself; a dark variant needs a new asset. Login and the public pages do use the real mark now.
  • Shared items. I removed Import, as recommended, and render known tool results through the existing result components after a schema check, because the data is public input.
  • Duration classes. tailwindcss-animate's animate-in sets its 150ms default in the variant layer, which beats a plain duration-* class. The mobile menu and the Tooltip therefore use state-scoped durations. Measured: the menu opens in 180ms and closes in 120ms; the Tooltip closes in 120ms.

Verify skill and tests kept in step

  • Recipes: library now proves Undo (delete, Undo, delete again, then a reload and the DB row both show it gone). The library, account-data and current-debate field selectors use the real labels (Title, Content), and the import step asserts the Import preview panel instead of the removed "Source Ready" toast.
  • Feature map: features/library-sources.md is updated. SKILL.md has a new gotcha: a running stack does not reload tailwind.config.ts, so you need down && up (from PR1).
  • Specs: e2e specs that named Home, the Home h1 or the old toast were moved to the new names. That covers home-navigation, admin-announcements, navigation-performance, startup-shell, hungarian-parity and the offline service-worker script.
  • Unit tests: the idle-gate test now asserts that Escape continues.
  • Agentic replays: re-recorded for the new header and Library.

Verification

Run locally on this branch. GitHub Actions is out of minutes; every job fails in about 2 seconds with "recent account payments have failed".

  • npm run lint, typecheck, npm test (274), build and docs:check: all pass. npm run verify passes: 333 Deno tests and 30 Playwright smoke tests.
  • verify.sh drive all: 30 passed and 2 skipped on both desktop-chromium and mobile-chromium. The skips are workspace-autosave, which needs --collab. Mobile at first failed library with 4px of horizontal overflow: the row badges didn't wrap. That is fixed, and recipes/library and recipes/current-debate pass on mobile.
  • verify.sh e2e run: 179 of 180 on the first run. "Add a source and pause it" failed on desktop because the model judged a frame taken mid-save; the failure screenshot shows the saved source and a closed form. The rerun of that file passed 4 of 4.
  • Header e2e specs (home-navigation, admin-announcements, navigation-performance, startup-shell, hungarian-parity, quality-backlog, login, first-run and authed-pages), desktop and mobile: the files that had failed were fixed and rerun at 44 of 44.
  • Browser timings: the mobile menu opens in 180ms and closes in 120ms; the menu panel's top equals the header's bottom (118px); the Tooltip closes in 120ms with its origin at the trigger edge (40px 0px).
  • Screenshots at 1440px and 375px in light and dark, and in Hungarian at 375px, for Tools, the debate page, Library, History, Settings and Generate: no horizontal overflow and no clipped labels in Hungarian. With a coarse pointer on Settings, Library and Tools, every control is at least 44px.

Not verified: real touch hardware, WebKit and Safari, staging and production.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 9, 2026 11:28
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Oct 11, 2026 12:18pm UTC
debatelab-staging Ready Ready Preview Oct 11, 2026 12:18pm UTC

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Free
  • Run ID: 37ee1b14-cfb5-44d5-8c7c-e54313bf79f5

📥 Commits

Reviewing files that changed from the base of the PR and between bba0666 and f08cdad.


⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json

📒 Files selected for processing (69)
  • .claude/skills/verify-debatelab/features/library-sources.md
  • .claude/skills/verify-debatelab/recipes/account-data.spec.ts
  • .claude/skills/verify-debatelab/recipes/current-debate.spec.ts
  • .claude/skills/verify-debatelab/recipes/library.spec.ts
  • agentic/replay/c6cf102fb2172d14552e85bf19abb2d80a6075794717cc7c0c2cd0610bb9fe37.json
  • agentic/replay/cc6903d8aafb702ef5a496a05b9c45338886c52fc41ea6a7c0f6fd1435dfbfec.json
  • agentic/replay/d15dccac4ac18fdabdb7d4c086d281513bd8832a317f7d3d65ac987fec417dc4.json
  • agentic/replay/f6d6a30f85648dfe2446aa2888ca7fba9df68b2746461d556a193ac4ed89d357.json
  • e2e/admin-announcements.spec.ts
  • e2e/full-stack/account-data.spec.ts
  • e2e/full-stack/account-deletion.spec.ts
  • e2e/home-navigation.spec.ts
  • e2e/hungarian-parity.spec.ts
  • e2e/live/research.spec.ts
  • e2e/navigation-performance.spec.ts
  • e2e/startup-shell.spec.ts
  • package.json
  • plans/2026-10-09-design-audit.md
  • scripts/test-service-worker-offline.mjs
  • src/App.tsx
  • src/components/LanguageSwitcher.tsx
  • src/components/ModelSelector.tsx
  • src/components/ThemeToggle.tsx
  • src/components/features/ask/AskChat.tsx
  • src/components/features/debate/CurrentDebateMenu.tsx
  • src/components/features/debate/DebateDialogs.tsx
  • src/components/features/factoids/FactoidsForm.tsx
  • src/components/features/generate/GenerateForm.tsx
  • src/components/features/generate/GenerateResults.tsx
  • src/components/features/onboarding/OnboardingTour.tsx
  • src/components/features/shared/SourceQualityList.tsx
  • src/components/features/sparring/SparringRound.tsx
  • src/components/features/sparring/SparringScorecard.tsx
  • src/components/features/sparring/SparringSetup.tsx
  • src/components/features/subscription/LimitReachedModal.tsx
  • src/components/features/subscription/PricingModal.tsx
  • src/components/features/tools/tool-links.tsx
  • src/components/layout/AnnouncementBanner.tsx
  • src/components/layout/AppLayout.tsx
  • src/components/layout/HeaderTooltip.tsx
  • src/components/layout/PageHeader.tsx
  • src/components/layout/PublicPageShell.tsx
  • src/components/layout/nav-sections.ts
  • src/components/ui/card.tsx
  • src/components/ui/dialog.tsx
  • src/components/ui/popover.tsx
  • src/components/ui/section-card.tsx
  • src/components/ui/sheet.tsx
  • src/components/ui/tooltip.tsx
  • src/index.css
  • src/lib/auth-errors.ts
  • src/lib/stores/session-store.ts
  • src/locales/en.json
  • src/locales/es.json
  • src/locales/hu.json
  • src/pages/AdminPage.tsx
  • src/pages/CurrentDebatePage.tsx
  • src/pages/HistoryPage.tsx
  • src/pages/HomePage.tsx
  • src/pages/LibraryPage.tsx
  • src/pages/LoginPage.tsx
  • src/pages/NotFound.tsx
  • src/pages/PrivacyPage.tsx
  • src/pages/SettingsPage.tsx
  • src/pages/SharedPage.tsx
  • src/pages/SourcesPage.tsx
  • src/pages/TermsPage.tsx
  • src/test/debate/debate-gates.test.tsx
  • tailwind.config.ts

 _________________________________________________________________
< Never bring a script to a dependency battle - bring a lockfile. >
 -----------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.


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

@Programcode

Copy link
Copy Markdown
Owner Author

Screenshots from the running app on this branch: Tools and the debate page in light and dark, the mobile menu before (main: no scrim, 420ms) and after (scrim, below the header), Library at 375px, and Hungarian at 375px.

Tools, light

Debate page, dark

Before: mobile menu

After: mobile menu

Library 375px

Hungarian Settings 375px

Language popover

Programcode and others added 6 commits October 9, 2026 11:59
Fixes the Shell rows of the 2026-10-09 design audit.

- Header: "Home" is now "Tools", and "Current debate" is a link that is
  active on the debate page and every tool route, with its own menu
  chevron. The brand is a span, Home's h1 describes the page, the nav pill
  and glow are gone, the edge appears only on scroll, and icon controls get
  tooltips. Language is a two-tap popover.
- The mobile menu is a modal panel with a scrim and a 180ms fade. The theme
  toggle leaves the mobile header. On phones, side sheets become Vaul
  bottom sheets.
- One delete rule: Undo when the app can put the item back exactly
  (Library sources); a destructive confirm otherwise; admin role changes
  confirm.
- Library: the title is the row's button, labels are tied to their
  fields, errors are inline, the duplicate filters and stat tiles are
  gone, and the merge confirm is a dialog. History keeps its tab in the
  URL, and lists scroll with the page on phones.
- Pending states for sign-out, delete-all, debate switch and delete, file
  import and announcement dismiss. The announcement renders from cache.
- 404, legal pages, Sources, Login and the route error screen all have a
  way home. Shared items render as a readable view, and Import is gone.
- Shared PageHeader and tool links, a text-xs floor, tinted tier badges,
  localized login errors, Escape continues past the inactivity gate, and
  the limit modal gets "Not now".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Tools rename, the Current debate link and the Library form changed what
the recorded agent steps click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rms on touch

tailwindcss-animate's animate-in sets a 150ms default in the variant layer,
which outranks a plain duration-* class. Measured after the change: mobile
menu 180ms in and 120ms out; tooltip 120ms out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The panel was placed 4rem under the top, so the Current Debate row covered
its first item. AppLayout now publishes the header's bottom edge as
--app-header-bottom and the panel opens there (measured: header 118px,
menu 118px on an iPhone 13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y errors

- navigation-performance waits for the Tools page h1.
- The onboarding schedule check instruments the new target-first start.
- Hungarian parity checks the inline required-field error, and the toast
  close label through a flowchart node delete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nfirms

- Library Undo re-inserts the same row (id and created_at), so a per-request source
  exclusion still applies and the source keeps its place. The library recipe now checks
  the restored row against the original.
- The mobile menu closes when the window widens past lg, where it is hidden but would
  still hold the page modal.
- Phone bottom sheets move focus inside on open, like the side sheet.
- A refused announcement dismiss restores the session cache as well as the banner.
- Folder merge and admin role changes keep their confirmation open while the write is
  pending and close only on success; a failed merge says so in the dialog.
- Read-only results (a shared case) show no regenerate buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Programcode

Copy link
Copy Markdown
Owner Author

Codex review round 1 (on cf907a2) found seven issues. All are fixed in 21a2607:

  1. Library Undo made a new source. The restored source got a new id and creation time, so a per-request exclusion stopped applying and the source moved to the top. Undo now re-inserts the same id and created_at and puts the source back in its old place. recipes/library checks that the restored row matches the original.
  2. The mobile menu stayed modal after the window widened past lg, so it was hidden but still blocked the page. It now closes.
  3. Phone bottom sheets left focus on the opener. They now move focus inside (autoFocus on the Vaul root), like the side sheet.
  4. A refused announcement dismiss only half rolled back. It restored the banner but not the session cache. Both come back now.
  5. Folder merge closed its confirm before the write finished. It now stays open while pending, closes only on success, and shows an inline error on failure (new string in en, es and hu).
  6. Admin role changes closed their confirm after a failed write. They now close only on success.
  7. Shared cases showed regenerate buttons that did nothing. Read-only results no longer show them.

Local checks at 21a2607, since GitHub Actions jobs fail in about 2 seconds with "recent account payments have failed":

  • npm run lint, typecheck, npm test (274), build, docs:check: pass.
  • verify.sh drive recipes/library: 2 passed on desktop-chromium and 2 on mobile-chromium, including the new same-row Undo check. Run on the AI tools branch rebased onto 21a2607.

Codex round 2 is reviewing 21a2607.

@Programcode

Copy link
Copy Markdown
Owner Author

Codex round 2 on 21a2607: no findings. It checked all seven fixes, their callers, the sources RLS and debate constraints, and the PR claims. All review findings on this PR are now resolved.

@Programcode
Programcode changed the base branch from design-audit/fixes to main October 11, 2026 13:08
@Programcode
Programcode merged commit fbbb8da into main Oct 11, 2026
8 of 17 checks passed
@Programcode
Programcode deleted the design-audit/shell branch October 11, 2026 13:12

This branch was successfully deployed

2 active deployments
Preview – debate-navigator — f08cdad9 Deployed Oct 11, 2026 by vercel[bot]
Preview – debatelab-staging — f08cdad9 Deployed Oct 11, 2026 by vercel[bot]
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