Commit Graph

1432 Commits

Author SHA1 Message Date
Test
a0fc97e5cf feat: release channels (alpha/beta/stable) via PostHog feature flags
- Add `release_channel` to Settings (Rust + TypeScript)
- Add channel selector in Settings panel (alpha/beta/stable)
- Pass `release_channel` as PostHog person property on identify
- Add `isFeatureEnabled()` helper: alpha always true, beta/stable
  use PostHog flags with hardcoded fallback defaults
- Update `useFeatureFlag` to delegate to PostHog-backed evaluation
  (localStorage overrides still work for dev/QA)
- Create ADR-0042 (supersedes ADR-0017)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.568
2026-04-03 21:22:28 +02:00
Test
3172425a16 feat: implement PostHog event tracking plan
Add trackEvent() calls for all user actions in the tracking plan:
- Vault: vault_opened (with has_git, note_count), vault_switched
- Notes: note_created (with has_type, creation_path), note_deleted,
  note_trashed, note_archived, note_favorited, note_unfavorited
- Git: commit_made, sync_triggered
- Search: search_used
- Editor: raw_mode_toggled, wikilink_inserted
- Types & Views: type_created, view_created
- Telemetry: telemetry_opted_in, telemetry_opted_out

All events gated by PostHog initialization (only fires when opted in).
No PII in any event properties — counts, booleans, and enums only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.567
2026-04-03 20:42:43 +02:00
Test
9b93a17cec feat: migrate from @sentry/browser to @sentry/react
Better React-specific error tracking with component stack traces
and error boundary support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.566
2026-04-03 20:08:19 +02:00
Test
aec4e9e992 fix: editor title wraps to multiple lines instead of overflow hidden
Converted the title field from <input> to <textarea> with auto-resize
so long titles wrap naturally onto multiple lines. The textarea grows
to fit content (via scrollHeight) and shrinks back when text is
removed. Added resize:none and overflow:hidden in CSS to suppress
the drag handle and scrollbar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 19:59:09 +02:00
Test
1bca32a263 fix: note path below title — show only on focus, remove duplicate filename
Two bugs fixed in TitleField:

1. Vault-relative path was always visible for subdirectory notes. Now
   only appears when the title input is focused, hidden on blur.

2. Both bare filename and vault-relative path rendered simultaneously.
   Now the filename hint is suppressed when the path is visible, so
   only one line shows (e.g. `docs/adr/0001-tauri-stack`). Also
   strips the .md extension from the displayed path.

Root-level notes continue to show no path (unchanged).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.565
2026-04-03 19:33:52 +02:00
Test
d5c3e1858e feat: selected type section uses type color — filled icon, colored chip, tinted bg
When a type section is selected in the sidebar, the row now uses the
type's accent color: light-tinted background, filled Phosphor icon,
colored label text, and solid-color badge with white text. Matches
the visual treatment of main sections (Inbox, All Notes). Types with
no custom color fall back to the default muted palette.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.564
2026-04-03 19:06:52 +02:00
Test
ab3de7eecd fix: parse numeric YAML values as numbers so _favorite_index persists
parseScalar() returned all non-boolean values as strings, causing
contentToEntryPatch() to map _favorite_index: 2 → favoriteIndex: null
(typeof "2" !== "number"). Every editor autosave then reset the
in-memory favorite index, breaking drag-to-reorder persistence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.563
2026-04-03 18:40:18 +02:00
Test
188cd7af8b feat: add Cmd+D keyboard shortcut to toggle favorite
- Cmd+D toggles favorite on the active note (same as star button)
- Registered in command palette as "Add/Remove from Favorites"
- Label adapts based on current favorite state
- Added test for Cmd+D shortcut

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.562
2026-04-03 17:20:33 +02:00
Test
248ec02dee fix: rework Custom Views — 5 QA bugs fixed
1. Icon picker: replaced text Input with EmojiPicker popup
2. Create button: added missing .yml extension to filename
3. Field list: include relationships alongside properties
4. Nested filters: FilterBuilder now supports AND/OR groups
   with recursive nesting (Airtable/Notion-style)
