Commit Graph

130 Commits

Author SHA1 Message Date
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
c6265cf888 feat: add Inter font import and IBM Plex Mono CSS utility classes
Add Inter to Google Fonts import alongside IBM Plex Mono. Update root
font-family to use Inter as primary. Add .font-mono-label (11px/600/ls1.2)
and .font-mono-overline (10px/500/ls1.5) utility classes per design spec.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:41:08 +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
06e6964da3 feat: add relationships field to TypeScript VaultEntry and mock data
Adds `relationships: Record<string, string[]>` to the VaultEntry
interface. Updates mock data with realistic relationship fields (Has,
Topics, Owner, Notes) and adds essay mock entries for testing the
context view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:08:42 +01:00
lucaronin
99069be0d3 feat: parse generic relationships from frontmatter wikilinks
Adds a `relationships: HashMap<String, Vec<String>>` field to VaultEntry
that captures ALL frontmatter fields containing wikilinks (e.g. Has,
Topics, Events, Notes, Buckets, Highlights). Handles both single string
and array values. Known non-relationship keys (Is A, aliases, Status,
etc.) are skipped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:07:02 +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
2eb0705f00 feat: show type label on relationship items in Inspector
Each related note in the Relationships section now displays the note
title on the left and the type label on the right.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:21:20 +01:00
lucaronin
3939ba1e97 feat: increase Inspector section spacing to 16px with flex gap
Replace individual mb-4 margins with a flex column gap-4 on the
container, ensuring consistent 16px spacing between Inspector sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:20:26 +01:00
lucaronin
444dd03ca6 refactor: use shared getTypeColor utility in Sidebar
Replace inline color strings in SECTION_GROUPS and the string-replace
hack for light colors with the shared typeColors utility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:18:41 +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
952d8afd05 feat: add shared type color utility for note type→color mapping
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 18:16:47 +01:00
lucaronin
6068c188e1 Added grouping of relationships in note list, and improved design here and there 2026-02-17 18:14:07 +01:00
lucaronin
02ff193988 fix: handle sync return from tryParseMarkdownToBlocks
The method returns blocks directly (not a Promise) in the current
BlockNote version, causing 'then is not a function' error.
2026-02-17 18:04:18 +01:00
lucaronin
9ba862fdda chore: remove accidentally committed demo-vault and scripts from tracking 2026-02-17 18:01:16 +01:00
lucaronin
408e23f572 fix: use prosemirrorView check for editor mount and simplify content swap 2026-02-17 18:00:18 +01:00
lucaronin
91659ad56b fix: editor content not displaying after single-instance refactor
The single BlockNote editor instance was calling replaceBlocks before the
editor was mounted in the DOM, causing content swaps to silently fail.
Now tracks mount state via editor.onMount() and defers content swaps
until the editor is ready. Also guards against stale async parses when
the user switches tabs before markdown parsing completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:56:57 +01:00
lucaronin
b239de3719 fix: prevent crash when opening notes
Move setActiveTabPath after tab content is loaded to prevent Editor's
useEffect from firing before the tab exists in the tabs array. Add
try/catch around editor.replaceBlocks for defensive error handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:52:10 +01:00
lucaronin
829cd2ad95 feat: add vault switcher in status bar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:45:31 +01:00
lucaronin
2f59d1d6c8 perf: single editor instance with document swapping
Replace per-tab BlockNote instances with one shared editor that swaps
content via replaceBlocks(). Cached blocks per tab path make subsequent
switches instant — only first open parses markdown. Cache entries are
cleaned up when tabs close.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:38:57 +01:00
lucaronin
0714184e3c perf: keep tab editors mounted for instant switching (Obsidian pattern)
Instead of unmounting/remounting BlockNoteTab on every tab switch
(via key={activeTabPath}), render all open tabs simultaneously and
toggle visibility with CSS display:none/block. This eliminates
editor recreation and markdown re-parsing on switch. Also adds a
loading skeleton for new tabs and uses a ref for tabs to avoid
stale closures in handleSelectNote.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:32:57 +01:00
lucaronin
b74771aa8f perf: fix resize jank with RAF throttle and React.memo on Sidebar
Add requestAnimationFrame throttling to ResizeHandle so mouse move
events are batched per frame instead of triggering setState on every
pixel. Wrap Sidebar in React.memo so it skips re-rendering when only
the parent wrapper div width changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:14:50 +01:00
lucaronin
2f6bc97cf5 perf: memoize Editor component and wikilink suggestion items
Wrap Editor in React.memo to prevent re-renders from parent width
changes. Memoize the base wikilink items array with useMemo so it
only recomputes when entries change, not on every keystroke.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:14:43 +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
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
a5a152ff25 feat: add incremental vault cache and snippet extraction
Add VaultEntry.snippet field (first ~160 chars of content, markdown-stripped).
Implement scan_vault_cached() with git-based incremental caching:
- Writes .laputa-cache.json to vault dir
- On same HEAD: returns cached entries + uncommitted new files
- On different HEAD: re-parses only changed files via git diff
- Falls back to full scan when git unavailable or cache corrupt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:06:26 +01:00
lucaronin
1f8740e4af feat: add native macOS title bar with transparent overlay
- Use titleBarStyle: Transparent for native window frame on top
- Add paddingTop: 38px to Sidebar to make room for title bar
- Keep solution simple: native traffic lights + dragging work out-of-the-box
- Removed custom traffic lights and drag handlers
2026-02-17 16:55:23 +01:00
lucaronin
517148f2a6 feat: replace sidebar header with native macOS title bar (38px) 2026-02-17 16:39:23 +01:00
lucaronin
1a627877db feat: detect layout/structural changes in design-diff-analyzer
- Detect new components added (frames with names)
- Detect components removed
- Detect height/structural changes
- Add high-priority layout tasks

