Skip to content

Codex/mobile search phone fix 20260717#700

Closed
BigSimmo wants to merge 5 commits into
mainfrom
codex/mobile-search-phone-fix-20260717
Closed

Codex/mobile search phone fix 20260717#700
BigSimmo wants to merge 5 commits into
mainfrom
codex/mobile-search-phone-fix-20260717

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Verification

  • npm run verify:pr-local

During development, use npm run verify:cheap as the faster iteration gate before the final PR-local preflight.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims

For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes, verify:pr-local runs eval:rag:offline automatically. Run the offline command directly during iteration before spending a live eval.

  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.
  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

Clinical Governance Preflight

Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

Summary by CodeRabbit

  • New Features

    • Universal search command dropdowns now appear only on supported desktop viewports (hover-capable, fine pointer), with behavior varying by placement.
  • Bug Fixes

    • Dropdown auto-closes and clears selection when it becomes unavailable due to responsive layout changes.
    • Keyboard and smart-prompt interactions no longer open or navigate dropdown content when the dropdown isn’t available; focus behavior now matches availability.
  • Tests

    • Updated unit and UI coverage to ensure dropdowns and cross-mode typeahead remain hidden on phone/landscape touch viewports.

@supabase

supabase Bot commented Jul 17, 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 ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 02ee7ac2-ed1f-427c-985e-c40540a3af6e

📥 Commits

Reviewing files that changed from the base of the PR and between 1faaf4d and 590f32b.

📒 Files selected for processing (2)
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
  • tests/ui-universal-search.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/ui-universal-search.spec.ts
  • src/components/clinical-dashboard/universal-search-command-surface.tsx

📝 Walkthrough

Walkthrough

The universal search command dropdown now uses placement-specific desktop pointer media queries, synchronizes displayability state, and suppresses fetching, keyboard behavior, opening, and rendering on unsupported viewports. Unit and phone UI tests cover the media queries and hidden dropdown behavior.

Changes

Responsive dropdown gating

Layer / File(s) Summary
Media-query contract and placement typing
src/lib/search-command-surface.ts, src/components/clinical-dashboard/universal-search-command-surface.tsx, tests/search-command-surface.test.ts
The shared placement type and media-query helper define breakpoint, hover, and fine-pointer requirements, with unit coverage for both placements.
Dropdown displayability gating
src/components/clinical-dashboard/universal-search-command-surface.tsx
Dropdown fetching, keyboard handling, focus opening, smart-prompt reopening, rendering, and responsive visibility now require dropdownDisplayable.
Phone viewport behavior validation
tests/ui-tools.spec.ts, tests/ui-universal-search.spec.ts
Phone smoke tests verify that bottom-dock, mode-home, and universal search interactions keep the dropdown, suggestions listbox, and cross-mode entries hidden.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UniversalSearchCommandSurface
  participant matchMedia
  participant useUniversalSearch
  participant CommandDropdown
  UniversalSearchCommandSurface->>matchMedia: Evaluate placement media query
  matchMedia-->>UniversalSearchCommandSurface: Return dropdownDisplayable
  UniversalSearchCommandSurface->>useUniversalSearch: Enable when open and displayable
  UniversalSearchCommandSurface->>CommandDropdown: Render when displayable
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description matches the template, but the Summary and Notes are empty placeholders and no verification was completed. Add a real change summary, note key behavioral impact, and mark the relevant verification or preflight checks that were actually run.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: a mobile search fix focused on phone behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/mobile-search-phone-fix-20260717

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/clinical-dashboard/universal-search-command-surface.tsx`:
- Around line 383-406: The dropdownDisplayable state initializer must not access
window.matchMedia. Initialize it deterministically without browser APIs, then
let the existing effect’s sync function read matchMedia and update the state,
while guarding environments where matchMedia is unavailable before using it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e1204d0-fe96-421c-9fd2-afbf3e20eb6b

📥 Commits

Reviewing files that changed from the base of the PR and between 8b1a415 and 7c4f652.

📒 Files selected for processing (4)
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
  • src/lib/search-command-surface.ts
  • tests/search-command-surface.test.ts
  • tests/ui-tools.spec.ts

@github-actions

Copy link
Copy Markdown

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • UI regressionpossible known flake: UI/Playwright job; check tests/flake-ledger.json (tests/ui-smoke.spec.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, tests/ui-tools.spec.ts) and re-run before bisecting.
  • PR requiredpossible known flake: UI/Playwright job; check tests/flake-ledger.json (tests/ui-smoke.spec.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, tests/ui-tools.spec.ts) and re-run before bisecting.

Heuristic only — a main-side or flake label is a starting point, not a verdict.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tests/ui-universal-search.spec.ts (1)

193-201: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Exercise the touch-pointer branch, not only the narrow-width branch.

At 390px, this test passes solely because the viewport is below the dropdown breakpoint. It would still pass if the new (hover: hover) and (pointer: fine) gating were removed, so wide or landscape touch phones remain unprotected. Add a mobile Playwright context (hasTouch: true) with a viewport above the relevant breakpoint, or add that as a separate case.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/ui-universal-search.spec.ts` around lines 193 - 201, Update the “keeps
cross-mode typeahead hidden on a phone viewport” test to exercise the
touch-pointer condition, not just narrow width: use a mobile Playwright context
with hasTouch enabled and a viewport wider than the dropdown breakpoint, or add
a separate case. Preserve the existing assertions that the dropdown and
cross-mode results remain hidden.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/ui-universal-search.spec.ts`:
- Around line 193-201: Update the “keeps cross-mode typeahead hidden on a phone
viewport” test to exercise the touch-pointer condition, not just narrow width:
use a mobile Playwright context with hasTouch enabled and a viewport wider than
the dropdown breakpoint, or add a separate case. Preserve the existing
assertions that the dropdown and cross-mode results remain hidden.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c3a2c204-c533-4d41-87be-1970d73aa772

📥 Commits

Reviewing files that changed from the base of the PR and between 7c4f652 and 1faaf4d.

📒 Files selected for processing (1)
  • tests/ui-universal-search.spec.ts

@BigSimmo
BigSimmo enabled auto-merge July 17, 2026 06:46
@BigSimmo

Copy link
Copy Markdown
Owner Author

Superseded by merged PR #717. The exact five-file scope from this branch is now present on main, with the hydration/focus race and wide-touch phone behavior strengthened and verified by the required static, unit, build, Production UI, Advisory UI, PR policy, and security checks. This PR's head remains exactly 590f32b73815fd5db0784762e4f9e3322e338107; no unique relevant change remains to recover, so this historical PR and its exact branch ref are being retired.

@BigSimmo BigSimmo closed this Jul 17, 2026
auto-merge was automatically disabled July 17, 2026 14:29

Pull request was closed

@BigSimmo
BigSimmo deleted the codex/mobile-search-phone-fix-20260717 branch July 17, 2026 14:30
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