Skip to content

Improve desktop answer popup UX - #286

Merged
BigSimmo merged 21 commits into
mainfrom
cursor/desktop-answer-popups-3035
Jul 6, 2026
Merged

Improve desktop answer popup UX#286
BigSimmo merged 21 commits into
mainfrom
cursor/desktop-answer-popups-3035

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Redesigns desktop answer popups: anchored source preview popover (no layout reflow) and refined evidence review modal entrance.

Changes

  • Source capsule preview (desktop ≥1024px):SourcePreviewPopover — portaled, anchor-positioned, Escape/outside dismiss, focus return, chevron rotation
  • Evidence sheet:sm:max-w-3xl, stronger backdrop, dialog-rise animation
  • Clinical notes + safety sheets: matching sm:bg-black/50 backdrop on desktop (follow-up commit)
  • ClinicalDashboard: removed dead #answer-evidence-drawer<details> fallback from openEvidenceDrawer() (follow-up commit)
  • Tests: unified source surface to role="dialog"; desktop Escape + toggle dismiss

Commits

  1. dc3a15430 — core popup UX (popover, sheet animation, mockup, tests)
  2. 5e3735dce — polish clinical/safety sheets + drawer fallback cleanup (2 files only)

Verification

npm install # if node_modules incomplete
npm run ensure
npx playwright test tests/ui-smoke.spec.ts -g "answer support popups adapt"--project=chromium

Preview

  • Static mockup: /mockups/answer-evidence-popups
  • Live: run a demo answer on desktop (≥1024px), open source capsule and evidence triggers
Open in WebOpen in Cursor

BigSimmoand others added 11 commits July 3, 2026 21:00
The golden retrieval set was 100% lexical fast-path (embedding_skipped_rate=1.0), so
it could not measure whether a re-index changes vector/embedding retrieval quality.
- forceEmbedding option on searchChunksWithTelemetry (SearchChunksArgs): bypasses every
lexical text-fast-path so retrieval always exercises the embedding/vector stage.
Diagnostic/eval-only; folded into the search cache key; never set on production paths.
- eval-retrieval.ts: per-case `forceEmbedding` field + a global `--force-embedding` flag.
- 10 `vector-*` cases (psychiatric monographs: PTSD, OCD, panic, anorexia, GAD, Tourette,
postnatal, bipolar, ADHD, opioid) with forceEmbedding=true. Each is a clinical query that
must be answered by vector retrieval of the right monograph — verified live at
document_recall@5=1.0, content_recall@5=1.0, all via strategy=hybrid (embedding used).
Rationale: forcing embedding is the correct instrument for re-index measurement — you want
to measure the vector index directly, not have a lexical shortcut mask a regression. Wording
alone can't reliably force the vector path (the fast-path is driven by emergent lexical-match
strength), so the flag makes these probes deterministic.
Live golden eval: 34/34 pass (24 existing + 10 new), no regression. verify:cheap green (980).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wire forceEmbedding through eval runners and retrieval cache keys, bypass coverage/lexical shortcuts when forced, and add golden-case failure metrics so vector regressions cannot hide behind text-fast-path or cache hits.
…board
Delete post-extraction dead code left in the monolith and trim unused imports. Also fix minor lint issues in favourites-hub, visual-evidence, and services-navigator.
…-5c94
fix: complete public production access hardening for mobile and anonymous users
@supabase

supabaseBot 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 marked this pull request as ready for review July 5, 2026 17:04
@cursor

cursorBot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@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.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

Organizing open PRs (Jul 6): Retargeted base from closed #282 to \main. Branch needs rebase onto current main before merge.

@BigSimmo
BigSimmo changed the base branch from cursor/merge-access-to-main-5c94 to mainJuly 5, 2026 17:17
@BigSimmo
BigSimmoforce-pushed the cursor/desktop-answer-popups-3035 branch from 5bc1636 to 5e3735dCompareJuly 5, 2026 17:22
@cursor

cursorBot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@BigSimmo
BigSimmo enabled auto-merge July 5, 2026 18:07
Integrate main public API access, rate limiting, auth patterns, and
retrieval owner sentinel while preserving PR #286 desktop answer popup UX.
Includes Supabase drop-before-recreate fix for match_document_chunks_text
in migration 20260705210000.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

@cursorcursorBot 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Mobile follow-ups no longer shown
    • Restored composerFollowUpSuggestions, onPickComposerFollowUpSuggestion, and composerFollowUpSuggestionsDisabled props on MasterSearchHeader so mobile follow-up chips render in the phone footer dock again.
  • ✅ Fixed: Escape does not restore anchor focus
    • Added requestAnimationFrame focus restoration to the source preview popover's capture-phase Escape handler so focus returns to the source capsule after dismiss.

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit a017402. Configure here.

Comment threadsrc/components/ClinicalDashboard.tsx
Comment threadsrc/components/clinical-dashboard/source-preview-popover.tsx
- Re-wire composerFollowUpSuggestions props to MasterSearchHeader so
mobile answer follow-up chips render in the phone footer dock again.
- Restore anchor focus after Escape dismisses the desktop source preview
popover, matching sheet behavior and Playwright expectations.
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@copilot resolve the merge conflicts in this pull request

1 similar comment
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@copilot resolve the merge conflicts in this pull request

…-popups-3035
# Conflicts:
#	src/components/applications-launcher-page.tsx

CopilotAI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Done. Merged origin/main into the branch — there was one content conflict in src/components/applications-launcher-page.tsx (the selection initializer and selectedId logic). Resolved by keeping the branch's more complete version (lazy initializer with controlledQuery ?? "", detailOpen || guard) since the rest of the component depends on the isDashboardTools/variant/showDetailPanel refactor. Merge commit: dd0af81.

