Skip to content

Card tags on one line with a +N popover; click a tag to search it - #197

Merged
davior merged 1 commit into
mainfrom
claude/pensive-wright-8umpu5
Sep 30, 2026
Merged

davior merged 1 commit into
mainfrom
claude/pensive-wright-8umpu5

Conversation

@davior

@davior davior commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #196. When a card had a two-line title and tags that wrapped onto two rows, the title got cut off.

Root cause: in the fixed-height card, the title, dates and tags were all shrinkable flex children, so extra tag rows squeezed the title (measured on the old code: the title box was 1.58 lines and clipped).

Changes

  • Tags on one line. Whole chips only; whatever would wrap is clipped and counted in a +N circle at the bottom right. Clicking the circle opens a popover with every tag (opens upward, closes on outside click / Escape / scroll). A single very long tag truncates inside its chip.
  • Title can no longer be squeezed. Header, dates and title are non-shrinkable, so only the preview gives way — a two-line title always keeps both lines, whatever the tags do.
  • Click a tag to search it. Any tag (in the card row, in the popover, and in the list view) runs a search for tags:"<name>", filling the search box and putting it in the URL like any other search.
    • That exact form runs as a direct tag filter (POST /notes/search), rather than going through the AI. This also makes it work with no AI provider configured — the plain-keyword fallback only searches titles and bodies, never tags.
    • Matching is loose (the backend's existing substring match), so #raman also finds confocal-raman.
  • TagChip gets a clickTitle prop so its tooltip ("Search this tag") fits the caller.

Interpretation to confirm: the request said to search on "category with the tag name inside quotes". I took that to mean the tags: search syntax (tags:"name"), since a tag isn't a category. Easy to change if something else was meant.

Testing

  • tsc --noEmit clean; vitest 169/169 (new smartQuery.test.ts covers building/parsing the tag query).
  • Reproduced the bug on the old code, then verified in Chromium against a mocked API (23 checks): title keeps 2 lines with a one-row tag strip (was 1.58 clipped), preview shows whole lines, badge count is correct, popover contents/close behavior/placement, popover and chip clicks search without opening the note, search ran as a direct tag filter, loose matching, list-view tag click, and phone width.
  • Not tested against the real backend.

🤖 Generated with Claude Code

https://claude.ai/code/session_016UqmgUYdnBJ6ahmmJmWcNc


Generated by Claude Code

- Card view: tags are a single row of whole chips. Anything that would wrap is
  clipped and counted in a "+N" circle at the bottom right; clicking it opens
  a popover listing every tag (opens upward, closes on outside click/Escape/scroll).
- Fix the cause of the squeezed title: the title/dates/header are now
  non-shrinkable in the fixed-height card, so only the preview gives way and a
  two-line title is never cut off, whatever the tags do.
- Clicking any tag (card, popover, or list view) searches tags:"<name>". That
  exact form runs as a direct tag filter, so it also works with no AI provider
  configured (the keyword fallback only searches titles/bodies). Partial tag
  matches are fine, per the backend's existing substring match.
- TagChip gets a clickTitle prop so its tooltip fits the caller.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016UqmgUYdnBJ6ahmmJmWcNc
@davior
davior marked this pull request as ready for review September 30, 2026 13:19
@davior
davior merged commit 348634a into main Sep 30, 2026
2 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.

2 participants