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>
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>
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>
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>
Three wireframe sections:
1. Create Type Dialog — simple modal with name field, triggered by + on Types section
2. Dynamic Sidebar Sections — custom types auto-appear as new sidebar sections
3. Updated Create Note Dialog — type selector includes custom types with blue accent
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test that + buttons render for all 7 section groups
- Test that clicking + calls onCreateType with correct type
- Test that + buttons are hidden when callback not provided
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each sidebar section header (Projects, People, Topics, etc.) now shows
a + button on hover. Clicking it opens the CreateNoteDialog pre-filled
with that section's type, so users can quickly create new items without
manually selecting the type.
- Add defaultType prop to CreateNoteDialog for pre-selecting type
- Add onCreateType callback to Sidebar with hover-visible + button
- Wire up in App.tsx with unified openCreateDialog handler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Accept string | null in typeColors functions (matches VaultEntry.isA type)
- Add missing snippet/relationships fields to test mock entries
- Remove unused imports (AIChatPanel in App, cn in Editor)
- Fix Promise type cast in Editor.tsx tryParseMarkdownToBlocks
- Fix null coalescing in Inspector resolveRefType return
- Remove unused container variable in NoteList test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Type is a special relationship handled separately by the sidebar,
so it should not appear as one of the generic relationship groups
in the note list entity view. Added case-insensitive filter to
exclude the "type" key from the otherKeys loop.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Node.js MCP server with 5 vault tools:
- open_note / read_note: read markdown file content
- create_note: create new note with frontmatter and title
- search_notes: search by title or content substring
- append_to_note: append text to existing note
Uses @modelcontextprotocol/sdk with stdio transport.
VAULT_PATH env var configures the vault directory.
10 passing tests covering all operations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Tauri command for AI chat via reqwest:
- ai_chat module with send_chat() using Anthropic Messages API
- ANTHROPIC_API_KEY from environment variable
- Proper error handling for missing key, API errors, parse failures
- Unit tests for request building and response extraction
- Mock handler added to mock-tauri.ts for browser testing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite AIChatPanel with:
- Context picker: current note auto-added, search to add more notes,
removable context pills, token estimation badge
- Real Anthropic API integration via Vite dev server proxy (SSE streaming)
- API key stored in localStorage, configurable via dialog
- Model selector: Haiku 3.5, Sonnet 4, Opus 4
- Mock fallback when no API key is configured
- Extracted useAIChat hook and ai-chat utilities for clean separation
Decision: Using Vite middleware proxy for dev mode to avoid CORS issues
with direct browser-to-Anthropic calls. Phase 2 will add Rust backend.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix null-safety issues (string | null → string), add missing VaultEntry
fields in test fixtures, remove unused imports, and fix type assertion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add documentation for type documents, the Type relationship, and
the UI behavior changes (pinned type docs in section groups,
Instances group in entity view, clickable Type chip in Inspector).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Type field in the Inspector's properties panel is now a colored
clickable chip (styled like relationship chips) that navigates to the
type document when clicked. The "Type" key is also excluded from the
relationships panel to avoid duplication.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When viewing a type document (e.g., type/project.md) in entity view,
show an "Instances" relationship group listing all entries of that
type. For example, the Project type document shows all projects.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When viewing a section group (e.g., Projects), the corresponding type
document (type/project.md) is now pinned at the top of the NoteList
as a prominent card. Clicking it navigates to the type document.
Instances of that type are listed below.
This makes the type document the entry point for each category,
reinforcing the "types are files" mental model.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Type to color maps (accent-blue) in typeColors.ts
- Add StackSimple icon for Type in NoteList, Inspector, and Sidebar
- Add "Types" section group to sidebar navigation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add "type" folder to infer_type_from_folder() mapping
- When a VaultEntry has isA set (and it's not "Type"), automatically
add a "Type" relationship (e.g., "[[type/project]]") to the
relationships map, making the type property a navigable link
- Handle both plain string isA ("Project") and wikilink isA
("[[type/project]]") correctly
- Add 5 new tests for the Type relationship feature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each entity type (Project, Responsibility, Procedure, etc.) now has a
corresponding type document in type/ folder with isA: "Type". All
existing mock entries gain a "Type" relationship pointing to their
type document, making the type property a navigable relationship.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>