Now catches additions like macOS title bar that were previously missed.
2026-02-17 16:36:02 +01:00
lucaronin
40b0d4f867 feat: add macOS title bar to UI design 2026-02-17 16:33:14 +01:00
lucaronin
348b028e2a fix: use dynamic color-coding for active note states based on type 2026-02-17 14:24:13 +01:00
lucaronin
7d4f21e260 feat: add semantic analysis to design-diff-analyzer
- Detect design patterns (color-coding systems, contrast improvements, spacing)
- Analyze design intent and explain **why** changes were made
- Add critical warnings for dynamic implementations (e.g., color-coding must be type-based, not hardcoded)
- Include intent analysis in output for Claude Code

This helps Claude Code understand the **system** behind changes, not just apply spot modifications.
2026-02-17 14:22:31 +01:00
lucaronin
a7b6726964 feat: update sidebar colors and spacing - accent colors, increased gaps 2026-02-17 14:12:56 +01:00
lucaronin
b143dc9d98 updated the design 2026-02-17 14:09:44 +01:00
lucaronin
123ba66f6e fix: convert design-diff-analyzer to ES modules
- Use import instead of require (package.json has type: module)
- Fixes script execution for post-commit hook
2026-02-17 14:08:04 +01:00
lucaronin
0b3d190644 feat: sidebar redesign - chevron right, remove section badges, align groups 2026-02-17 13:47:48 +01:00
lucaronin
5c7c06705f feat: update Sidebar to match design - traffic lights, wrench icon, proper indentation 2026-02-17 13:45:09 +01:00
lucaronin
cfa4754f29 feat: auto-implement design changes via post-commit hook
- Add scripts/design-diff-analyzer.js to detect design changes
  • Analyzes ui-design.pen diff (colors, typography, spacing, layout)
  • Generates implementation tasks for Claude Code
  • Distinguishes content-only changes (no implementation)
- Add .git/hooks/post-commit to spawn Claude Code automatically
  • Triggers when ui-design.pen is committed
  • Spawns isolated sub-agent with auto-notify on completion
  • 10min timeout, auto-cleanup after done
- Update install-hooks.sh to install post-commit hook
- Document full workflow in .github/HOOKS.md

Workflow: commit design → analyzer runs → Claude Code spawns → implements → notifies Brian → Brian notifies Luca
2026-02-17 13:27:09 +01:00
lucaronin
81d00395db design: extend note preview text in mockup
- Note 1: 'modern stack...' → 'modern stack and updated visual language...'
- Note 2: 'hiring priorities...' → 'hiring priorities with the engineering team leads...'

Changes are cosmetic mockup text only, no code implementation needed.
2026-02-17 13:22:34 +01:00
lucaronin
d79b1f62eb fix: update pre-commit hook to detect MCP config
- Check for CodeScene in ~/.claude/mcp.json (MCP setup)
- Fallback to ~/.codescene/token (CLI setup)
- Now works with standard Claude Code + CodeScene MCP
2026-02-17 13:17:23 +01:00
lucaronin
f47dcd56ee docs: add README and shareable git hooks
- Add README.md with quick start, docs links, dev workflow
- Add .github/hooks/ with installable pre-commit hook
- Add install-hooks.sh script for easy setup
- Hook checks code health, warns on large changes
- Documentation in .github/HOOKS.md
2026-02-17 13:14:20 +01:00
lucaronin
70fcc8594e feat: add pre-commit hook for CodeScene quality checks
- Add .git/hooks/pre-commit with CodeScene integration
- Warns on large file changes (>500 lines)
- Suggests Claude Code + MCP for detailed analysis
- Bypassable with --no-verify or [skip codescene]
- Add .github/HOOKS.md documentation
2026-02-17 13:13:28 +01:00
lucaronin
544415e1fa fix: remove non-existent CodeScene GitHub Action
- CodeScene doesn't have an official GitHub Action
- Use local CodeScene CLI or MCP tools instead
- Other checks (tests, coverage, lint, docs) still enforced
2026-02-17 13:11:26 +01:00
lucaronin
e7c4563200 feat: add comprehensive documentation and CI/CD pipeline
- Add docs/ with ARCHITECTURE, ABSTRACTIONS, GETTING-STARTED, THEMING
- Add GitHub Actions workflow with automated quality checks:
  • Tests (frontend + Rust)
  • Coverage (70% threshold)
  • Code Health (CodeScene delta analysis)
  • Documentation check (warning only)
  • Lint & Format (ESLint + Clippy + rustfmt)
- Configure coverage in vite.config.ts (v8 provider, 70% threshold)
- Add test:coverage script to package.json
- Install @vitest/coverage-v8
- Update CLAUDE.md with docs-update requirement
- Add CI/CD setup guides in .github/
2026-02-17 13:10:43 +01:00
lucaronin
f9d9bdabf7 refactor: decompose Inspector.tsx into EditableValue, DynamicPropertiesPanel, and frontmatter utils 2026-02-17 12:12:32 +01:00