Commit Graph

284 Commits

Author SHA1 Message Date
lucaronin
caa26b658b design: rename-note-tab wireframes
Three frames showing the tab rename interaction:
1. Normal tab state (double-click hint)
2. Editing mode (inline input with ring border, text selected)
3. Saved state (new title, file renamed, wiki links updated)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 19:08:03 +01:00
lucaronin
fb3cdf2bab design: merge customize-sections-design frames into ui-design.pen 2026-02-21 19:01:52 +01:00
lucaronin
cadc284432 feat: improve customize sections design — Sections label with icon right-aligned 2026-02-21 19:01:41 +01:00
lucaronin
8bcae95e3f feat: wiki-links in editor inherit type color instead of always blue 2026-02-21 19:00:12 +01:00
lucaronin
540a2d8123 design: customize-sections-design wireframes
Added before/after frames to design/customize-sections-design.pen showing
the sidebar section header redesign:
- Before: "Customize sections" button with inline icon + text
- After: "SECTIONS" uppercase heading label with settings icon right-aligned

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:42:22 +01:00
lucaronin
770937affd fix: properties panel fills full window height 2026-02-21 18:41:20 +01:00
lucaronin
6e20244078 fix: properties panel fills full window height
The Inspector aside element was missing flex-1, so it only grew to
its content height instead of filling the full height of its parent
flex-col container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:40:45 +01:00
lucaronin
081f1e5743 feat: replace 'Customize Sections' label with 'Sections' header
Changed the sidebar section header from a button-style "Customize sections"
label with inline icon to a clean "Sections" heading with the settings icon
pushed to the far right. The settings icon still toggles the customize
popover — no functionality change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:40:06 +01:00
lucaronin
96252b66eb design: merge draggable-section-groups frames into ui-design.pen 2026-02-21 18:36:34 +01:00
lucaronin
cc1631c368 feat: draggable section groups in sidebar 2026-02-21 18:36:28 +01:00
lucaronin
79ada08275 design: merge draggable-tabs frames into ui-design.pen 2026-02-21 18:35:19 +01:00
lucaronin
66754c2dcd feat: draggable tabs with localStorage persistence 2026-02-21 18:35:13 +01:00
lucaronin
b46baaae10 design: merge trash-notes frames into ui-design.pen 2026-02-21 18:34:55 +01:00
lucaronin
09609eff55 feat: trash notes — sidebar filter, breadcrumb buttons, cmd+del shortcut, demo vault data 2026-02-21 18:34:40 +01:00
lucaronin
3752a0be0f test: add breadcrumb trash/restore button tests
Tests verify:
- Trash button shows for non-trashed notes
- Restore button shows for trashed notes
- onClick callbacks fire correctly for both

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:37:53 +01:00
lucaronin
d475143e8a feat: breadcrumb trash/restore buttons and cmd+del shortcut
- Added trash icon button in breadcrumb bar for non-trashed notes
- Added restore (arrow counter-clockwise) button for trashed notes
- Trash button sets trashed=true and trashed_at in frontmatter
- Restore button removes trashed/trashed_at from frontmatter
- Added Cmd+Delete keyboard shortcut to trash active note
- Wired handlers through Editor -> App with vault entry updates
- Toast notifications for trash/restore actions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:37:15 +01:00
lucaronin
3764bbd14b feat: add trashed notes to demo vault
Added 3 trashed notes with trashed_at dates in frontmatter:
- note-old-meeting-notes.md (trashed 2026-02-10)
- note-deprecated-workflow.md (trashed 2026-01-15)
- experiment-failed-podcast.md (trashed 2026-02-05)

These provide realistic test data for the trash feature in the demo vault.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:34:35 +01:00
lucaronin
a10589fb6c fix: sidebar collapse toggle and update tests for DnD
- Fix toggleSection to account for default collapsed state
  (collapsed[type] ?? true, not just !prev[type])
- Update tests to expand sections before asserting item visibility
  (sections start collapsed by default)
- Add tests for section ordering by Type entry order property
- Add test for drag handle rendering on section headers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:33:36 +01:00
lucaronin
f805c7d1bf feat: draggable section groups in sidebar
- Wrap sidebar section groups in @dnd-kit sortable context
- Add grip-vertical drag handle visible on hover of section headers
- Sort sections by `order` property from Type document entries
- On drag end, compute new sequential order values and persist to
  each Type document's frontmatter via handleReorderSections
