Skip to content

Search: add editable pins menu - #1631

Merged
BigSimmo merged 40 commits into
mainfrom
codex/editable-search-pins
Aug 5, 2026
Merged

Search: add editable pins menu#1631
BigSimmo merged 40 commits into
mainfrom
codex/editable-search-pins

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the composer + action menu with a responsive Pins and search surface.
  • Let users create, edit, delete, and locally persist named pins containing useful app destinations.
  • Keep current-mode search, universal search, alternate-mode search, and mode actions explicit and separate from pin navigation.
  • Add the three responsive design studies, their implementation plan/specification, and focused DOM/storage coverage.
  • Make the search-results band contract classify mockups from repository-relative paths so worktree folder names cannot exempt production files.
  • Babysit follow-up: fix the unresolved review findings for custom-body focus, custom-body dialog/test semantics, full mode-action reachability, and phone gating for the universal command action.

Verification

  • PR-local selection completed on the current-main merged tree.
    • Runtime/lock parity, changed-file formatting, documentation contracts, ledger/outstanding-issue guards, lint, and typecheck passed.
    • Full unit suite: 508 files passed; 5,341 tests passed and 3 skipped.
    • The unified runner then stopped only because the verified local dev server was running; after stopping that project-owned process, the uncompleted production build and fixture stages passed directly.
    • Production build compiled successfully, generated 1,701 static pages, and passed client-secret surface checks; 36 offline RAG fixtures across 23 suites passed.
    • An earlier feature-head npm run verify:pr-local also completed as a single command with exit 0 in 434 seconds.
  • Focused pin regression suite: node scripts/run-vitest.mjs run tests/search-pins-menu.dom.test.tsx tests/search-pins.test.ts --reporter=dot
    • PASS: 2 files, 10 tests.
  • npm run typecheck
    • PASS after the final storage-fallback and pin-limit fixes.
  • Babysit follow-up formatting: npm run format
    • PASS; no additional files remained modified outside the scoped fix.
  • Babysit follow-up unit gate: npm run test
    • PASS: 508 files passed; 5,343 tests passed and 4 skipped.
  • Responsive browser QA at 320, 390, 639, 768, 1440, and 1920 CSS px.
    • No horizontal overflow; phone sheet remained contained; Escape restored focus; expanding a pin did not change search mode; create/edit/delete and explicit global search worked; no console errors.
  • Phone-chrome focused contracts and journey.
    • Static contracts: 116 passed.
    • Browser selection initially passed 12/13 with one unrelated short-runway geometry flake while this menu was closed; the exact failed journey then passed on retry (1/1).
  • UI verification not completed: a separate npm run verify:ui attempt exceeded the 20-minute shell window and returned no full-matrix result. Focused responsive owner/journey evidence is listed above; hosted CI remains required.
  • Release verification not run: this is a draft PR, not a release operation.
  • Physical iPhone Safari and installed-PWA acceptance were not run; Chromium emulation is not treated as that proof.

Risk and rollout

  • Risk: bounded UI navigation and browser-preference behavior. Pins are stored only in local storage; no patient data, server schema, API, retrieval, ranking, or clinical answer behavior changes.
  • Rollback: revert feat(search): add editable pins menu and, if needed, the babysit follow-up commit da3e1b70cfe1d5f6c40e535a56ff37bd7ffa4d42.
  • Provider or production effects: GitHub branch and PR metadata only; no deployment or production mutation.

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

RAG impact: no retrieval behaviour change — this changes UI navigation, user-owned local preferences, and explicit search-mode controls only; retrieval selection and ranking are untouched.

Notes

  • Local exact-head merge audit passed against origin/main at 68d477ed45fa3484ded70f29c41cbc46d0cef1c7 with no failures; audited head a9b2aaed38c621788b05bfef982ab26cc53785a3.
  • Babysit follow-up merged origin/main at b03b51d7b22671f2734115b5fef469bd2e932ae3, then pushed fix commit da3e1b70cfe1d5f6c40e535a56ff37bd7ffa4d42.
  • Review ledger outcome: no remaining findings in the editable pins production integration and mockup scope.

Summary by CodeRabbit

  • New Features

    • Added editable search pins with naming, destination selection, expansion, deletion, persistence, and synchronization.
    • Added “Pins and search” controls for current/global search, search modes, and actions.
    • Added interactive desktop, tablet, and phone mockups for pin menu designs.
    • Added routes for the new mockup experiences.
  • Bug Fixes

    • Improved focus restoration and accessibility for menus, dialogs, and drawers.
    • Improved responsive command-surface behavior across touch and pointer devices.
  • Documentation

    • Documented mockup routes, design decisions, implementation status, and review records.
  • Tests

    • Added coverage for pin management, persistence, responsive mockups, focus handling, and accessibility.

@supabase

supabase Bot commented Aug 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 ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 32 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

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

Run ID: 5ff67add-a5d1-4683-9cb7-c09ef6591a42

📥 Commits

Reviewing files that changed from the base of the PR and between 88c6472 and 867226a.

📒 Files selected for processing (5)
  • docs/branch-review-ledger.md
  • docs/site-map.md
  • src/app/mockups/mockups-layout-client.tsx
  • src/components/ui/sheet.tsx
  • tests/sheet.dom.test.tsx
📝 Walkthrough

Walkthrough

The change adds persisted editable search pins, integrates a pins-and-search popup with responsive focus handling, and adds two interactive mockup routes with design documentation and tests.

Changes

Editable search pins

