Commit Graph

1533 Commits

Author SHA1 Message Date
lucaronin
cc3dff7d47 design: archive notes wireframes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:35:59 +01:00
lucaronin
1fa29738e7 design: customize sidebar types wireframes
Three frames showing the feature flow:
1. Button placement — "Customize sections" link above section groups
2. Popover open — toggles for each type section (People & Events OFF)
3. Result — sidebar with hidden sections removed entirely

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:35:34 +01:00
lucaronin
356797d410 feat: tag-pill UI for array properties in inspector 2026-02-21 16:29:48 +01:00
lucaronin
df6aa7241f feat: color and icon customization for sidebar type sections 2026-02-21 16:27:43 +01:00
lucaronin
23daf47353 fix: remove unused getSectionColor function (TS build fix) 2026-02-21 16:26:32 +01:00
lucaronin
527a63b3b5 feat: tag-pill UI for array properties in inspector
Replace vertical EditableList with horizontal TagPillList component.
Array property values now render as inline pill chips with hover X
to remove and a + button to add new items.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:26:22 +01:00
lucaronin
b1e15dd5ea feat: implement icon & color customization for types
- Add TypeCustomizePopover component with color swatches (6 accent colors)
  and icon grid (35 curated Phosphor icons)
- Add right-click context menu on sidebar section group headers with
  "Customize icon & color…" option
- Sidebar renders custom icons/colors from type entry frontmatter
- NoteList uses custom icons/colors for type badges and pinned cards
- Wire up onCustomizeType in App.tsx to update type frontmatter
- Add updateEntry to useVaultLoader for instant in-memory updates
- Add --accent-orange-light CSS variable
- typeColors utility now accepts optional custom color key overrides

Product decision: Built-in types can also be customized (override their
defaults), not just custom types. The picker is a simple popover that
appears after right-click → "Customize icon & color…".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:27:33 +01:00
lucaronin
f36cfd1808 feat: add icon and color fields to VaultEntry
- Add icon (string|null) and color (string|null) to VaultEntry interface
- Update Rust VaultEntry struct and frontmatter parsing to read icon/color
- Add icon/color to SKIP_KEYS so they don't appear as relationships
- Set mock data: Recipe type → cooking-pot/orange, Book type → book-open/green
- Update all test files with the new required fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:23:10 +01:00
lucaronin
692bc8edc4 feat: move properties icon to toolbar when inspector panel is closed 2026-02-21 13:16:31 +01:00
lucaronin
fb31c78efd feat: move properties icon to toolbar when panel is closed
When the inspector panel is collapsed, the SlidersHorizontal icon now
appears inline with the other BreadcrumbBar toolbar icons (search, diff,
cursor, AI, more) with no visual separator. The collapsed Inspector
sidebar is no longer rendered — clicking the toolbar icon reopens it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:16:05 +01:00
lucaronin
a7addf127e design: color & icon customization for types wireframes
Four frames added to design/color-icon-for-types.pen:
1. Right-click context menu on sidebar section group headers
2. Icon & color picker popover (color swatches + icon grid)
3. Sidebar with custom icons & colors applied
4. Frontmatter persistence model (icon/color in type YAML)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:14:18 +01:00
lucaronin
cdf203de1a fix: use stable asset URLs for image uploads (blob URL fix) 2026-02-21 13:08:29 +01:00
lucaronin
deea70a098 fix: use stable asset URLs for image uploads instead of ephemeral blob URLs
Blob URLs are session-scoped and don't survive page reloads — images
would break on Cmd+Shift+R. Now uploadFile awaits save_image (which
persists to vault/attachments/) and returns a convertFileSrc asset URL
that the Tauri webview can resolve indefinitely.

- Editor.tsx: await save_image → convertFileSrc for Tauri mode;
  FileReader.readAsDataURL fallback for browser dev mode
- tauri.conf.json: enable assetProtocol with scope ["**"]
- mock-tauri.ts: save_image returns a plausible file path
- E2E test: expect data: URLs in browser dev mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:06:04 +01:00
lucaronin
4d90fb5dc0 design: array property tag-pill wireframes
Three frames showing:
- Before: vertical list of plain text items
- After: horizontal wrapped pills with × remove and + add button
- Pill states: normal, hover (darker bg, red ×), + button, add input active

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:19:47 +01:00
lucaronin
e8e2b7f97a design: move-properties-icon wireframes
Shows before/after states:
- Before: Properties icon in separate 40px collapsed panel sliver
- After: Properties icon moved into BreadcrumbBar toolbar icons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:18:14 +01:00
lucaronin
6f35a5ea26 content: add array properties to mock data for tag-pill testing
Added non-wikilink array properties (tags, tools, domains) to mock
frontmatter content so the upcoming tag-pill UI has realistic test data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:17:51 +01:00
lucaronin
722d57843a feat: keyboard navigation between tabs and notes 2026-02-21 12:13:05 +01:00
lucaronin
4c67498cc5 content: enrich all demo-vault-v2 notes with realistic content 2026-02-21 12:01:01 +01:00
lucaronin
b3e7854b90 content: enrich event notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:00:17 +01:00
lucaronin
bf7d5aac32 content: enrich task notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:00:12 +01:00
lucaronin
c75da21e6a content: enrich target notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:00:12 +01:00
lucaronin
5af3171e99 content: enrich month notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:00:06 +01:00
lucaronin
1fa34fe0ff content: enrich year notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:00:05 +01:00
lucaronin
b27800fd92 content: enrich quarter notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:00:05 +01:00
lucaronin
3bbf4dd15d content: enrich project notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:59:59 +01:00
lucaronin
6e5c87f321 content: enrich person notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:58:55 +01:00
lucaronin
2dfc69f2e6 content: enrich procedure notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:58:54 +01:00
lucaronin
bd7658025c content: enrich note (book) notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:58:53 +01:00
lucaronin
2ae9709b4b content: enrich topic notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:53:39 +01:00
lucaronin
06ff610bad content: enrich responsibility notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:53:39 +01:00
lucaronin
0140ba6613 content: enrich evergreen notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:53:39 +01:00
lucaronin
7e2b981a8b content: enrich measure notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:52:07 +01:00
lucaronin
1216a19a65 content: enrich goal notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:52:07 +01:00
lucaronin
4342a96a70 content: enrich experiment notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:52:02 +01:00
lucaronin
ce701372f1 content: enrich area notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:42:26 +01:00
lucaronin
1697c00cf5 feat: show Laputa vault only in native Tauri mode, remove Demo vault 2026-02-21 11:07:47 +01:00
lucaronin
e02db50533 fix: use blob URLs for image uploads instead of data URLs
The uploadFile callback was converting images to data URLs via FileReader,
which caused images to get stuck on "Loading..." in the editor. Switched
to URL.createObjectURL() which returns a lightweight blob URL immediately.
The Tauri vault-save path is now fully fire-and-forget so it never blocks
the URL return.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 11:00:41 +01:00
lucaronin
827ec42d6c feat: add keyboard navigation between tabs and notes
- Tab navigation: Cmd+Option+Left/Right (Tauri), Cmd+Shift+Left/Right (browser)
- Note list navigation: Cmd+Option+Up/Down moves through visible notes
- Navigating notes replaces the current tab content (no new tab opened)
- Wraps around at list boundaries
- New useKeyboardNavigation hook detects Tauri vs browser environment
- Extracted loadNoteContent and replaceTabWithEntry helpers to reduce
  complexity in useNoteActions
