- 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>
Split Inspector.tsx (score 7.78) into:
- Inspector.tsx: slim shell with header, layout, prop wiring (score 9.6)
- InspectorPanels.tsx: DynamicRelationshipsPanel, BacklinksPanel,
GitHistoryPanel, LinkButton, RelationshipGroup (score 8.87)
Extracted LinkButton as reusable component for both relationship
refs and backlinks. Moved resolveRefProps to simplify RelationshipGroup.
Extracted AddRelationshipForm and extractRelationshipRefs as focused units.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Break up the monolithic useNoteActions hook (cc=37, 232 LoC, score 6.89) into:
- useTabManagement: owns tab state and all tab operations (score 9.53)
- mockFrontmatterHelpers: extracted and simplified YAML manipulation (score 9.09+)
- useNoteActions: now focused on note creation and frontmatter operations (score 9.22)
Key improvements:
- Extracted entryMatchesTarget() to reduce wikilink matching complexity
- Deduplicated replaceKeyInLines/removeKeyFromLines into processKeyInLines
- Converted buildNewEntry to use object param (was 5 positional args)
- Overall complexity reduced from cc=37 to cc=11 in useNoteActions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When pressing Enter in the inline tab rename input, handleSave was
called twice: once from the keydown handler and again from the blur
event triggered when React unmounted the input (editingPath → null).
The second rename call found the old path already deleted/moved,
producing empty content that overwrote the correctly renamed file
in MOCK_CONTENT — causing the editor to show a blank note.
Added a committedRef guard to InlineTabEdit so handleSave only
executes once per edit session.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
onClick={onCreateNote} passes the React MouseEvent as the first arg
to handleCreateNoteImmediate(type?), which treats it as a truthy type
string. generateUntitledName then calls .toLowerCase() on the event
object, throwing a TypeError and silently aborting note creation.
Wrap both NoteList and TabBar onClick handlers to call with no args.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When viewing a commit diff from git history, the GitBranch toggle in the
breadcrumb bar was disabled if the file had no unstaged changes, leaving
no way to return to the editor. Now the toggle stays active whenever
diffMode is true, and a visible "Back to editor" button appears at the
top of the diff view for better discoverability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two frames added to design/git-history.pen:
- "Git History — Commit List": shows inspector panel with clickable
hashes (primary color, underlined), relative dates, commit messages,
and author name (muted, small) on each commit row
- "Git History — Diff Open": shows diff view with breadcrumb bar
displaying file path and commit badge, plus colored diff lines
(red for removed, green for added)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add get_file_diff_at_commit Rust command to show diff at a specific commit
- Make shortHash in GitHistoryPanel a clickable button that opens DiffView
- Show author name below commit message (small, muted)
- Remove disabled "View all revisions" button
- Wire onLoadDiffAtCommit through Editor → Inspector → App.tsx
- Add mock handler for get_file_diff_at_commit in browser mode
- Fix pre-existing missing `order` field on trashed mock entries
- Update Inspector tests for new behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests double-click → inline edit → Enter saves, and Escape cancels.
Both tests pass with visual screenshot verification.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two frames added:
- "Note Creation — Before (dialog)" — old flow with CreateNoteDialog
- "Note Creation — After (immediate)" — new flow with instant Untitled note
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add trashed, trashedAt, and order properties that were missing from
test entry objects after those fields were added to the VaultEntry type.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the CreateNoteDialog flow with immediate creation. Clicking + or
pressing Cmd+N now instantly creates an "Untitled note" (type=Note) and
opens it as the active tab. Sidebar section + buttons create "Untitled
<type>" for that section's type. Editor auto-focuses after creation so
the user can start typing immediately.
Product decisions:
- Title naming: "Untitled note", "Untitled note 2", etc. for conflicts
- Sidebar section +: creates with that section's type directly
- Editor focus via custom event to avoid stealing focus on regular tab switches
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend implementation for renaming a note:
- Updates H1 heading and title frontmatter to new name
- Renames file using slugified new title
- Scans all vault .md files and replaces [[OldTitle]] → [[NewTitle]]
in both content and frontmatter (preserves pipe aliases)
- Returns new path and count of updated files
Well-factored with extracted helpers: build_wikilink_pattern,
replace_wikilinks_in_content, collect_md_files, update_h1_title,
update_note_title_in_content, frontmatter_has_title_key, to_path_stem.
All 147 tests pass including 7 new rename tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set the window backgroundColor to #F7F6F3 (same as --sidebar CSS variable)
in the Tauri window config. With titleBarStyle "Transparent", this makes
the native macOS title bar area match the sidebar background color instead
of defaulting to white.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Add `truncate` and `min-w-0` Tailwind classes to property value elements
in the properties panel so long text is shown on a single line with
ellipsis. The full value is visible via the title attribute on hover.
Affected elements:
- EditableValue display span (main property values)
- Status pill in DynamicPropertiesPanel
- Type button in DynamicPropertiesPanel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add archive/unarchive toggle button to the BreadcrumbBar (Archive icon
for normal notes, ArrowUUpLeft icon for archived notes). Add cmd+e
keyboard shortcut to toggle archive state of the active note.
Refactored useAppKeyboard to use action map pattern (reduces cyclomatic
complexity) and extracted BreadcrumbActions from BreadcrumbBar to split
rendering complexity across two functions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
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>