Commit Graph

40 Commits

Author SHA1 Message Date
lucaronin
1eccaf7f76 Add diff view toggle for modified files in editor
Editor tab bar shows Edit/Diff toggle button when viewing a modified file.
Diff view renders git diff output with green (added), red (removed), and
gray (context) line coloring. Uses `get_file_diff` Tauri command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:58:00 +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
9a15755b53 Add real git revision history to Inspector panel
Replace mock git history with real `git log` data via new `get_file_history`
Tauri command. Adds git.rs module with commands for file history, modified files,
file diff, commit, and push (all registered, later tasks wire up the UI).
Updates GitCommit type to include shortHash field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:54:11 +01:00
lucaronin
023a78ba14 Fix editor light mode + list bullet indentation
BUG 1: Replace all hardcoded dark-mode colors in editorTheme and
livePreviewTheme with CSS variables (--text-heading, --bg-primary,
--accent-blue, etc.) so the editor respects the light/dark toggle.
Remove oneDark theme import — the editor now derives all colors from
the app's CSS variable system.

BUG 2: Fix list indentation by changing .cm-line padding from
shorthand (which reset padding-left to 0) to explicit paddingTop/
paddingBottom, and add !important to list level paddingLeft rules
to win specificity over CodeMirror base styles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:02:28 +01:00
lucaronin
147dac1f34 Fix list indentation with hanging indent for wrapped lines
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:38:34 +01:00
lucaronin
b5971c9618 Add light/dark mode toggle with CSS variables
Replace all hardcoded colors across 10 CSS files with CSS variables defined
in index.css. Dark mode (default) uses the existing navy/purple palette,
light mode uses Notion-inspired warm neutrals from the design tokens
(--bg-primary: #FFFFFF, --bg-sidebar: #F7F6F3, --text-primary: #37352F).

Toggle button (sun/moon) in the sidebar header persists preference to
localStorage. An inline script in index.html applies the saved theme
before React mounts to prevent flash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:34:59 +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
2a841df5ac Editor overhaul: Bear/Obsidian-style live preview
- Headers keep enlarged font size on active line (# marker shown in subtle gray)
- Unordered list "-" rendered as "•" bullet widget
- Clickable checkbox widgets for "- [ ]" / "- [x]" task lists
- Nested list vertical guide lines for indented items
- Improved typography: 15px base, 1.7 line-height, spacious 40px padding
- Softer active line highlight, thicker cursor
- Mock data enriched with checkboxes and nested lists for testing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:20:05 +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
9c49c3eea9 Add comprehensive E2E tests for all core flows (M5 Task 5)
17 new tests covering: open note in editor, sidebar filtering, search,
multiple tabs with switching/closing, inspector properties/relationships/
backlinks/git history, preview snippets, and full create note flow.
Fixed test isolation with workers=1. Total: 44 E2E + 44 unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:29:04 +01:00
lucaronin
582e33542d Add comprehensive E2E tests for all core flows (M5 Task 5)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:27:32 +01:00
lucaronin
6d07b7afe3 Refine visual polish: blue accent states, tab hover, editor hints (M5 Task 4)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:26:58 +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
343b075b07 Add keyboard shortcuts: Cmd+N, Cmd+S, Cmd+W, Cmd+P (M5 Task 3)
Cmd+N opens create note dialog, Cmd+S shows save toast,
Cmd+W closes active tab, Cmd+P opens quick open palette.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:19:38 +01:00
lucaronin
218a13b859 Add quick open palette with fuzzy search (M5 Task 2)
Cmd+P opens a VS Code-style search palette overlay with fuzzy matching
across all note titles. Arrow keys to navigate, Enter to select, Esc to close.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:17:38 +01:00
lucaronin
7b9d52d970 Add create note dialog with type selector (M5 Task 1) 2026-02-14 21:14:16 +01:00
lucaronin
2c981a0a30 Add git revision history panel to inspector (M4 Task 4)
Show mock git history per file: commit hash (monospace), relative
date, commit message, author. Added GitCommit type, mock git
history generator, and 'View all revisions' placeholder.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:53:52 +01:00
lucaronin
0d03c6a2ae Add backlinks panel to inspector (M4 Task 3)
Scan all vault content for wikilinks referencing the current note
(by title, alias, filename stem, or path). Display backlinks as
clickable links with type badges and count. Added get_all_content
mock handler for content scanning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:50:23 +01:00
lucaronin
a357edf1b2 Add relationships panel to inspector (M4 Task 2)
Show belongsTo and relatedTo from frontmatter as clickable links
that navigate to the referenced note. Empty state when no
relationships exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:47:19 +01:00
lucaronin
b379e23c8b Add properties panel to inspector (M4 Task 1)
Show selected note metadata: type, status (colored pill), owner,
cadence, modified date, word count (computed from content minus
frontmatter), and placeholder 'Add property' button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:45:42 +01:00
lucaronin
1a2068562a Add clickable wikilinks that navigate between notes
- [[wikilinks]] rendered as styled blue text with brackets hidden
- Brackets revealed when cursor is on the wikilink line (reveal-on-focus)
- Clicking a wikilink opens the linked note in a new tab
- Navigation matches by title or alias (case-insensitive)
- Uses CM6 Facet to pass navigation callback to widget DOM listeners
- Add Playwright test verifying wikilink styling and click navigation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:32:37 +01:00
lucaronin
daa7d4d0c1 Add wikilinks: render [[links]] as styled clickable elements
Wikilinks are detected via regex, rendered as styled spans with hidden
brackets, and navigate to the linked note on click. Uses mousedown
instead of click to catch the event before CM6 removes the widget.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:30:45 +01:00
lucaronin
f3b6b4ed4a Hide YAML frontmatter from editor view
- Add frontmatterHide extension that hides --- ... --- block at top of files
- Shows collapsed --- indicator, reveals on cursor focus
- Place initial cursor after frontmatter so content is visible on load
- Remove frontmatter detection from livePreview (handled by dedicated extension)
- Add Playwright test for frontmatter hiding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:25:02 +01:00
lucaronin
94530e9161 Hide YAML frontmatter in editor, reveal on cursor entry
- Add frontmatterHide extension using CM6 StateField for cross-line replacement
- Frontmatter (--- ... ---) collapsed to small "---" indicator when cursor is outside
- Cursor entering the frontmatter block reveals full YAML content
- Editor places cursor after frontmatter on note load so it starts hidden
- Add Playwright test verifying frontmatter is hidden by default

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:24:57 +01:00
lucaronin
eb87c0d223 Add tab bar with open/close/switch for multi-note editing
- Replace single selectedNote with tabs state in App (open/close/switch)
- Tab bar above editor: title + x close button, active tab highlighted
- Clicking note opens new tab or switches to existing
- Closing active tab switches to adjacent tab
- Fix race condition: editor re-creates when tab content loads async
- Add Playwright test verifying multi-tab behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:15:44 +01:00
lucaronin
72bc90e3be Add live preview with reveal-on-focus for markdown syntax
- Implement Obsidian/Bear-style live preview via CM6 ViewPlugin + decorations
- Headings: ## markers hidden, text rendered large — revealed on cursor line
- Bold/italic: ** and * markers hidden, text styled — revealed on cursor line
- Links: [text](url) rendered as styled text — revealed on cursor line
- Inline code: backticks hidden, content styled with monospace — revealed on cursor line
- Horizontal rules rendered as styled <hr> elements
- Add Playwright test verifying reveal-on-focus behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:11:47 +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
97499088b3 Add TOPICS section to sidebar
Flat list of Topic entities at the bottom of the sidebar,
separated from section groups by a border. Clicking a topic
fires onSelect with kind: 'topic'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:42:46 +01:00
lucaronin
3f89d31720 Add sidebar filters (All Notes, People, Events, Favorites, Trash) 2026-02-14 19:38:38 +01:00
lucaronin
3871cb5ba1 Add sidebar section groups (PROJECTS, EXPERIMENTS, RESPONSIBILITIES, PROCEDURES)
Each section is collapsible with expand/collapse toggle, shows entity count,
and has a + button. Entities are clickable. SidebarSelection type introduced
for managing navigation state across filters, section groups, entities, and topics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:35:10 +01:00
lucaronin
463caf02ba Update CLAUDE.md with full project context and architecture notes 2026-02-14 19:01:53 +01:00
lucaronin
e72d66ae64 Add Tauri mock layer for browser testing and visual verification workflow 2026-02-14 18:54:27 +01:00
lucaronin
bc75647c82 Remove unused Vite scaffold files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 18:25:20 +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
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
lucaronin
6b53cf8f50 Initialize Tauri v2 + React + TypeScript project with vault scanner
- Scaffold Vite + React + TypeScript frontend
- Add Tauri v2 backend with Rust
- Implement list_vault command: recursively scans .md files, parses
  YAML frontmatter (Is A, aliases, Belongs to, Related to, Status,
  Owner, Cadence), extracts title from H1 or filename
- 10 passing Rust tests for frontmatter parsing and vault scanning
- Configure Vitest and Playwright (test infrastructure)

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