- Add onReorderSections callback from Sidebar → App.tsx → vault

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:29:42 +01:00
lucaronin
1dfbbb8a9e feat: add order property to VaultEntry and install @dnd-kit
- Add `order: number | null` to VaultEntry (TS) and VaultEntry (Rust)
- Add order to Frontmatter struct and SKIP_KEYS in vault.rs
- Update all mock Type documents with order values (0-10)
- Add order: null to all non-Type mock entries and test fixtures
- Install @dnd-kit/core, @dnd-kit/sortable, @dnd-kit/utilities

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:27:19 +01:00
lucaronin
f929c51445 test: add TabBar drag-and-drop unit tests
Tests cover: rendering all tabs, draggable attribute, reorder on DnD,
no-op when dropping in same position, and tab switching on click.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:24:46 +01:00
lucaronin
d8283184c1 feat: draggable tabs with localStorage persistence
- TabBar: HTML5 drag-and-drop on tab elements (grab/grabbing cursor,
  0.5 opacity on dragged tab, 2px primary-color drop indicator)
- useNoteActions: handleReorderTabs splices tab array, saves order
  to localStorage under "laputa-tab-order" key
- Tab order auto-persists on every change; restored on mount
- Wired through Editor → App props chain

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:24:01 +01:00
lucaronin
004201cdc8 fix: tauri devUrl to match vite port 5201 2026-02-21 17:23:26 +01:00
lucaronin
580ce5bcc0 design: draggable section groups wireframes
Three frames showing drag interaction flow:
1. Default sidebar with grip-vertical drag handles on section headers
2. Mid-drag state with blue drop indicator line and floating section overlay
3. After-drop state showing reordered sections

Order persisted as "order" property in Type document frontmatter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:21:49 +01:00
lucaronin
f8cc097a58 design: draggable tabs wireframes
Three frames added to design/draggable-tabs.pen:
1. Default state — tabs with grab cursor hint
2. Dragging state — tab at 0.5 opacity, 2px primary-color drop indicator
3. After drop — reordered tabs, localStorage persistence note

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:21:38 +01:00
lucaronin
1071daef7d feat: purge_trash() — auto-delete notes trashed for 30+ days on startup 2026-02-21 17:15:01 +01:00
lucaronin
f4feac3b08 feat: sort notes by property in relationship subsections 2026-02-21 17:14:18 +01:00
lucaronin
af40fba1b0 feat: add purge_trash command to delete stale trashed files
Adds purge_trash(vault_path) that scans all .md files, reads the
"Trashed at" frontmatter date, and deletes files older than 30 days.
Registered as a Tauri command and called automatically on app startup
(defaults to ~/Laputa vault). Includes 7 tests covering boundary
conditions, nested dirs, and datetime formats.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:14:02 +01:00
lucaronin
c1102c508a content: add createdAt values and varied statuses to mock data
All MOCK_ENTRIES now have realistic createdAt timestamps (always before
modifiedAt). Stock Screener status changed to 'Paused' for sort-by-status
testing variety.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:12:53 +01:00
lucaronin
74649f29c5 test: add tests for sort notes functionality
Tests for getSortComparator (6 tests):
- Sort by modified date descending
- Sort by created date descending (with fallback)
- Sort by title alphabetically
- Sort by status with priority ordering
- Status sort with modified-date tiebreaker

Tests for NoteList sort controls (6 tests):
- Sort button visible in flat list header
- Sort dropdown per relationship subsection
- Sort menu opens with all options
- Sort order changes on option selection
- Menu closes after selection
- Relationship subsection sorting works

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:12:45 +01:00
lucaronin
5a8952c290 feat: sort notes by property in relationship subsections
Each relationship subsection header now has a sort dropdown control
(ArrowsDownUp icon + current sort label). Users can choose to sort by:
- Modified date (default, newest first)
- Created date (newest first)
- Title (alphabetical A-Z)
- Status (Active > Paused > Done > Finished)

The sort control also appears in the main note list header for flat
list views. Sort preferences are persisted per group in localStorage.

Also updates mock data with varied createdAt/status values for testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:09:29 +01:00
lucaronin
4868972093 design: sort-notes wireframes
Two feature frames added:
- "Sort Notes — picker closed": default state with sort button in subsection header
- "Sort Notes — picker open": dropdown popover with sort options (Modified, Created, Title, Status)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:08:39 +01:00
lucaronin
9a627c7295 fix: editor content not appearing on first load (flushSync lifecycle fix) 2026-02-21 17:08:00 +01:00
lucaronin
01c89f3646 test: regression tests for flushSync-in-lifecycle editor bug
Add unit test verifying content blocks are applied via deferred microtask
(not synchronously in useEffect). Convert debug E2E test into a proper
regression test that checks editor content appears after clicking a note
and no flushSync errors are logged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:07:30 +01:00
lucaronin
1c0e471839 design: sort-notes wireframes
Shows sort control UI for relationship subsection headers:
- Default state: sort icon + current sort label in header bar
- Open state: dropdown popover with options (Modified, Created, Title, Status)
- Selected option highlighted with check icon

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:06:30 +01:00
lucaronin
102a7233d2 wip: initial fix attempt for editor content not appearing on first load 2026-02-21 17:04:11 +01:00
lucaronin
b05f679c5d fix: remove unused Trash import from NoteList
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:57:44 +01:00
lucaronin
8121bbf468 test: add tests for trash notes filtering and UI
- Added filterEntries tests: trash excluded from all/section/topic/archived,
  trash filter returns only trashed entries
