Skip to content

fix(ui): settle single search header before overlap checks - #944

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/fix-ui-overlap-duplicate-header-3eab
Jul 19, 2026
Merged

fix(ui): settle single search header before overlap checks#944
cursor[bot] merged 3 commits into
mainfrom
cursor/fix-ui-overlap-duplicate-header-3eab

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Hardens tests/ui-overlap.spec.tsgotoHome so Production UI cannot flake on a transient dual header#search during the home landing-preference router.replace.

Main already waits for a single banner (from #934). This PR adds the missing root-cause pin: navigate to /?mode=answer so GlobalSearchShell skips the preference redirect that reintroduces two banners.

Root cause (from CI triage on #936)

  1. Production UIlocator('header#search') strict-mode violation (2 elements) while the shell applied a stored landing preference.
  2. PR required — cascade from Production UI failure.

Fix

  • Keep main's toHaveCount(1) settle.
  • Pin /?mode=answer so landing preference cannot router.replace mid-setup.

Verification

  • npm run verify:pr-local -- --files tests/ui-overlap.spec.ts — runtime/format/lint/typecheck/unit (2961 passed) + RAG fixtures
  • node scripts/run-playwright.mjs tests/ui-overlap.spec.ts --project=chromium → 12/12
  • UI verification not run: full verify:ui not required for a test-only helper change; hosted Production UI on this PR covers the suite.
  • Clinical governance N/A (test-only, no clinical/privacy/source/env changes).

Risk and rollout

  • Risk: Low — test helper only; assert still fails closed on a permanent double header.
  • Rollback: Revert the commit.
  • Provider or production effects: None
Open in WebOpen in Cursor

Summary by CodeRabbit

  • Tests
    • Updated UI navigation coverage to load the answer mode explicitly.
    • Improved test stability by preventing duplicate header and search instances during page initialization.

Production UI failed when gotoHome waited on header#search during a
transient dual-mount from the landing-preference router.replace. Pin
mode=answer and require exactly one banner before measuring overlaps.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@supabase

supabaseBot commented Jul 19, 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

coderabbitaiBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Playwright gotoHome helper now navigates to /?mode=answer and waits for domcontentloaded before checking the single visible search header.

Changes

UI navigation test

Layer / File(s)Summary
Pin home navigation mode
tests/ui-overlap.spec.ts
gotoHome uses /?mode=answer with waitUntil: "domcontentloaded" and documents the duplicate-mount scenario it avoids.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested labels:codex

Suggested reviewers:cursoragent

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title clearly matches the main change: pinning the UI test to avoid transient overlapping search headers.
Description check✅ PassedThe description follows the template with Summary, Verification, and Risk/Rollout details, and notes the relevant gates.
✨ 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 cursor/fix-ui-overlap-duplicate-header-3eab

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

Keep main's single-header settle wait and retain the mode=answer pin so
landing-preference router.replace cannot reintroduce a dual header#search.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor
cursorBot marked this pull request as ready for review July 19, 2026 20:55
@cursor
cursorBot enabled auto-merge (squash) July 19, 2026 20:57
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor
cursorBot merged commit 08181b8 into mainJul 19, 2026
16 checks passed
@cursor
cursorBot deleted the cursor/fix-ui-overlap-duplicate-header-3eab branch July 19, 2026 21:09
cursorBot pushed a commit that referenced this pull request Jul 19, 2026
Adopt mode=answer pin + single header#search wait from #944 so
Production UI overlap checks avoid landing-preference dual-mount flakes.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursorBot pushed a commit that referenced this pull request Jul 19, 2026
Note the plan-scoped header gutter fix and the compare-dock pointer
poll after integrating latest main differentials work.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursorBot pushed a commit that referenced this pull request Jul 20, 2026
Add ledger rows for the documents search header redesign and the
ui-overlap dual-header flake fix after squash merge and remote prune.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursorBot pushed a commit that referenced this pull request Jul 20, 2026
Note the plan-scoped header gutter fix and the compare-dock pointer
poll after integrating latest main differentials work.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Sign up for freeto 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

@BigSimmo@cursoragent