Skip to content

fix: keep phone search results in page#717

Merged
BigSimmo merged 6 commits into
mainfrom
codex/mobile-search-phone-refresh-20260717
Jul 17, 2026
Merged

fix: keep phone search results in page#717
BigSimmo merged 6 commits into
mainfrom
codex/mobile-search-phone-refresh-20260717

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep the universal-search command dropdown as a fine-pointer desktop enhancement instead of overlaying phone and touch-first layouts.
  • Gate fetching, focus opening, keyboard interception, prompt reopening, and rendering on the same placement-aware pointer media query.
  • Add unit, narrow-phone, mode-home, and wide landscape touch coverage; this supersedes stale PR Codex/mobile search phone fix 20260717 #700 on current main.

Verification

  • npm run test -- tests/search-command-surface.test.ts — 7/7 passed
  • npm run ensure — verified Clinical KB identity at http://localhost:3751
  • npm run format:changed -- --check
  • git diff --check
  • npm run verify:ui
  • npm run verify:pr-local

UI verification not run: focused Playwright was attempted repeatedly, but other registered Database worktrees held the repository heavyweight lock for build, verify:cheap, critical UI, and accessibility runs. The hosted Production UI job is required before merge.

Verification not run: npm run verify:pr-local was deferred for the same cross-worktree lock contention; hosted static, safety, coverage, build, and UI jobs are the exact-head merge gates.

Risk and rollout

  • Risk: low; this changes only when the optional command dropdown is displayable, preserving normal phone submission and full-page results while leaving desktop fine-pointer behavior intact.
  • Rollback: revert commit bcaff007a to restore the prior phone dropdown behavior; the recovery PR can be closed without changing the old PR Codex/mobile search phone fix 20260717 #700 until this replacement is merged.
  • Provider or production effects: None. No Supabase, OpenAI, production data, credentials, or deployment settings were used.

Clinical Governance Preflight

  • 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

  • PR Codex/mobile search phone fix 20260717 #700's hydration-safe state initialization and resolved review feedback are preserved.
  • The replacement also carries the final wide-touch test that proves pointer capability, not width alone, controls the dropdown.

Summary by CodeRabbit

  • Bug Fixes

    • Restored reliable universal search command-panel visibility on compatible desktop experiences, including headless/remote scenarios where input detection can be ambiguous.
    • Improved responsive gating so dropdown suggestions don’t open or fetch on touch phones (including landscape), and touch devices remain suppressed while desktops with hover/fine-pointer (or safe desktop fallback) keep working.
  • Tests

    • Updated and expanded Playwright coverage for phone/tablet visibility and touch/landscape behavior.
    • Added unit tests for the dropdown’s media-query and display gating logic.

BigSimmo added 3 commits July 17, 2026 21:35
Gate the desktop command dropdown on both width and fine-pointer capability, with unit and touch-phone coverage.
@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.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@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

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 957949c5-4bbf-40c1-a6cd-8d37b5ee42a6

📥 Commits

Reviewing files that changed from the base of the PR and between 42a3e3c and 0192948.

📒 Files selected for processing (2)
  • docs/branch-review-ledger.md
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
📝 Walkthrough

Walkthrough

The universal search command surface now uses placement-aware width and pointer media-query gating, with a zero-touch desktop fallback. Dropdown fetching, opening, rendering, and navigation are suppressed when unavailable, and phone-focused tests cover the updated behavior.

Changes

Universal search gating

Layer / File(s) Summary
Displayability contract
src/lib/search-command-surface.ts, tests/search-command-surface.test.ts
Exports placement-specific width queries, a fine-pointer query, and a predicate covering pointer and zero-touch fallback behavior; unit tests verify the combinations.
Placement-aware dropdown behavior
src/components/clinical-dashboard/universal-search-command-surface.tsx
Dropdown displayability gates fetching, rendering, focus and prompt auto-opening, keyboard handling, and responsive visibility classes.
Phone interaction validation
tests/ui-tools.spec.ts, tests/ui-universal-search.spec.ts, docs/branch-review-ledger.md
Phone and landscape touch-phone tests assert hidden universal search results and cross-mode suggestions; the review ledger records verification details and hosted-UI follow-up requirements.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant UniversalSearchCommandSurface
  participant MatchMedia
  participant UniversalSearch
  User->>UniversalSearchCommandSurface: Focus or type in composer
  UniversalSearchCommandSurface->>MatchMedia: Check placement and pointer queries
  MatchMedia-->>UniversalSearchCommandSurface: Displayable or unavailable
  UniversalSearchCommandSurface->>UniversalSearch: Enable fetching only when displayable
  UniversalSearchCommandSurface-->>User: Render dropdown or keep it hidden
Loading

Possibly related PRs

  • BigSimmo/Database#700: Introduced the directly related placement-aware dropdown gating and phone viewport coverage.
  • BigSimmo/Database#473: Changed the same command surface and phone UI tests to suppress dropdown behavior.
  • BigSimmo/Database#470: Updated related mobile search UI visibility logic and phone interaction tests.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: keeping phone search results in-page instead of overlaying touch-first layouts.
Description check ✅ Passed The description follows the required template and includes summary, verification, risk/rollback, governance, and notes sections.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/mobile-search-phone-refresh-20260717

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

@github-actions

Copy link
Copy Markdown

CI triage

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

  • Production UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #2769 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo merged commit 5d195d7 into main Jul 17, 2026
15 checks passed
@BigSimmo
BigSimmo deleted the codex/mobile-search-phone-refresh-20260717 branch July 17, 2026 14:28
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