Layer / File(s) Summary
Search-pin data and menu
src/lib/search-pins.ts, src/components/clinical-dashboard/search-pins-menu.tsx, tests/search-pins*, tests/search-pins-menu.dom.test.tsx
Adds normalized browser persistence and an editable pins menu with destination, search, mode, limit, validation, and action flows.
Pins-and-search popup integration
src/components/clinical-dashboard/master-search-header.tsx, src/components/clinical-dashboard/mode-action-popup.tsx, src/components/ui/sheet.tsx, src/components/ClinicalDashboard.tsx, src/components/clinical-dashboard/universal-search-command-surface.tsx, src/components/clinical-dashboard/use-command-dropdown-displayable.ts, src/app/globals.css, related tests
Integrates the pins menu into the action popup and updates responsive rendering, ARIA semantics, keyboard navigation, dropdown availability, and focus restoration.
Interactive menu mockups
src/components/search-lens-menu-mockups.tsx, src/components/pinned-plus-menu-mockups.tsx, docs/superpowers/specs/*, docs/superpowers/plans/*, tests/*mockups.dom.test.tsx
Adds responsive prototypes for search-lens interactions and pinned-plus-menu designs, with editing, selection, dismissal, and accessibility tests.
Mockup routing and inventory
src/app/mockups/*, src/app/mockups/mockups-layout-client.tsx, docs/site-map.md, docs/branch-review-ledger.md, tests/search-results-band-adoption.test.ts, .design-sync/config.json
Adds mockup routes, hides shared chrome on those routes, updates route documentation and design-sync metadata, and scopes mockup-path detection to the repository.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant MasterSearchHeader
  participant ModeActionPopup
  participant SearchPinsMenu
  participant BrowserStorage
  User->>MasterSearchHeader: open Pins and search
  MasterSearchHeader->>ModeActionPopup: render custom body
  ModeActionPopup->>SearchPinsMenu: display pins and search controls
  SearchPinsMenu->>BrowserStorage: read or persist normalized pins
  SearchPinsMenu-->>MasterSearchHeader: select destination, mode, or action
Loading

Possibly related PRs

Suggested labels: codex

Suggested reviewers: cursoragent

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.72% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding an editable pins menu.
Description check ✅ Passed The description covers the required summary, verification, risk, rollback, governance, and notes sections with clear evidence and documented verification limits.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

CI triage

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

  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Production UI criticalneeds 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 #8204 (cancelled).

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

@BigSimmo
BigSimmo marked this pull request as ready for review August 5, 2026 16:13
@BigSimmo
BigSimmo enabled auto-merge (squash) August 5, 2026 16:13
sentry[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@BigSimmo

BigSimmo commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. The only repository destination is BigSimmo/Database, and the only branch destination is the pull request head branch codex/editable-search-pins at starting commit a9b2aae; never publish fixes to a detached or synthetic work branch and never create a stacked pull request. Use the authenticated GitHub connector to commit each approved fix to BigSimmo/Database:codex/editable-search-pins, then verify that the pull request head contains the published commit before reporting success. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. For a fixed thread, reply with as the first line and as the second line. For a no-code disposition, use followed by . These result markers authorize the workflow to close that exact thread only after it verifies a fixed commit is the pull request head; a local-only commit is not a fix. If publication or verification fails, do not use either result marker, do not claim success, and leave the thread open with the blocker. If human input or new authorization is required, do the same. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: a9b2aaed38

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cursoragent and others added 3 commits August 5, 2026 16:33
…-pins

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

cursoragent and others added 2 commits August 5, 2026 17:00
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

cursoragent and others added 6 commits August 5, 2026 17:12
…-pins

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cursoragent and others added 2 commits August 5, 2026 17:33
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
coderabbitai[bot]

This comment was marked as resolved.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

BigSimmo and others added 12 commits August 6, 2026 02:04
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Address the last open review findings and residual polish: sheet autofocus
for the first pin, null-detail pin sync that re-reads storage, Escape closing
the editor first, confirm-before-delete, safer pin ids/defaults, scoped
mode-action body scroll, shared command-dropdown displayability, and dead
mode-select wiring cleanup.
Keep the null-detail pin sync fix while preserving the broader review
follow-up changes on the local tip.
Resolve the leftover conflict hunk so null-detail CustomEvents re-read
storage without resurrecting default pins.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append the branch-review ledger row for tip 193afe6 after clearing the
remaining pins-menu review threads.
… codex/editable-search-pins

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Derive dropdown displayability from the shared media hook plus an eager
focus override, clearing the override on blur or when media becomes
undisplayable so lint no longer flags a cascading render.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Keep the nullable eager focus override for first-focus races, clear it on
blur/undisplayable so media state can take over again, and drop the
setState-in-effect mirror that failed Static PR lint.
devin-ai-integration[bot]

This comment was marked as resolved.

cursoragent and others added 6 commits August 5, 2026 18:26
…-pins

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Keep eager dropdown overrides from sticking false across resize, depend on
custom-body truthiness for stable placement measurement, and retain the last
written pin list in tab session memory when localStorage writes fail.
Combine the parallel review fixes for eager displayability, session pin
memory, and stable custom-body placement, restore the test session reset
helper, and avoid jsdom URL resolution in the placement contract test.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
… codex/editable-search-pins

# Conflicts:
#	src/lib/search-pins.ts
#	tests/mode-action-popup.dom.test.tsx

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
coderabbitai[bot]

This comment was marked as resolved.

cursoragent and others added 4 commits August 5, 2026 18:40
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Resolve site-map and mockups-layout conflicts by keeping both the pins
menu studies and the phone-mode-sheet-yes chrome suppressions from main.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo merged commit ce3bd2d into main Aug 5, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the codex/editable-search-pins branch August 5, 2026 19:17
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.

2 participants