Commit Graph

32 Commits

Author SHA1 Message Date
lucaronin
5f2a6495db feat: AI chat panel 2026-02-21 10:38:41 +01:00
lucaronin
53558c2cbe fix(notelist): exclude Type from relationship groups
Type is a special relationship handled separately by the sidebar,
so it should not appear as one of the generic relationship groups
in the note list entity view. Added case-insensitive filter to
exclude the "type" key from the otherKeys loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:43:39 +01:00
lucaronin
bca6b3c8e8 docs: AI chat architecture + fix pre-existing build errors
Update docs/ARCHITECTURE.md with:
- AI Chat system architecture (context picker, streaming, MCP)
- WebSocket bridge protocol
- New files listing and data flow diagrams
- Updated tech stack table

Update mock-tauri.ts with richer AI chat mock responses
(context-aware summarize, expand, grammar responses).

Fix pre-existing TypeScript build errors:
- Add missing snippet/relationships to test VaultEntry fixtures
- Fix string|null → string type mismatches in Sidebar, NoteList, Inspector
- Remove unused imports (cn in Editor, AIChatPanel in App)
- Fix tryParseMarkdownToBlocks Promise cast

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:07: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
d0370731a6 feat(notelist): add Instances group for type documents in entity view
When viewing a type document (e.g., type/project.md) in entity view,
show an "Instances" relationship group listing all entries of that
type. For example, the Project type document shows all projects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:48:15 +01:00
lucaronin
05c840d6cf feat(notelist): pin type document at top in section group view
When viewing a section group (e.g., Projects), the corresponding type
document (type/project.md) is now pinned at the top of the NoteList
as a prominent card. Clicking it navigates to the type document.
Instances of that type are listed below.

This makes the type document the entry point for each category,
reinforcing the "types are files" mental model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:47:42 +01:00
lucaronin
2a564578a8 feat(ui): add Type color, icon, and sidebar section group
- Add Type to color maps (accent-blue) in typeColors.ts
- Add StackSimple icon for Type in NoteList, Inspector, and Sidebar
- Add "Types" section group to sidebar navigation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:45:54 +01:00
lucaronin
0053eb3009 feat: UI polish — typography, layout, and sidebar fixes
- font-mono-label: font-weight 500, remove letter-spacing
- NoteList: move timestamp below snippet in note items
- Sidebar: add border-r with sidebar-border color
- ResizeHandle: overlap sidebar border with -ml-1 (no visible gap)
- Sidebar items: text-muted-foreground for inactive group items
- NoteList: uniform 14px vertical padding across all note items
- NoteList header: fixed height 45px to match tab bar
2026-02-18 10:52:01 +01:00
lucaronin
45a6d8800a feat: move timestamp below title in NoteList items
Title now takes full width on top, with timestamp displayed below
in 10px muted text, followed by the snippet. Applies to both flat
list and context view items.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:56:41 +01:00
lucaronin
f30733932a feat: apply IBM Plex Mono to labels per design spec
Update NoteList group headers (RELATED NOTES, EVENTS, etc.) to use
font-mono-label class with bg-muted background bar per design.

Update Inspector section titles (Properties, Relationships, Backlinks,
History) and property labels (Type, Status, Modified, Words) to use
font-mono-overline class. Update status badge to IBM Plex Mono with
border-radius 16px per design spec.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:41:15 +01:00
lucaronin
2c4808851f fix: remove unused constants and fix BACKLINKS_KEY reference
Removes unused GROUP_PRIORITY and BACKLINKS_KEY constants, replaces
the reference with a string literal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:17:03 +01:00
lucaronin
63768d0a6b fix: handle wikilink aliases in resolveRefs and refsMatch
Strips the |display-text alias from wikilinks before matching (e.g.
[[essay/foo|Foo]] now correctly resolves to essay/foo.md). This was
preventing the Has, Topics, and other relationship groups from resolving
entries whose wikilink references included aliases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:16:19 +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
484f0672b0 feat: add type icons to NoteList items
Add a small (14px) Phosphor icon in the top-right corner of each note
item, colored by type using getTypeColor(). Uses the same icon mapping
as Sidebar: Wrench=Project, Flask=Experiment, Target=Responsibility,
ArrowsClockwise=Procedure, Users=Person, CalendarBlank=Event,
Tag=Topic, FileText=Note (default).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:45:34 +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
0f49886f4e feat: use dynamic type colors for active filter pills
Active filter pills now show the accent color matching the type they
represent, instead of hardcoded blue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:17:50 +01:00
lucaronin
ebc77002d2 feat: use dynamic type colors for selected note in NoteList
The selected note's border-left and background now reflect the note's
type color instead of hardcoded blue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:17:21 +01:00
lucaronin
60f2a545f1 perf: virtualize NoteList with react-virtuoso and add useMemo
Replace plain .map() rendering with Virtuoso for virtual scrolling of
9000+ notes. Add useMemo to all filtering/sorting chains (filtered,
sorted, searched, typeCounts, displayed). Use entry.snippet directly
instead of computing snippets from allContent. Wrap NoteList in
React.memo to prevent unnecessary re-renders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:14:36 +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
ab31076464 Add modified files view with Changes filter in sidebar
New "Changes" sidebar filter shows vault-wide uncommitted changes via
`get_modified_files` Tauri command (git status --porcelain). NoteList shows
modified files with M/A/D/? status indicators. Badge on sidebar shows count.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:56:28 +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
9d29959fba Add frameless window with custom drag regions (Obsidian-style)
Remove native macOS titlebar via decorations:false + titleBarStyle:overlay.
Add -webkit-app-region:drag to panel headers (Sidebar, NoteList, Editor tab
bar, Inspector) with no-drag on interactive elements. Sidebar header gets
78px left padding for macOS traffic light buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:00:29 +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
57083ad12c Add four-panel layout shell with vault scanning on load
- Sidebar (250px, resizable): navigation placeholder
- Note list (300px, resizable): displays vault entries from scan
- Editor (flex grow): placeholder for CodeMirror 6
- Inspector (280px, collapsible): properties/relationships placeholder
- Resizable panels with drag handles
- Calls list_vault on app load and displays results in note list

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