Skip to content

fix(ui): apply design audit recommendations 1-4 - #27

Merged
gaffercode merged 3 commits into
mainfrom
claude/project-thread-hyi52f
Nov 26, 2026
Merged

gaffercode merged 3 commits into
mainfrom
claude/project-thread-hyi52f

Conversation

@gaffercode

Copy link
Copy Markdown
Owner

Requested by Gafferness · project thread

Summary

Fixes from the 2026-11-26 visual design and UX audit, covering recommendations 1-4. Recommendation 5 (moving raw values onto the design tokens) waits on the brand-standard decision.

  • Mode chips (H1): at 760px and below the chip row wraps, so all 8 chips show on a phone. Before, only 1.5 were visible. Wider screens keep the scrolling row with its fade.
  • Analysis error (H3): NOT_CONFIGURED now tells the doctor in plain words that the service isn't connected and their question is saved. The message no longer mentions "token" or "server". "Coba lagi" and "Susun draf SOAP lokal" are now separate buttons on their own row.
  • Focus (H2): the composer, the feedback field, links and selects get the same 2px focus ring as buttons.
  • Touch targets (S1): at 760px and below, every control in the sidebar drawer is at least 44px (--target-min). Before, 21 of 23 were smaller. A new --submenu-row variable sets the encounter row height, the tree elbows and the active-branch line together, so they stay aligned.
  • / picker (D1): above 760px the picker on the home composer opens below it. Before, its first item was clipped by the top of the canvas. On phones and in chat it still opens upward.
  • Phone dialogs (D2): at 600px and below, dialog actions stack full width in DOM order, so focus order matches what is on screen.

Verification

  • npx vitest run: 88 files, 871 passed, 1 expected fail, 38 skipped. eslint src tests: 0 problems. tsc --noEmit: 0 errors.
  • New tests are in tests/ui/design-audit-fixes.test.tsx, plus a NOT_CONFIGURED wording test in tests/aadi-guardrails.test.ts. Every test was seen failing before its fix.
  • Browser check with Playwright at 390/768/1440px in local auth mode:
    • All 8 chips are inside the row at 390px.
    • The composer shows a 2px outline on focus.
    • The / picker stays inside the canvas and its selected item is visible.
    • The phone drawer has no control under 44px. The feedback input is 42px inside a 44px field.
    • Tree elbows end at the row centre (22px), and the active branch ends at the active row's centre.
  • axe-core WCAG 2.1 AA: 0 violations on the 26 audited screen/width combinations.
  • One fresh-context review found 1 Important issue (tree elbows out of line at 44px rows), fixed in the second commit. Three minor findings are deferred:
    1. Patient rows in the phone sidebar now hold two 44px icon buttons, so names truncate sooner.
    2. The NOT_CONFIGURED screen copy becomes the fallback reason in the local SOAP draft.
    3. "Coba lagi" retries immediately even when the service is not configured.

Not covered

  • Clerk forms, completed AI answers and the document panel were not run, because there is no engine or Clerk keys in this environment.
  • At 768px, tablets still show the docked sidebar, and only 2 of 8 chips are fully visible behind the fade (audit finding S2, out of scope).
  • These commits must also be applied in the monorepo, or the next export-split will overwrite them.

Generated by Claude Code

- Mode chips wrap on phones instead of clipping behind the fade.
- Plain-language NOT_CONFIGURED message; analysis error shows its
  recovery actions as separate buttons.
- 2px focus ring on composer, feedback field, links and selects.
- 44px touch targets in the phone sidebar; one --submenu-row variable
  keeps encounter rows and the active-branch line aligned.
- Home "/" picker opens below the composer on wide screens.
- Phone dialog actions stack full width in DOM order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ta9C8FRC79LLB1FAxo819
The grey elbow ended at a fixed 17px, the centre of the old 34px row.
It now ends at half of --submenu-row, so the elbows, the active branch
and the last row's line meet at the same point on 44px phone rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ta9C8FRC79LLB1FAxo819
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentrapedia Ready Ready Preview Nov 26, 2026 9:38pm UTC

Request Review

@gaffercode gaffercode self-assigned this Nov 26, 2026
Gaffer confirmed the current look as the standard (2026-11-26). Lists
the foundation-token groups that the workspace does not use. No code
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ta9C8FRC79LLB1FAxo819
@gaffercode
gaffercode marked this pull request as ready for review November 26, 2026 21:42
@gaffercode
gaffercode merged commit 4a886cc into main Nov 26, 2026
4 checks passed
@gaffercode
gaffercode deleted the claude/project-thread-hyi52f branch November 26, 2026 21:42
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