Commit Graph

42 Commits

Author SHA1 Message Date
Test
c56a8c0e7f fix: hide type note from note list, make header clickable to access it
When browsing a type section (e.g. "Book"), the type-defining note
(types/book.md) no longer appears as a PinnedCard in the note list.
Instead, the header title becomes clickable to navigate to the type note.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:44:03 +01:00
Test
cd1246d43c fix: multiselect uses only Shift+click; add Cmd+Del/Cmd+E bulk actions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 22:49:29 +01:00
Test
4672fcb5c0 fix: add traffic light clearance to note list header when sidebar is collapsed
When the sidebar is hidden (editor-list view mode), the NoteList becomes
the leftmost panel and its header title overlaps with macOS traffic lights.
Add 80px left padding to the NoteList header when sidebarCollapsed is true,
matching the sidebar title bar's existing traffic light clearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 22:43:19 +01:00
Luca Rossi
a6140fe277 fix: revert notelist subtitle to show snippet instead of metadata (#118)
The metadata subtitle (date + word count) from #94 was only intended for
search results. Reverts NoteItem and PinnedCard to show first 2 lines of
note content with a date line underneath.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-27 15:27:38 +01:00
Luca Rossi
9523bbdb54 feat: add multi-select notes with bulk archive and trash actions (#125)
* design: add multi-select notelist wireframes

Three frames: selected notes with bulk action bar, Shift+click range
select, and empty selection / hover states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add multi-select notes with bulk archive and trash actions

Cmd/Ctrl+Click toggles individual note selection, Shift+Click selects
a range, Escape clears. A bulk action bar appears at the bottom with
Archive and Trash buttons. Includes useMultiSelect hook, BulkActionBar
component, Rust batch_archive_notes/batch_trash_notes commands, and
9 new tests covering the multi-select behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: trigger GitHub Actions run

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-27 14:14:21 +00:00
Luca Rossi
4664f3360e feat: note subtitle — show metadata (date + word count) (#94)
* feat: show metadata subtitle (date + word count) instead of snippet

Replace the note list subtitle with a compact metadata summary showing
relative date and word count (e.g. "2d ago · 342 words") instead of
the first paragraph of note content. Adds word_count to VaultEntry on
the Rust backend, computed during vault scan.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: cargo fmt formatting

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:50:29 +00:00
Luca Rossi
d6b7343dac feat: status property — Notion-style dropdown with color chips (#97)
* fix: resolve search panel freeze by making search_vault async

The search_vault Tauri command was synchronous (fn, not async fn),
blocking the main thread for 30+ seconds during hybrid/semantic
search on large vaults (9200+ files). This caused the macOS beachball.

Changes:
- Make search_vault async with tokio::spawn_blocking (runs qmd off main thread)
- Cache collection name per vault path (avoid repeated qmd collection list calls)
- Cancel inflight searches and debounce timers when panel closes
- Add regression test for stale result cancellation on panel close

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* design: add status property dropdown wireframes

Three frames: closed pill state, open dropdown with suggested/vault
statuses, and custom status creation flow.

Also bump flaky NoteList 9000-entry test timeout from 15s to 30s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: replace status text edit with Notion-style dropdown

- Extract STATUS_STYLES to shared statusStyles.ts utility
- New StatusDropdown component: filterable popover with colored pills
- StatusPill reusable component for consistent status chip rendering
- Vault-wide status aggregation from entries prop
- Dropdown shows "From vault" and "Suggested" sections
- Custom status creation via type-and-Enter
- Escape/backdrop click cancels without saving
- Keyboard navigation (ArrowUp/Down + Enter)
- 22 new tests covering dropdown behavior + integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: cargo fmt

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:40:27 +00:00
lucaronin
a6b8602fff fix: make backlinks update reactively when wikilinks are added or removed
Backlinks previously relied on scanning allContent (raw markdown), which
was empty in Tauri mode until notes were explicitly saved. Now outgoing
wikilink targets are extracted during Rust vault scan and stored on
VaultEntry. The frontend useBacklinks hook uses this indexed data, and
outgoingLinks update in real-time on content change.

- Add extract_outgoing_links() in Rust parsing + outgoing_links field on VaultEntry
- Add extractOutgoingLinks() TypeScript utility for real-time updates
- Rewrite useBacklinks to use outgoingLinks instead of scanning raw content
- Add cache version invalidation to force rescan on format change
- Extract useEditorSaveWithLinks hook to keep App.tsx under code health threshold

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:07:04 +01:00
lucaronin
62c8d0f7a8 fix: pass modifiedFiles to NoteList so Changes view filters correctly
App.tsx passed getNoteStatus but not modifiedFiles to NoteList.
The Changes view uses modifiedPathSet (derived from modifiedFiles) to
filter entries, so it was always empty — showing "no pending changes"
even with modifications present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:03:40 +01:00
lucaronin
9a8b2d930a feat: distinguish new notes (green dot) from modified notes (orange dot)
New notes created in-session show a green dot; existing notes with
uncommitted git changes show an orange dot. Saving a new note clears
the green dot; git commit clears the orange dot.

Introduces NoteStatus type ('new' | 'modified' | 'clean'), extracts
useNewNoteTracker hook and resolveNoteStatus pure function, and adds
onNoteSaved callback to useEditorSave for clearing new-note tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:02:22 +01:00
lucaronin
4c031bdb8b test: add tests for Changes view + design wireframes
- NoteList: 4 tests for changes filter (shows only modified, header,
  empty state, real-time update on rerender)
- StatusBar: 2 tests for onClickPending callback + accessibility
- Sidebar: 3 tests for Changes nav item visibility + click handler
- design/vista-changes.pen: 3 frames (pending notes, empty state,
  real-time update)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:32:23 +01:00
lucaronin
f1398133ee test: add tests for modified note indicators
- NoteList: 4 tests for modified indicator dot visibility
- TabBar: 3 tests for modified indicator on tabs
- StatusBar: 3 tests for pending count display
- useEditorSave: 2 tests for onAfterSave callback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:34:58 +01:00
lucaronin
c5a76ed03c fix: increase timeout for 9000-entry virtuoso test to 15s 2026-02-23 21:56:25 +01:00
lucaronin
9f9cf7cec1 test+design: add virtual list tests and design wireframes
Add 7 new tests covering virtual list behavior with large datasets:
- 9000-entry rendering without crash
- Items rendered via Virtuoso mock
- Search filtering on large dataset
- Sorting correctness with large dataset
- Section group filtering with mixed types
- Selection highlighting in virtualized list
- Click handler on virtualized items

Add design/performance-note-list.pen with 4 frames:
1. Default state — 9000+ notes with scrollbar
2. Scrolled mid-list — items 4500+
3. Search filtering — active query narrowing results
4. Empty search result — no matching notes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:56:25 +01:00
lucaronin
4447a8a873 feat: click opens note in current tab, Cmd+Click opens new tab
Regular click on a note in NoteList now replaces the current tab content
instead of always creating a new tab. Cmd+Click (or Ctrl+Click) opens
in a new tab. If the note is already open in any tab, clicking just
switches to that tab regardless of modifier key.

- NoteItem: simplified to accept single onClickNote callback
- NoteList: routes click via metaKey/ctrlKey to onReplaceActiveTab or onSelectNote
- useTabManagement: handleReplaceActiveTab checks all tabs before replacing
- Extracted loadAndSetTab/isTabOpen/routeNoteClick helpers for code health

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:12:54 +01:00
lucaronin
efd79e9a3d fix: resolve all ESLint errors (lint now exits 0)
- useAppKeyboard: move all logic inside useEffect, fixes refs-in-render
  and no-unused-expressions for view mode shortcut handler
- SettingsPanel: refactor to inner component to fix setState-in-effect;
  remove unused maskKey function
- NoteList: remove re-exports (consumers import from noteListHelpers directly);
  fix no-unused-expressions in toggleGroup; eslint-disable for Icon-in-render
- useNoteActions: eslint-disable tabsRef.current assignment (valid pattern)
- Test files: fix no-explicit-any in useKeyboardNavigation, useSettings,
  useVaultLoader, wikilinks tests; update NoteList.test import path
2026-02-23 08:53:43 +01:00
lucaronin
163a5606b6 test: add tests for sort direction behavior
- getSortComparator with explicit asc/desc direction for all sort modes
- Direction arrows visible in dropdown menu
- Clicking direction arrow reverses sort order in the list
- Direction persistence verified through sort behavior
- Direction icon shown on sort button

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 08:35:30 +01:00
lucaronin
5bbd1469e2 fix: resolve TypeScript build errors in refactored code and test mocks
- Remove unused cn import from NoteList.tsx
- Fix SidebarSelection type narrowing in NoteList entity view
- Fix SortableSection onToggle type in Sidebar Omit type
- Fix TypeRow isA prop to accept null
- Align useEntryActions handleUpdateFrontmatter value type
- Add missing trashed/trashedAt/order to test mock VaultEntry objects

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:00:07 +01:00
lucaronin
cc1631c368 feat: draggable section groups in sidebar 2026-02-21 18:36:28 +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
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
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
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
311c5e434b feat: archive notes — filter sidebar, hide archived, relationship indicators 2026-02-21 16:44:09 +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
f36cfd1808 feat: add icon and color fields to VaultEntry
- Add icon (string|null) and color (string|null) to VaultEntry interface
- Update Rust VaultEntry struct and frontmatter parsing to read icon/color
- Add icon/color to SKIP_KEYS so they don't appear as relationships
- Set mock data: Recipe type → cooking-pot/orange, Book type → book-open/green
- Update all test files with the new required fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:23:10 +01:00
lucaronin
2286385244 fix: resolve TypeScript build errors across components
Fix null-safety issues (string | null → string), add missing VaultEntry
fields in test fixtures, remove unused imports, and fix type assertion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:02:04 +01:00
lucaronin
7da76688d2 feat: use generic relationships map in NoteList context view
Updates buildRelationshipGroups to use the new relationships map from
VaultEntry instead of only belongsTo/relatedTo. Now shows Has, Topics,
and all other wikilink-containing frontmatter fields as groups. Group
order: Has, Children, Events, Topics, other fields alphabetically,
Referenced By, Backlinks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:11:01 +01:00
lucaronin
f0a8f7d014 feat: implement context view in NoteList
When a note is selected from the sidebar (entity selection), NoteList
now shows a context view instead of a flat list:

- Prominent top card with type-colored background, bold title, snippet,
  timestamp, and type icon
- Grouped relationship sections (Children, Events, Referenced By,
  Belongs To, Related To, Backlinks) with collapse/expand chevrons
- Backlinks detected by scanning allContent for wikilink references
- Groups show ALL-CAPS headers with count and CaretDown/CaretRight toggle
- Normal flat list shown when sidebar selection is "All Notes"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:47:38 +01:00
lucaronin
1c0bb2a71c feat: remove type filter pills from NoteList
Remove the filter pills row ("All 12", "Projects 1", etc.) and all
associated filtering logic (typeFilter state, typeCounts memo, displayed
memo, TYPE_PILLS constant). The note list now always shows all notes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:44:03 +01:00
lucaronin
f613335f97 feat: add snippet field to frontend types and mock data
Add snippet: string to VaultEntry TypeScript interface to match the
Rust backend. Update mock data with snippets for all entries. Add
.laputa-cache.json to .gitignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:14:29 +01:00
lucaronin
d8b91522bb Remove dark mode — force light mode only
- Remove .dark CSS variables block from index.css
- Remove theme toggle state and Cmd+Shift+T shortcut from Sidebar
- Remove dark class initialization from main.tsx
- Hardcode BlockNote theme to 'light' in Editor
- shadcn dark: classes left in place (harmless, no-op without .dark class)
2026-02-17 11:03:23 +01:00
lucaronin
6989f44031 feat: migrate to shadcn/ui
Install Tailwind CSS v4 + shadcn/ui with Radix UI primitives. Migrate all
UI components (Sidebar, NoteList, Editor tabs, Inspector, dialogs, palette)
from BEM CSS to Tailwind utility classes and shadcn components (Button,
Input, Dialog, Badge, etc.). Map theme system to shadcn CSS variables while
preserving BlockNote editor styles untouched. Remove 8 old CSS files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:56:44 +01:00
lucaronin
7e29b2e314 Add grouped relationship display in note list for entity views
When a Project/Responsibility/Procedure/Experiment is selected in the sidebar,
the note list now groups related items by relationship type (Children, Events,
Referenced By, Belongs To, Related To) instead of showing a flat list. The entity
title is shown in the header, type filter pills are hidden, and search works
within groups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:30:13 +01:00
lucaronin
ba511e4011 Add count badges to filter pills and hide empty types
Each type pill now shows its item count (e.g. "Notes 2"). Pills for types
with zero items are hidden. The "All" pill shows the total count. Counts
are computed from the search-filtered results so they update dynamically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:05:19 +01:00
lucaronin
82f1be8793 Add visual polish: snippets, dates, colored badges, improved states (M5 Task 4)
Note list items now show preview snippets and relative dates. Type badges
have distinct colors (blue=Project, purple=Responsibility, etc.). Selected
state uses a blue left border. Active pill uses blue highlight. Hover
effects improved across sidebar and note list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:22:54 +01:00
lucaronin
7b9d52d970 Add create note dialog with type selector (M5 Task 1) 2026-02-14 21:14:16 +01:00
lucaronin
bc2dd10f9e Add CodeMirror 6 editor with dark theme and note selection
- Install CM6 packages (state, view, lang-markdown, theme-one-dark, commands, language)
- Replace Editor placeholder with real CodeMirror 6 instance
- Add realistic markdown content to all mock entries in mock-tauri.ts
- Wire up note selection: clicking a note in NoteList loads its content in the editor
- Dark theme matching app colors, line numbers, active line highlighting, line wrapping
- Update NoteList with selected state styling
- Update Playwright screenshot test to capture editor with note selected

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:07:23 +01:00
lucaronin
05550e8a11 Add type filter pills to note list
Pill bar below search: All | Projects | Notes | Events | People |
Experiments | Procedures | Responsibilities. Clicking a pill filters
the displayed entries by isA type. "All" resets the filter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:48:59 +01:00
lucaronin
b343330cb7 Add sort by last modified and search bar to note list
Default sort: last modified descending (pinned entity stays first
in entity view). Search bar at top filters by title substring
(case-insensitive).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:46:44 +01:00
lucaronin
085b9089f3 Add note list filtering by sidebar selection
- All Notes → show everything
- People/Events filters → show entities of that type
- Section group header → show all entities of that type
- Specific entity → pinned at top with green border + children
- Topic → show entries whose relatedTo references that topic
- Wikilink reference matching (belongsTo/relatedTo → path stem)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:44:39 +01:00
lucaronin
7d5c48c2a8 Add unit and E2E tests for all panel components
- Vitest tests for Sidebar, NoteList, Inspector (7 tests)
- Playwright E2E tests verifying four-panel layout renders (2 tests)
- All tests passing: cargo test (10), pnpm test (7), pnpm test:e2e (2)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 18:25:11 +01:00