Improve desktop answer popup UX - #286
Conversation
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
…ned evidence modal entrance.
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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. |
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
BigSimmo
commented
Jul 5, 2026
Organizing open PRs (Jul 6): Retargeted base from closed #282 to \main. Branch needs rebase onto current main before merge. |
5bc1636 to
5e3735dCompareBugbot 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. |
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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- 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
commented
Jul 6, 2026
@copilot resolve the merge conflicts in this pull request |
1 similar comment
BigSimmo
commented
Jul 6, 2026
@copilot resolve the merge conflicts in this pull request |
…-popups-3035 # Conflicts: # src/components/applications-launcher-page.tsx
Done. Merged |
Already resolved in the previous request - merge commit |
Defer focus restoration until after the scope popover unmounts, and use double requestAnimationFrame in dismissable layers so Escape reliably returns focus to the answer options trigger.
Uh oh!
There was an error while loading. Please reload this page.
…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>
…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>
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
…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

Summary
Redesigns desktop answer popups: anchored source preview popover (no layout reflow) and refined evidence review modal entrance.
Changes
SourcePreviewPopover— portaled, anchor-positioned, Escape/outside dismiss, focus return, chevron rotationsm:max-w-3xl, stronger backdrop,dialog-riseanimationsm:bg-black/50backdrop on desktop (follow-up commit)#answer-evidence-drawer<details>fallback fromopenEvidenceDrawer()(follow-up commit)role="dialog"; desktop Escape + toggle dismissCommits
dc3a15430— core popup UX (popover, sheet animation, mockup, tests)5e3735dce— polish clinical/safety sheets + drawer fallback cleanup (2 files only)Verification
Preview
/mockups/answer-evidence-popups