Skip to content

feat(search): a hit opens the card at its section and item - #72

Merged
JasprW merged 1 commit into
mainfrom
feat/search-focus
Oct 27, 2026
Merged

JasprW merged 1 commit into
mainfrom
feat/search-focus

Conversation

@JasprW

@JasprW JasprW commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Follow-up to #71 (idea accepted on card 搜索功能). Spec: SEARCH-SPEC §5.3, DRAWER-SPEC "Focus from search".

  • A hit row on the Search page opens the card at its section: summary → Progress, note → Activity, workpad → Workpad, idea → Ideas, artifact → Artifacts. Card-field hits just open the sidebar.
  • The target is made visible first: Activity widens its last-12 window back to the event, Workpad/Artifacts raise their page limit, Ideas opens Closed for an accepted or dismissed idea. Falls back to the section after 1.5 s.
  • Scrolls the target near the top (measureLayout against the scroll content; no animation with Reduce Motion) and rings it with the accent CueRing for about 1.6 s.
  • The section opens in the drawer's per-opening state only; the stored Starts open choices are never written. Any other way of opening a card clears the request.
  • Workpad search hits now carry the item id as refId.

Checks: npm run typecheck exit 0; npm test exit 0 (139 files, 1189 passed, 1 skipped); new client/drawer-focus-logic.test.ts and a workpad refId assertion in server/search.test.ts. The UI check on Tinylink runs after merge (the installed plugin is linked to the main checkout).

A search hit row now opens the card's sidebar at the matching section
(summary: Progress, note: Activity, workpad: Workpad, idea: Ideas,
artifact: Artifacts), makes the item visible (Activity's last-12 window,
Workpad/Artifacts pages, Ideas > Closed), scrolls to it and rings it for
a moment. The section opens for this opening only; the stored Starts open
choices are untouched. Falls back to the section after 1.5 s.

DRAWER-SPEC Focus from search; SEARCH-SPEC 5.3.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@JasprW
JasprW enabled auto-merge (squash) October 27, 2026 05:29
@JasprW
JasprW merged commit 876e7df into main Oct 27, 2026
3 of 4 checks passed
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