5. Autocomplete: field and value inputs use datalist for
   type-ahead suggestions (type values, status values, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260403.561
2026-04-03 16:52:33 +02:00
Test
9f2bd669fe chore: add .env.example, gitignore .env.local v0.20260403.560 2026-04-03 16:22:02 +02:00
Test
b786b2a4cb fix: breadcrumb action buttons always right-aligned
Add ml-auto to the BreadcrumbActions container so buttons stay
anchored to the right regardless of whether the title is visible
(display:none when at top of note, display:flex when scrolled).

Previously, buttons shifted from left to right when scrolling
because the hidden title div wasn't taking up flex space.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:01:43 +02:00
Test
83dad79692 chore: ratchet CodeScene thresholds to 9.72/9.34 v0.20260403.559 2026-04-03 15:54:59 +02:00
Test
e7ea808f2b chore: lower CodeScene average threshold to match remote score
Remote average code health dropped to 9.34 after recent changes,
creating a ratchet deadlock (threshold 9.37 > actual 9.34).
Reset threshold to current score so the ratchet can resume.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:35:39 +02:00
Test
96df0e6796 fix: use useState for prevTitle tracking in TitleField
Replace useRef with useState for the prevTitle comparison — this is
the canonical React pattern for clearing derived state when props change,
and ensures React properly schedules the re-render.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:13:06 +02:00
Test
2bec65a445 chore: claude code loops forever — waits 10min when no tasks instead of exiting v0.20260403.558 2026-04-03 15:10:40 +02:00
Test
4fe6f15aa1 docs: add ADR 0041 for fileKind/all-files-in-vault-scanner; update README index for 0038–0041 (guard — from commit 284af17) 2026-04-03 11:47:26 +02:00
Test
a093ff4631 feat: add Custom Views UI — create dialog, filter builder, sidebar integration
CreateViewDialog with FilterBuilder for constructing filter conditions
(field/operator/value rows). Wire onCreateView and onDeleteView in App.tsx
with Tauri command integration. Sidebar VIEWS section shows "+" button
for discoverability even when empty, and delete buttons on hover.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.557
2026-04-02 20:54:06 +02:00
Test
3ed1fb4ec4 fix: apply rustfmt to favorite test assertion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.556
2026-04-02 20:13:24 +02:00
Test
7ed0787990 feat: add favorites — sidebar section, star button, frontmatter-backed, drag-to-reorder
FAVORITES section in sidebar (hidden when empty) with drag-to-reorder
via dnd-kit. Star button in breadcrumb bar toggles _favorite frontmatter.
_favorite_index controls display order, updated on reorder. Both keys
hidden from Properties panel via SKIP_KEYS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 20:11:27 +02:00
Test
56ddaba105 chore: remove laputa-task-done system event notification v0.20260402.555 2026-04-02 20:10:02 +02:00
Test
6e5652487d fix: apply rustfmt to trashed_at serde attribute
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.554
2026-04-02 19:34:30 +02:00
Test
dab5f3bc41 feat: normalize system properties to _archived, _trashed, _trashed_at
Write operations now use underscore-prefixed canonical keys (_archived,
_trashed, _trashed_at). Read operations accept both old keys (Archived,
archived, Trashed, trashed, Trashed at, trashed_at) and new keys via
serde aliases, ensuring backward compatibility without migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 19:32:48 +02:00
Test
c662b541c7 feat: show vault-relative path below title in editor
Notes in subdirectories now display their vault-relative path
(e.g. docs/adr/0001-tauri-stack.md) as small muted text below
the title field. Root-level notes show no path. Note list entries
do not display any path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.553
2026-04-02 19:02:42 +02:00
Test
b467fd8446 fix: remove H1 heading from new note editor body
Title is already shown as a separate UI element above the editor,
so the H1 in the body was a visual duplicate. New notes now have
an empty editor body. Daily notes and type entries also no longer
get an H1 inserted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 18:29:02 +02:00
Test
4d6f713a59 fix: apply rustfmt formatting to vault scanner code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 17:39:55 +02:00
Test
284af17483 feat: show all files in folder view, open text files in raw editor, gray out binary
Vault scanner now includes all files (not just .md). Each VaultEntry has a
fileKind field ("markdown", "text", or "binary") that controls how the
frontend handles it:

- Folder view shows all file kinds; other views (All Notes, type sections)
  continue to show only markdown files
- Text files (.yml, .json, .txt, .py, etc.) open in the raw CodeMirror editor
- Binary files (.png, .jpg, .pdf, etc.) appear grayed out and are not clickable
- Non-markdown files use filename as title, skip frontmatter parsing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 17:38:09 +02:00
Test
2a21dc4b08 fix: use is_some_and instead of map_or for clippy compliance
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 16:13:38 +02:00
Test
6946aad139 feat: add custom views frontend — types, sidebar section, filter evaluation
Add ViewDefinition/ViewFile types, extend SidebarSelection with 'view'
kind. Client-side filter evaluation in viewFilters.ts with full operator
support. VIEWS section in sidebar (hidden when empty). Wire view loading
through useVaultLoader, NoteList, and filterEntries pipeline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 16:09:43 +02:00
Test
4ae07446a8 feat: add custom views backend — YAML parser, filter engine, Tauri commands
Introduce `.laputa/views/*.yml` for user-defined filtered note lists.
Rust backend: serde_yaml parsing, recursive AND/OR filter evaluation
with 10 operators (equals, contains, any_of, is_empty, before/after,
etc.), wikilink stem matching, and file CRUD. Three Tauri commands:
list_views, save_view_cmd, delete_view_cmd.

ADR 0040 documents the architecture.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:57:22 +02:00
Test
88a7926a48 fix: show note title instead of filename in search results
Search results now display the VaultEntry title (from frontmatter)
when available, falling back to the filename-based title from the
search backend when no VaultEntry match is found.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:30:15 +02:00
Test
fd642889c8 fix: apply rustfmt formatting to git dates code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:03:41 +02:00
Test
e2d0a46608 feat: use git history for note creation/modification dates
Replace unreliable filesystem ctime/mtime with git log timestamps.
A single batch `git log` walks the full commit history to extract
created_at (oldest commit) and modified_at (newest commit) for each
.md file. Falls back to filesystem dates for non-git vaults and
uncommitted files. Cache version bumped to 10 for full rescan.

ADR 0039 documents the decision.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:00:22 +02:00
Test
990470e5b4 fix: add favorite/favoriteIndex to all VaultEntry mock data
The tsc -b build (stricter than --noEmit) requires all VaultEntry
fields to be present in mock-entries.ts and useNoteCreation.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 14:48:05 +02:00
Test
33db64822d feat: add favorites section with star button, frontmatter persistence, and drag-to-reorder
Adds FAVORITES sidebar section backed by _favorite and _favorite_index
frontmatter properties. Star button in breadcrumb bar toggles favorite
state. Drag-to-reorder updates _favorite_index on all affected notes.
Section auto-hides when empty.

ADR 0038 documents the decision to use frontmatter for portability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 14:44:23 +02:00
Test
931fed879b refactor: remove expand/collapse from sidebar type sections
Type sections are now flat rows — clicking selects the section and loads
the note list. Removed chevrons, inline child lists, and "+" buttons.
Added note count chip to each section header. FOLDERS section expand/
collapse is unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.547
2026-04-02 14:11:59 +02:00
Test
f71e899b90 fix: refresh folder tree after creating a new folder
reloadVault() only reloaded entries, not folders — new folders didn't
appear in the sidebar until app reload. Add reloadFolders() to
useVaultLoader and call it from handleCreateFolder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.546
2026-04-02 13:47:50 +02:00
Test
9960fd6139 fix: reassign AI panel shortcut from Cmd+I to Cmd+Option+I
Cmd+I is the standard italic shortcut in text editors. The AI panel
was overriding it, breaking italic formatting. Reassigned to
Cmd+Option+I (CmdOrCtrl+Alt+I in Tauri menu) which is free.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.545
2026-04-02 11:28:04 +02:00
Test
e3923fe123 feat: pre-assign type when creating note from type section
When the user clicks "+" in the note list while a type section is
selected (e.g. Projects), the new note now gets that type pre-set in
its frontmatter. Previously, all notes were created as generic "Note"
type regardless of the selected section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.544
2026-04-02 10:06:40 +02:00
Test
375baa4e1a fix: use percentage heights instead of 100vh to fix status bar visibility in native app
With titleBarStyle: "Overlay" in Tauri, 100vh in WKWebView includes the
overlaid title bar area, making the app-shell taller than the visible
viewport. The 30px StatusBar (including the Commit button) was pushed
below the visible area and clipped by overflow:hidden. Using height:100%
chains from html→body→#root→app-shell to correctly constrain to the
visible viewport.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.543
2026-04-02 09:45:10 +02:00
Test
321a518a1f fix: reduce editor minimum width and padding at narrow sizes
Halve the editor min-width from 800px to 400px so the window can be
resized narrower. Add a container query that reduces horizontal padding
from 40px to 16px when the editor panel is under 600px wide, keeping
content readable without wasting space on padding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260402.542
2026-04-02 02:29:05 +02:00
Test
ed549a160c fix: make commit button always visible in status bar
The commit button was inside ChangesBadge which returned null when
modifiedCount was 0, hiding the button entirely. Extract it into a
standalone CommitButton component that is always visible in the
status bar with a "Commit" text label for discoverability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260401.541
2026-04-01 23:17:43 +02:00
Test
3de211df96 fix: rustfmt formatting for fallback YAML parser
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260401.540
2026-04-01 22:42:45 +02:00
Test
f84faac7c3 fix: vault scanner fallback parser for malformed YAML frontmatter
Files with malformed YAML (e.g. Notion exports containing unescaped
double quotes inside double-quoted strings) caused gray_matter to return
Pod::Null instead of a parsed Hash. This silently reset all frontmatter
fields to defaults, making trashed/archived notes appear in Inbox.

Add a line-by-line fallback parser that extracts simple key:value pairs
when gray_matter fails, so critical fields (Trashed, Archived, type)
are never lost. Bump cache version to 9 to force rescan.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 22:40:25 +02:00
Test
ee69e30b6b fix: remove overflow:hidden from status bar to prevent commit button clipping
The commit button inside ChangesBadge was being clipped by overflow:hidden
on the left status bar div when many badges were visible or at high zoom.
Removing the overflow constraint ensures the commit button is always visible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260401.539
2026-04-01 16:04:04 +02:00
Test
e823243a3b fix: prevent BlockNote from altering list markers and inserting HTML entities
BlockNote's serializer outputs `*` for bullet lists and inserts `&#x20;`
HTML entities around inline code within bold text. Both cause meaningless
git diffs. Fix by post-processing in compactMarkdown:
- Normalize `*` bullet markers to `-` (standard convention)
- Decode HTML entities like `&#x20;` back to literal characters
- Skip normalization inside fenced code blocks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260401.538
2026-04-01 15:49:28 +02:00
Test
85e8eb7041 fix: rustfmt formatting for create_vault_folder
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260401.537
2026-04-01 15:33:13 +02:00
Test
6640e74a74 fix: address folder tree QA feedback — recursive filtering, folder creation, path display, remove flatten banner
1. Folder selection now recursively includes notes from subfolders
2. + button creates a new folder with inline rename (Tauri command + UI)
3. Note list items show full path when note is in a subdirectory
4. Remove flat vault migration banner and all related code (Rust commands,
   hook, component, smoke test) — subfolders are now first-class

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 15:29:24 +02:00
Test
be98fd51e5 fix: vault selection dropdown hidden behind sidebar
Add position: relative and zIndex: 10 to the StatusBar footer to
establish a proper stacking context, so the vault menu dropdown
(zIndex: 1000) renders above the sidebar instead of behind it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260401.536
2026-04-01 14:48:58 +02:00
Test
b1aaae82df chore: update ui-design.pen v0.20260401.535 2026-04-01 11:14:57 +02:00
Test
2f658425df chore: fix CodeScene ratchet thresholds to match remote API scores
Remote CodeScene scores (9.60/9.37) were below over-ratcheted thresholds
(9.84/9.38). Floor thresholds to actual remote values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v0.20260401.534
2026-04-01 10:48:01 +02:00