- Exported filterEntries, sortByModified, buildRelationshipGroups from
  NoteList for reuse in keyboard navigation

Note: useNoteActions (30→31 CC) and App (143→153 LOC) show minimal
degradation on pre-existing code health issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:50:50 +01:00
lucaronin
df64d45152 design: keyboard navigation wireframes
Two frames showing tab switching shortcuts (Cmd+Opt+Left/Right in Tauri,
Cmd+Shift+Left/Right in browser) and note list navigation (Cmd+Opt+Up/Down
replaces current tab).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:44:17 +01:00
lucaronin
5f2a6495db feat: AI chat panel 2026-02-21 10:38:41 +01:00
lucaronin
4b843f94f6 feat: Allow to create new types 2026-02-21 10:32:36 +01:00
lucaronin
001b52c00f feat: update app icon 2026-02-21 10:21:30 +01:00
lucaronin
5e738f1e2b test: add E2E tests for image upload in editor
Verifies that the slash menu Image option works and that no
upload-related errors occur when inserting an image block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:15:58 +01:00
lucaronin
db1da4430e fix: wire up BlockNote uploadFile to enable image uploads in editor
The editor's useCreateBlockNote was missing the uploadFile callback,
so BlockNote had no handler for image uploads (drag-drop, paste, or
toolbar button). Images now convert to data URLs for immediate display.

In Tauri mode, uploaded images are also persisted to the vault's
attachments/ directory via a new save_image backend command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:07:02 +01:00
lucaronin
d94236c482 fix: editor min width — width 100% on .bn-container and .bn-editor 2026-02-21 09:52:05 +01:00
lucaronin
333df92bc9 test: add E2E tests for create new type feature
6 Playwright tests covering the full flow:
- Create Type dialog opens from + button on Types section
- Create button disabled when name is empty
- Creating a type adds it to sidebar and opens it in editor
- Custom types appear in Create Note dialog type selector
- Can create instances of custom types
- Cancel closes dialog without side effects

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:46:02 +01:00
lucaronin
5ec9af98c5 test: add tests for create type dialog and dynamic sidebar sections
- CreateTypeDialog: 8 tests covering open/close, validation, submit, cancel
- Sidebar dynamic sections: 5 tests covering custom type rendering,
  instance display, + button behavior, and built-in type deduplication

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:42:45 +01:00
lucaronin
170de2a7e0 feat: implement create new type feature
Core implementation:
- CreateTypeDialog: simple dialog with name field for creating new types
- handleCreateType in useNoteActions: creates Type documents in type/ folder
- Dynamic sidebar sections: custom types (Recipe, Book, etc.) appear as new
  sidebar sections after built-in ones, each with a + button for instances
- Updated CreateNoteDialog: accepts custom types, shows them with blue accent
- handleCreateNote now supports custom types (folder = lowercased type name)

Product decisions:
- The + on Types section opens CreateTypeDialog (not CreateNoteDialog)
- Custom type sections use FileText icon and blue accent color by default
- Section labels are pluralized (e.g., "Recipes", "Books")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:41:46 +01:00
lucaronin
4e4cffe6a3 fix: ensure editor has full width regardless of title/content length
The BlockNote editor container (.bn-container) had no explicit width,
so it sized based on content. With short or empty document titles,
the editor collapsed to a very small width.

Fix: set width: 100% on .bn-container and .bn-editor so the editor
always fills available space. Added margin: 0 auto on .bn-editor to
keep the 760px text column centered.

Also adds an E2E test verifying editor width stays above 300px.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:39:37 +01:00
lucaronin
e739ae0028 feat: add custom type mock data (Recipe, Book) with instances
Add mock data for two user-created types (Recipe, Book) plus example
instances (Pasta Carbonara, Designing Data-Intensive Applications).
This enables testing the create-new-types feature in the browser.

Also fix pre-existing test: Sidebar.test expected 7 section groups
but there are 8 (Types was added but test count wasn't updated).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:38:55 +01:00