Skip to content

fix(ui): mobile hero search, touch targets, and composer portal hardening - #295

Closed
BigSimmo wants to merge 14 commits into
mainfrom
cursor/mobile-ui-fixes-d6c9
Closed

fix(ui): mobile hero search, touch targets, and composer portal hardening#295
BigSimmo wants to merge 14 commits into
mainfrom
cursor/mobile-ui-fixes-d6c9

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Rebased mobile UI fixes onto current main (includes #274 access rollout and #287 production search unblock).

  • Center hero search on phones with portal retry hardening and no bottom-dock flash
  • 44px touch targets for composer +/send on phones
  • Restore standalone /applications route
  • Playwright scope-menu fallbacks for mobile and desktop stress paths
  • Prettier/format CI fixes

Supersedes closed #271 and #269 for the UI portion.

Verification

  • npm run format:check — pass
  • npm run typecheck — pass
  • CI verify + ui-smoke — pending on this PR

Production follow-up

Redeploy after merge for layout fixes to reach psychiatry.tools.

Open in Web Open in Cursor 

BigSimmo added 8 commits July 6, 2026 01:55
- Hide footer Evidence/Sources chips on phone hero composers; scope stays in + menu
- Suppress bottom-dock composer flash until hero portal slot is ready
- Increase composer action/send touch targets to 44px on phones
- Update Playwright tests for scope menu, Answer home geometry, and stress fallback
- Remove stray merge conflict markers from master-search-header, ui-stress, globals.css
- Restore standalone /applications page and remove redirect to /?mode=tools
- Re-export ApplicationsLauncherPage for the restored route
- Regenerate docs/site-map.md
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@supabase

supabase Bot commented Jul 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo force-pushed the cursor/mobile-ui-fixes-d6c9 branch from b46ae08 to ab3f42b Compare July 5, 2026 18:00
BigSimmo and others added 5 commits July 6, 2026 02:17
…#291)

* fix(rag): scope anonymous retrieval to public documents via owner sentinel

Wire retrievalOwnerFilter through RAG, deep-memory, and document-enrichment so production anonymous search sends the public owner sentinel. Adds live migration check script and updated access tests.

* fix(ci): prettier migration check script and promote migration updated_at

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* fix: unblock PR CI — migration column guard and schema test sentinel

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* style: format supabase-schema sentinel assertions for prettier

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo

BigSimmo commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

@BigSimmo

BigSimmo commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded: all mobile UI changes landed on main via #298 and related PRs. Branch is now identical to main (0 diff).

@BigSimmo BigSimmo closed this Jul 6, 2026
@BigSimmo
BigSimmo deleted the cursor/mobile-ui-fixes-d6c9 branch July 9, 2026 13:01
cursor Bot pushed a commit that referenced this pull request Aug 9, 2026
Resolve docs/outstanding-issues.md by keeping main's #295/#296/#252
archive updates, re-closing #218/#270 from this PR, and renumbering the
text-2xl-compact retirement task to #297 to avoid the id collision.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo added a commit that referenced this pull request Aug 9, 2026
…lection (#262 parts 2 and 3) (#1780)

* docs(issues): close #218 and #270, both shipped before this session

Both rows were still open in docs/outstanding-issues.md while their work was
already live on main, which had scoped a third session from them.

#218 (cn() lacks tailwind-merge) shipped in PR #1678, aeba5a2.
src/components/ui-primitives.tsx:37 is twMergeClinical(...) rather than a plain
join, package.json carries tailwind-merge ^3.6.0, and src/lib/tailwind-merge.ts
declares the repo's @theme scales to twMerge.

#270 (declare the tap spacing token) shipped in PR #1738, 80cf781, an ancestor
of origin/main. "tap" is present in CLINICAL_TWMERGE_THEME.spacing, and
tests/tailwind-merge-config.test.ts was inverted rather than deleted so the
merge behaviour is now asserted rather than pinned out.

Verified in source at origin/main 7aaf934, not inferred from the handover.

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

* feat(design-system): ratchet raw padding, radius and line-height literals (#262 part 3)

The design-system contract ratcheted colour, shadow, tap and tracking but not
spacing, radius or line-height, so a value could bypass the scale as a bare
literal in either a class or a stylesheet and nothing objected.

Adds three per-path ratchets, covering both halves the way the colour and
legacy-shadow metrics already do:

  rawPaddingLiterals      67  (17 CSS declarations, 50 class utilities)
  rawRadiusLiterals       24  (22 CSS declarations, 2 class utilities)
  rawLineHeightLiterals    3  (3 CSS declarations)

The exemption is deliberately "contains no CSS function", not the narrower
`(?!var\()` the tracking rule uses. Padding is not only ever a token or a
literal: production ships pb-[env(safe-area-inset-bottom)],
pt-[max(0.75rem,var(--safe-area-top))], pt-[clamp(1.5rem,5vh,3rem)] and
pb-[calc(7rem+env(safe-area-inset-bottom))]. Those are computed from the
viewport or the safe-area inset, cannot be spelled as a scale step, and a
`var(`-only lookahead would have flagged every one of them. On the CSS side,
zero in any unit, the CSS-wide keywords and custom-property declarations (the
token definitions themselves) are exempt for the same reason.

Every one of the 94 baseline entries was verified present at its cited line
before pinning, and the baseline change is additive: all fifteen pre-existing
metrics and every pre-existing debtByPath entry are byte-identical.

Mutation-tested rather than assumed. Class side, in a file with no prior debt:

  - rawPaddingLiterals increased from 67 to 68
  - rawPaddingLiterals at src/components/ui-primitives.tsx increased from 0 to 1
  - rawRadiusLiterals increased from 24 to 25
  - rawRadiusLiterals at src/components/ui-primitives.tsx increased from 0 to 1
  - rawLineHeightLiterals increased from 3 to 4
  - rawLineHeightLiterals at src/components/ui-primitives.tsx increased from 0 to 1

The CSS half fails the same way. Both probes also carried the sanctioned
computed forms, and each count rose by exactly one, so the exemptions are
proved by the same runs rather than argued.

No new npm script: the metrics live inside check:design-system-contract, so
docs:check-inventory and check:gate-manifest are untouched.

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

* feat(design-system): gate type-step selection on the decidable half (#262 part 2)

check:type-scale blocks arbitrary text-[12px] values. Nothing has stopped the
scale itself growing a step no surface ever picks, which is the drift that
makes a wrong selection possible in the first place.

Whether a heading should have chosen text-sm over text-sm-minus is not
mechanically decidable, and this does not pretend otherwise. A step that is
declared and consumed by nobody is decidable, and there is one today:
--text-2xl-compact (globals.css:112) has zero consumers -- no utility use, no
var() use -- while the next-rarest step, text-hero, has one real consumer.

The analyzer reports every bare text-<name> it sees and does not decide which
names are steps; the checker intersects that against the @theme block it parses
from globals.css. So the scale is never written down twice, and a step added to
globals.css is covered without touching this gate.

Retiring the dead step edits @theme, so it gets its own revertible PR rather
than riding along here: it is carried in UNUSED_TYPE_STEP_EXEMPTIONS and
tracked as docs/outstanding-issues.md #295. The exemption cannot rot silently --
the gate also fails if an exempted step stops being declared or gains a
consumer.

Mutation-tested, three ways:

  - type steps are declared in globals.css @theme but no production surface
    selects them: --text-2xl-compact (text-2xl-compact). Retire the step or use
    it; do not leave the scale carrying a step nobody picks.
  - (a newly added --text-probe-step fails identically, so this catches future
    drift rather than only today's known case)
  - --text-2xl-compact is exempted as unused but production now selects
    text-2xl-compact -- drop the exemption

Measurement note, since three different figures were in circulation for this
row: the "1318 sites" is a repo-wide grep INCLUDING mockups, which the gate
excludes (1360 at this HEAD). Production consumers of the nine non-standard
steps total 705 -- text-2xs 421, sm-minus 160, base-minus 57, 3xs 42,
2xl-minus 9, 3xl-minus 9, lg-minus 6, hero 1, 2xl-compact 0.

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

* docs(design-system): correct GATES.md for the two new scale gates

GATES.md's own §1 is the list of what actually runs, and this series' recurring
failure is that list lagging the code: four of #264's six prohibitions were
already gated while it said "planned".

Records the padding/radius/line-height ratchets and the type-step selection
rule in the contract row, and rewrites the type-scale callout, which claimed a
step-selection lint "does not exist". The decidable half now ships; the half
that asks whether text-sm-minus was the right pick over text-sm still does not,
and cannot.

Also corrects the "1 318 call sites" figure quoted there. It was a repo-wide
grep including src/app/mockups/**, which every one of these gates excludes
(1 360 at 7aaf934). Production consumers total 705, and there are nine
non-standard steps, not eight.

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

* docs(ledger): record the #262 parts 2/3 gate work (PR #1780)

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

* fix(design-system): close scale-ratchet and unused-step review gaps

Cover Tailwind arbitrary-property forms and modern CSS zero units in the
raw scale ratchets, and validate unused-step exemptions against the same
class-or-CSS consumer predicate used for ordinary steps.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo added a commit that referenced this pull request Aug 9, 2026
Four rows, all measured against origin/main 199b303 in this session:

- #295 (P2 task) the ErrorState enforcement check. GATES.md:106 still
  reads "planned" and grep over scripts/ and eslint-rules/ returns zero
  references to ErrorState, so the component exists but nothing requires
  it. Deliberately not flipped to implemented.
- #296 (P3 task) adopting ErrorState at the three surfaces that genuinely
  hand-roll the guard. Live-look change, downstream of the redesign.
- #297 (P3 issue) the safe-area exemption in the new raw-value ratchet,
  which is by form rather than by absence of a literal.
- #298 (P2 issue) the three sites carried into M4 as guards that are not
  guards, so the next reader does not convert them.

Written with npm run issues:add, never by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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