- Added NoteList render tests: trash header, TRASHED badge, 30-day warning
  banner, empty trash state
- Updated all test files with trashed/trashedAt fields on VaultEntry mocks
- Updated useNoteActions to include trashed/trashedAt on new entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:56:48 +01:00
lucaronin
2a01f44374 feat: trash notes — sidebar filter, list view, relationship indicators
- Sidebar: replaced disabled Trash placeholder with active filter showing
  count badge and destructive color when selected
- Sidebar: trashed notes excluded from section groups and All Notes count
- NoteList: trash filter shows only trashed entries with TRASHED badge
- NoteList: 30-day warning banner when expired trash notes exist
- NoteList: per-note warning text for notes past 30-day retention
- Inspector: trash icon shown before name in relationship pills for
  trashed entries, with (trashed) label and dimmed styling
- Inspector: backlinks show trash icon for trashed entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:54:59 +01:00
lucaronin
66a15e4ddb feat: add trashed/trashedAt fields to VaultEntry
- Added trashed (boolean) and trashedAt (timestamp) to TypeScript VaultEntry
- Added 'trash' filter to SidebarSelection union type
- Added trashed/trashed_at fields to Rust VaultEntry struct and Frontmatter parser
- Added 3 trashed mock entries for visual testing (recently trashed,
  30+ days old, and dropped experiment)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:52:28 +01:00
lucaronin
8573e9b35d content: add type documents to demo-vault-v2 (mirrors production vault) 2026-02-21 16:50:58 +01:00
lucaronin
7bee41847f design: trash notes wireframes
Added 4 frames to design/trash-notes.pen:
- Sidebar filter showing Trash with count badge and destructive color
- Note list view with TRASHED badge and 30-day warning state
- Relationship indicator with trash icon prefix for trashed refs
- 30-day auto-delete warning banner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:50:39 +01:00
lucaronin
11db4f3527 feat: sidebar section groups collapsed by default 2026-02-21 16:47:10 +01:00
lucaronin
311c5e434b feat: archive notes — filter sidebar, hide archived, relationship indicators 2026-02-21 16:44:09 +01:00
lucaronin
07e730f172 feat: customize which type sections are shown in sidebar 2026-02-21 16:41:34 +01:00
lucaronin
4f56873201 test: add tests for sidebar section visibility customization
Tests cover:
- Customize button renders
- Popover opens with toggles for all sections
- Hiding a section removes it and its items from sidebar
- Re-showing a section restores it
- Persistence to/from localStorage
- Hidden sections don't affect top nav (All Notes, Favorites)
- Popover closes on outside click

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:38:35 +01:00
lucaronin
b73bda1aa9 feat: customize which type sections are shown in sidebar
Adds a "Customize sections" button above section groups in the sidebar.
Clicking it opens a popover with per-type toggle switches. Hidden sections
disappear from the sidebar entirely but notes remain accessible via
All Notes and search. Visibility state is persisted in localStorage.

- New useSectionVisibility hook: manages hidden sections set in localStorage
- Sidebar: "Customize sections" button + popover with toggle UI
- Outside-click closes the popover
- allSectionGroups (built-in + custom) filtered by visibility before render

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:37:00 +01:00
lucaronin
41b28a19eb fix: disable native WebKit context menu in Tauri to allow custom right-click menus 2026-02-21 16:36:45 +01:00
lucaronin
a28e4528bd fix: add archived field to all VaultEntry test fixtures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:36:18 +01:00
lucaronin
c0bb2ded0e feat: archive notes UI — filter, sidebar hiding, relationship indicators
- Add Archive filter in sidebar with count badge
- Hide archived notes from section groups and All Notes count
- Exclude archived notes from sectionGroup and topic filtering
- Show (archived) indicator on relationship chips and backlinks
- Show ARCHIVED badge on note list items
- Display 'Archive' header in NoteList when filter is active

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:36:14 +01:00