CopilotAI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Already resolved in the previous request - merge commit dd0af81 integrated origin/main and resolved the conflict in src/components/applications-launcher-page.tsx. The branch is now clean and up-to-date with main.

@BigSimmo
BigSimmo merged commit 0ee2e6d into mainJul 6, 2026
5 checks passed
@BigSimmo
BigSimmo deleted the cursor/desktop-answer-popups-3035 branch July 8, 2026 16:24
cursorBot pushed a commit that referenced this pull request Aug 8, 2026
…tionHeader rows
Conflict on docs/outstanding-issues.md: main owned #285 (jsdom/Node floor);
renumber this PR's authorizationHeader trap to #286 and bump next-id to 287.
cursorBot pushed a commit that referenced this pull request Aug 8, 2026
Resolve docs/outstanding-issues.md by keeping #285/#286 and next-id=287
from the branch (superset of main's single #285 row).
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursorBot pushed a commit that referenced this pull request Aug 8, 2026
…mode (#1760)
* fix(navigation): keep focus and search context when seeding the home mode
The cold-`/` seed rewrote the URL with `appModeSelectionHref(lastAppMode)` and
nothing else, so a visit carrying `focus=1` or scope/queryMode context lost it.
Seeding only runs when the URL names no mode or query, but those params can
still be present, and dropping them silently discarded a requested composer
focus and any scoped-search context.
Carry the parsed navigation context through, reusing readSearchNavigationContext
the same way the root and /medications routes already do.
Raised by CodeRabbit on PR #1744. The two sibling sites it flagged
(`(search-app)/page.tsx`, `medications/page.tsx`) already preserve the context;
this was the only one left.
The contract test pinned the old single-line replaceState call, so it now pins
the behaviour instead: replaceState rather than push, plus the context being
carried. Its fixed 1800-character slice window is gone too — the window had
already stopped covering the effect once the doc comment grew, which is exactly
how a source-contract test goes quietly blind.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wa7MTVhAJMztFMMhzJf2J4
* issues: record the web-container Node floor (#285), the pr-handoff-stop false regression (#286), and a third #255 reproduction
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wa7MTVhAJMztFMMhzJf2J4
* ledger: record the PR #1760 handoff for the home-mode seed follow-up
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wa7MTVhAJMztFMMhzJf2J4
---------
Co-authored-by: Claude <noreply@anthropic.com>
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 Aug 8, 2026
Presentations shell ownership is already local; DocumentViewer non-adoption
is already in search-chrome-behaviour.md. Add #286#288 to the recommended
execution queue and narrow the remaining owner decisions.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursorBot pushed a commit that referenced this pull request Aug 8, 2026
…1761)
* issues: capture the in-page nav series (#286 PR 2, #287 PR 3, #288 DocumentViewer decision) and correct #256#256's forms half is disproven against origin/main e71b23b: all six formSections
targetIds now render as element ids. Its differential-presentations half is still
live, and two DSM routes have the same defect and were never recorded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GyM49edHSNfm42u1SFDfG3
* issues: correct #256#288 after review (presentations + DocumentViewer)
Presentations shell ownership is already local; DocumentViewer non-adoption
is already in search-chrome-behaviour.md. Add #286#288 to the recommended
execution queue and narrow the remaining owner decisions.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo pushed a commit that referenced this pull request Aug 9, 2026
Resolves the duplicate #286 that made the PR un-mergeable. Main's
in-page-nav series claims #286-#288; this branch independently created
its own #286 for the authorizationHeader casing trap. Kept both sides and
renumbered the branch's row to #289, bumping issues:next-id to 290.
The auto-merge silently dropped the branch's #286 detail row rather than
conflicting on it -- only the recommended-queue hunk raised a marker. That
row is restored as #289. This is the silent row-loss mode archive row #112
describes: the guard catches duplicate ids but not a vanished one.
Also addresses review findings on the handover brief:
- Require the Clinical Governance Preflight for Phase 3 regardless of what
scripts/pr-policy.mjs classifies. AGENTS.md:257 keys the requirement to
behaviour -- source rendering and document access -- and Phase 3 changes
both. The classifier not matching src/components/** is the PR #1489 gap
recorded at pr-policy.mjs:62, not an exemption.
- Resolve the scope contradiction: the brief claimed everything stays in
src/components/document-viewer/** while Task 3 authorised wiring
src/app/api/images/signed-urls/route.ts, which is clinical-risk. That is
now an explicit, discouraged scope exception.
- Correct the signed-URL warning. Both identity bugs are already fixed on
main (authorizationIdentity() helper, identity in the dedupe key, cache
write outside the shared promise, tests/auth-signed-url-cache.dom.test.tsx).
The brief now says so and requires that coverage stay green, rather than
reading as an open disclosure with a "consider" remedy.
- Drop a literal NUL byte that had landed in the prose, and remove the
trailing-space code span (MD038).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ER2xPFzPzoS8fAxkgHC8yo
BigSimmo pushed a commit that referenced this pull request Aug 12, 2026
…system rows
Archived as verified-delivered or duplicate: #303, #284 (dup of #296), #149,
#159, #286, #287, #288, #256, #261, #291.
Re-scoped with re-measured evidence: #210 (gate was never missing; the defect
is the .next/dev types include), #262 (aliases 228 -> 193), #266 (counts moved,
23 unadopted holds), #275 (premise 'only one implementation' is false — the
values leaked to five files).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017paT42ZVMf8jaLtkjFxdy5
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.

3 participants

@BigSimmo@cursoragent