diff --git a/CHANGELOG.md b/CHANGELOG.md index 4277286..14df1fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,72 @@ # Changelog +## [0.37.11] — 2026-03-22 + +### Summary + +Notes surface built as full Preact surface, replacing the v0.37.9 template +mount. Sidebar with folder tree, tag cloud, search, and UserMenu. NotesPane +runs `standalone=false` — the surface sidebar owns filter controls. Cross-surface +fixes: Menu primitive CSS was never loaded (now added to base.html), Avatar +initials fixed for single-word names. + +### New + +- `src/js/sw/surfaces/notes/index.js` — NotesSurface root, self-mounts at `#notes-mount` +- `src/js/sw/surfaces/notes/use-workspace.js` — sidebar toggle + active note (sessionStorage) +- `src/js/sw/surfaces/notes/use-sidebar.js` — folders, tags, search, WS live updates +- `src/js/sw/surfaces/notes/sidebar.js` — search input, folder/tag sections, UserMenu footer +- `src/js/sw/surfaces/notes/sidebar-folders.js` — collapsible folder tree with counts +- `src/js/sw/surfaces/notes/sidebar-tags.js` — collapsible tag cloud with active state +- `src/js/sw/surfaces/notes/notes-workspace.js` — workspace header + NotesPane +- `src/css/sw-notes-surface.css` — surface layout (sidebar + workspace + mobile responsive) + +### Changed + +- `src/js/sw/components/notes-pane/index.js` — handleRef expanded with `setFolder`, + `setTagFilter`, `setSearchQuery`, `getFolder`, `getTagFilter`; threads `standalone` + prop to NoteList +- `src/js/sw/components/notes-pane/note-list.js` — `standalone=false` hides search row, + folder dropdown, tag cloud (surface sidebar owns these) +- `src/js/sw/primitives/avatar.js` — single-word names show first letter only + ("admin" → "A" not "AD"); multi-word unchanged ("John Doe" → "JD") +- `server/pages/templates/surfaces/notes.html` — full rewrite: crash catcher + + `#notes-mount` + Preact boot (mirrors chat.html pattern) +- `server/pages/templates/base.html` — added `sw-primitives.css` link (Menu primitive + was unstyled on all surfaces); added `css-notes` conditional +- `src/css/surfaces.css` — deleted `.surface-notes*` rules (9 lines, replaced by + `sw-notes-surface.css`) + +### Design Notes + +- **Sidebar ↔ NotesPane coordination:** write-only via handleRef. Sidebar sets + folder/tag/search on the kit; kit reloads its own list. No bidirectional sync + needed because `standalone=false` hides the kit's own filter controls. +- **Menu primitive bug:** `sw-primitives.css` was never loaded in `base.html`. + The Menu component (`sw-menu__item`) had no hover, no cursor, no background. + Chat surface masked this by using its own `.sw-chat-surface__context-menu` + styles. Fixed globally — all surfaces now get proper Menu styles. +- **Kit enhancements deferred:** markdown toolbar, wikilink hover preview, + breadcrumbs, split view, templates, slash commands, graph minimap all moved + to v0.37.14 pane audit. + +### Cumulative Layer Status + +| Layer | Version | Status | +|-------|---------|--------| +| Preact+htm vendor | v0.37.2 | ✅ | +| Layer 0: Primitives | v0.37.11 | ✅ (Menu CSS fix, Avatar fix) | +| Layer 1: SDK | v0.37.10 | ✅ (8 modules) | +| Layer 1.5: ChatPane | v0.37.10 | ✅ (13 files) | +| Layer 1.5: NotesPane | v0.37.11 | ✅ (10 files, standalone prop) | +| Layer 2: Shell | v0.37.4 | ✅ (5 components) | +| Surface: Login | v0.37.5 | ✅ | +| Surface: Settings | v0.37.7 | ✅ | +| Surface: Admin | v0.37.6 | ✅ | +| Surface: Team Admin | v0.37.7 | ✅ | +| Surface: Chat | v0.37.10 | ✅ | +| Surface: Notes | v0.37.11 | ✅ | + ## [0.37.10] — 2026-03-21 ### Summary diff --git a/VERSION b/VERSION index b5c8e6b..6979856 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.37.10 +0.37.11 diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index fe8e4ab..36b2203 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -48,8 +48,8 @@ v0.9.x–v0.28.7 Foundation through Platform Polish ✅ │ v0.37.2 Primitives ✅ │ │ v0.37.3 SDK │ │ v0.37.4 Shell │ - │ v0.37.5–10 Surfaces ✅ │ - │ v0.37.11–13 Surfaces │ + │ v0.37.5–11 Surfaces ✅ │ + │ v0.37.12–18 Surfaces │ │ │ │ ══════╪════════════╪═════════════════╪══════ │ MVP v0.50.0 │ @@ -625,7 +625,7 @@ Depends on: v0.37.4. bridge sections may reference helpers) - BYOK sections not tested with policy enabled -### v0.37.6–v0.37.13 — Remaining Surface Rebuilds +### v0.37.6–v0.37.18 — Remaining Surface Rebuilds Each surface rebuilt as Preact component tree. Old JS deleted per surface. @@ -636,41 +636,66 @@ Each surface rebuilt as Preact component tree. Old JS deleted per surface. | v0.37.8 | ChatPane ✅ | Composable kit (9 files), standalone stripped from old chat-pane.js | | v0.37.9 | NotesPane ✅ | Obsidian-grade kit (10 files), old notes code scorched (~1,630 lines) | | v0.37.10 | Chat surface ✅ | Scorched earth: 21 files deleted (−12,841 net), Preact surface + ChatPane kit upgrades | -| v0.37.11 | Notes surface | Composes NotesPane into full layout + enhancements (see below) | +| v0.37.11 | Notes surface ✅ | Preact surface (7 JS + 1 CSS), sidebar folders/tags, UserMenu, template rewrite, Menu primitive fix | | v0.37.12 | Extension surface container | `.pkg` mount point | | v0.37.13 | Workflow surfaces | Form renderer, review views | -| v0.37.14 | Tag | Light mode CSS audit, functionality restored, old code deleted | +| v0.37.14 | Pane audit | Collaborative walkthrough: each pane checked for form and function | +| v0.37.15 | Projects surface | Project views, note/channel associations | +| v0.37.16 | Workflow assignment | Workflow routing, assignment UX | +| v0.37.17 | Debug / model surface | Debug tooling, model configuration UI | +| v0.37.18 | Tag | Light mode CSS audit, dead code hunt, all features verified | -**v0.37.11 — Notes Surface Enhancements:** +**v0.37.11 — Notes Surface ✅:** -NotesPane kit enhancements (add to `notes-pane/` as new components): -- [ ] **Markdown toolbar** — bold, italic, heading, link, code, list, checkbox - buttons above editor textarea/CM6. High value for non-markdown users. -- [ ] **Hover preview on wikilinks** — floating card on `[[Title]]` hover - showing first ~150 chars of target note. Obsidian signature UX. -- [ ] **Breadcrumb trail** — navigation history bar when jumping through - wikilinks (note A → B → C). Back button walks the trail vs. list. -- [ ] **Split view (editor + preview)** — side-by-side markdown editing with - live rendered preview. Editor and reader already exist as separate pieces. -- [ ] **Note templates** — "New from template" in toolbar: Meeting Notes, - Project Brief, Weekly Review. Templates stored in `/templates/` folder. -- [ ] **Slash commands in editor** — `/table`, `/code`, `/heading`, `/date`, - `/link` insert markdown snippets at cursor position. -- [ ] **Graph minimap** — small overview of full graph in corner with - draggable viewport rectangle. +Notes surface layout (composed kit into full-page Preact surface): +- [x] Sidebar with folder tree + tag browser (sidebar-folders.js, sidebar-tags.js) +- [x] Main content area with NotesPane standalone=false +- [x] Mobile-responsive layout (768px breakpoint, overlay sidebar) +- [x] UserMenu in sidebar footer (same as chat surface) +- [x] Template rewrite — crash catcher + single mount point pattern +- [x] Menu primitive CSS fix — `sw-primitives.css` added to base.html (cross-surface) +- [x] Avatar initials fix — single-word names show first letter only (cross-surface) +- [x] Old `.surface-notes*` CSS deleted from surfaces.css -Notes surface layout (compose kit into full-page layout): -- [ ] Sidebar with folder tree + tag browser -- [ ] Main content area with NotesPane +NotesPane kit enhancements (deferred to v0.37.14 pane audit): +- [ ] Markdown toolbar — bold, italic, heading, link, code, list, checkbox +- [ ] Hover preview on wikilinks — floating card on `[[Title]]` hover +- [ ] Breadcrumb trail — navigation history through wikilinks +- [ ] Split view (editor + preview) — side-by-side live preview +- [ ] Note templates — "New from template" in toolbar +- [ ] Slash commands in editor — `/table`, `/code`, `/heading`, `/date`, `/link` +- [ ] Graph minimap — small overview with draggable viewport - [ ] Resizable split panes -- [ ] Mobile-responsive layout -Polish (pre-tag): +Polish (deferred to v0.37.18 tag): - [ ] Light mode CSS variable audit for `sw-notes-pane.css` - [ ] Smooth view transitions (fade/slide between list → reader → editor) - [ ] Note word count goal (optional target with progress bar) - [ ] Server-side favorites via note metadata (cross-device pinning) +**v0.37.14 — Pane Audit:** + +Collaborative walkthrough of each pane (ChatPane, NotesPane) and surface +checking form and function. Fixes discovered during the audit are applied +in-place. No new architecture — just making everything work correctly. + +- [ ] ChatPane: message rendering, streaming, model selector, markdown, code blocks +- [ ] NotesPane: list, editor, reader, graph, quick switcher, save-to-note +- [ ] Cross-pane: toast, dialog, user menu, keyboard shortcuts +- [ ] Kit enhancement backlog triage (above items evaluated for inclusion) + +**v0.37.15 — Projects Surface:** + +Project views, note/channel associations, project-scoped navigation. + +**v0.37.16 — Workflow Assignment:** + +Workflow routing and assignment UX. + +**v0.37.17 — Debug / Model Surface:** + +Debug tooling, model configuration UI, provider diagnostics. + --- ## MVP v0.50.0 diff --git a/server/pages/templates/base.html b/server/pages/templates/base.html index 681994b..0db94b0 100644 --- a/server/pages/templates/base.html +++ b/server/pages/templates/base.html @@ -16,6 +16,7 @@ {{/* panels.css, pane-container.css, chat-pane.css removed in v0.37.10 */}} + @@ -24,6 +25,7 @@ {{if eq .Surface "chat"}}{{template "css-chat" .}}{{end}} + {{if eq .Surface "notes"}}{{template "css-notes" .}}{{end}} {{/* v0.27.0: Extension surface CSS — loaded from /surfaces/{id}/css/main.css */}} {{if and .Manifest (eq .Manifest.Source "extension")}} diff --git a/server/pages/templates/surfaces/notes.html b/server/pages/templates/surfaces/notes.html index 1b8bde0..83484fe 100644 --- a/server/pages/templates/surfaces/notes.html +++ b/server/pages/templates/surfaces/notes.html @@ -1,47 +1,65 @@ {{/* - Notes surface (v0.37.9). - Server renders the layout shell. SDK boots Preact NotesPane kit - into #notesMainMount via sw.notesPane(). + Notes surface (v0.37.11 — Preact). + Replaced the v0.37.9 template mount with a single mount point. + Preact NotesSurface component handles all rendering. */}} {{define "surface-notes"}} -