Skip to content

Folder tree filter, right-click add menus, and reworked card layout - #196

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

Folder tree filter

  • New filter box (with a clear "x" at the end of the line; Escape also clears) on both folder trees: the left Folders panel and the folder picker modal (Move to…). It is deliberately not on the folder icon bar.
  • Shows only folders whose name matches, plus their ancestors up to the root. "All notes" (the root) always shows.
  • Branches open automatically while filtering, without touching the saved expanded/collapsed state, so clearing the filter restores the tree as it was.

Right-click menus

  • Right-click a folder in the tree, the "All notes" row, or a folder-bar chip → the folder menu opens at the cursor (New subfolder / dynamic folder / note, Import Markdown, Import URL, plus Move / Customize / Delete), targeting that specific folder. The Archive Bin and archived/dynamic folders keep their restricted menus.
  • Right-click empty background in the notes view → a create-only menu (same five items) for the current folder. Right-clicking a note card or a link keeps the browser's own menu.
  • The menu is now one shared FolderMenu component (viewport-clamped, closes on Escape / outside click) used by the tree, the folder bar and the background. This also means folder-bar chips' ⋮ menu now includes the create items, matching the tree.

Card view layout

  • Adds a Created date; dates sit on their own line under the category badge (Created … · Modified …, wraps on narrow cards, full timestamp on hover).
  • Title moves up to the top-left under the dates and allows 2 lines before the ellipsis.
  • Preview text sits directly under the title; tags are pinned to the bottom of the card.

Testing

  • tsc --noEmit clean; vitest 164/164 (new folderTree.test.ts covers filter, prune and menu-target helpers).
  • Drove the real UI in Chromium against a mocked API (53 checks): filtering incl. collapsed folders / no-match / clear / Escape, tree + chip + background right-click menus and their targets, viewport clamping, picker modal filter, and card geometry (order, 2-line clamp, tags at bottom, no overlap) in light, dark and phone width.
  • Not tested against the real backend.

🤖 Generated with Claude Code

https://claude.ai/code/session_016UqmgUYdnBJ6ahmmJmWcNc


Generated by Claude Code

- Filter box (with clear "x" and Escape) on both folder trees: the left
  panel and the folder picker modal. Keeps matches plus their ancestors;
  "All notes" always shows. Branches auto-open while filtering without
  touching the saved expanded state.
- Right-click on tree folders, "All notes", and folder-bar chips opens the
  folder menu at the cursor (create items for that folder). Right-click on
  empty notes background opens a create-only menu for the current folder.
  Note cards keep the browser's own context menu.
- Extract the folder menu into a shared FolderMenu (viewport-clamped,
  Escape/outside-click to close) used by the tree, folder bar and background.
- Card view: add Created date on its own line under the category, move the
  title to the top under it (2 lines before ellipsis), preview directly
  below, tags pinned to the bottom.
- Unit tests for the filter/prune/menu-target helpers.

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 12:50
@davior
davior merged commit f44ff20 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