chore: add backlog task files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-27 18:13:40 -08:00
parent 042ae4e34d
commit b0eebc4cbc
8 changed files with 327 additions and 0 deletions

View File

@ -0,0 +1,35 @@
---
id: TASK-66
title: Vertical canvas toolbar + whiteboard tools + zoom dropdown
status: Done
assignee: []
created_date: '2026-02-27 22:46'
labels:
- canvas
- ux
- toolbar
dependencies: []
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Convert the canvas toolbar from horizontal (top center) to vertical (left side). Add whiteboard drawing tools dropdown and nest zoom controls under a dropdown. Includes collapsible toggle.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Toolbar is vertical on the left side with dropdowns opening to the right
- [ ] #2 Whiteboard 'Draw' dropdown with pencil, sticky note, rectangle, circle, line, eraser
- [ ] #3 Zoom controls nested under a 'Zoom' dropdown group
- [ ] #4 Toolbar collapsible via subtle toggle pill at bottom
- [ ] #5 Mobile responsive layout preserved
- [ ] #6 SVG overlay for whiteboard drawing on canvas
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Implemented in commits f8bd09d, 683df43, merged to main as 76f7da8.\n\nChanges to website/canvas.html:\n- #toolbar CSS: flex-direction column, fixed left:12px, scrollable, dropdowns open right\n- New 'Draw' toolbar group: pencil (freehand SVG path), sticky note (yellow markdown shape), rectangle, circle, line, eraser (click SVG elements to delete)\n- SVG overlay inside canvas-content for whiteboard strokes\n- Zoom in/out/reset nested under 'Zoom' dropdown group\n- Collapse toggle moved to bottom as subtle '···' pill, collapses to '▶'\n- Separators now horizontal (full width, 1px height)\n- Mobile styles updated for vertical layout\n- SHAPE_ICONS updated with creative tool entries
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@ -0,0 +1,34 @@
---
id: TASK-67
title: Context-aware MI bar across all rspace.online headers
status: Done
assignee: []
created_date: '2026-02-27 22:46'
labels:
- ai
- ux
- mi
- header
dependencies: []
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Enhance rstack-mi component to gather page context (open shapes, active tab, page title) and send to /api/mi/ask for context-aware responses. Update server system prompt to use extended context. MI bar already present in header of all pages via server/shell.ts.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 rstack-mi gathers open canvas shapes, active tab, page title as context
- [ ] #2 Server /api/mi/ask accepts and uses context object in system prompt
- [ ] #3 MI identifies as 'mycelial intelligence' and references open content
- [ ] #4 Bar present in all pages: canvas, index, admin, create-space, server shell
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Implemented in commit f8bd09d, merged to main as 59f2be3.\n\nshared/components/rstack-mi.ts:\n- Added #gatherContext() method collecting space, module, open shapes (type+title+snippet), active tab, page title\n- Context sent with every /api/mi/ask request\n- Updated placeholder and welcome text\n\nserver/index.ts:\n- /api/mi/ask accepts context object\n- Extended system prompt includes open shapes, active tab, page title\n- Updated MI identity to 'mi (mycelial intelligence)' with guidance about connecting knowledge
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@ -0,0 +1,85 @@
---
id: TASK-68
title: 'Canvas toolbar popout, click-to-place, double-click edit, SVG persistence'
status: Done
assignee: []
created_date: '2026-02-28 00:26'
updated_date: '2026-02-28 00:26'
labels:
- canvas
- ux
- toolbar
dependencies: []
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Canvas UX improvements: toolbar popout panel replaces inline dropdowns, click-to-place shapes at cursor position, double-click to edit shapes, whiteboard SVG drawing persistence via Automerge, + button opens rApps, dblclick canvas for pencil mode.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Toolbar group click opens popout panel to the right (not inline dropdown)
- [x] #2 Click toolbar tool → cursor changes to crosshair → click canvas → shape at click position
- [x] #3 Shape avoids overlapping existing shapes (spiral search from click point)
- [x] #4 Double-click shape → edit mode → can type/interact with content
- [x] #5 Double-click empty canvas → pencil draw mode activates
- [x] #6 Draw with pencil → reload → drawings persist (wb-svg in Automerge)
- [x] #7 Click + button → rApp list opens in popout panel
- [x] #8 Reload page → all shapes retain x,y positions
- [x] #9 bunx tsc --noEmit passes
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
## Changes
### Toolbar Popout Panel (canvas.html CSS/HTML/JS)
- Added `#toolbar-panel` with header + body positioned right of `#toolbar`
- Group toggles populate the popout panel via `openToolbarPanel()`/`closeToolbarPanel()`
- Inline `.toolbar-dropdown` hidden with `display: none !important` when group is open
- Mobile: panel slides up from bottom as a sheet
### Click-to-Place (canvas.html)
- `pendingTool` state with `setPendingTool()`/`clearPendingTool()`
- All toolbar buttons set pending tool instead of calling `newShape()` directly
- Canvas `pointerdown` checks `pendingTool`, converts screen→canvas coords, places shape
- Ghost outline (dashed teal) follows cursor while tool is pending; ESC cancels
- `findFreePosition(width, height, preferX?, preferY?)` refactored to accept anchor point
### Double-Click Edit Mode (folk-shape.ts)
- `enterEditMode()`/`exitEditMode()` with `:state(editing)` internal state
- CSS: editing state enables `pointer-events: auto` on `.slot-container`, teal outline
- `dblclick` listener on shape calls `enterEditMode()`, focuses first focusable child
- Canvas background click calls `exitEditMode()` on all shapes
### Click-to-Edit Markdown (folk-markdown.ts)
- Preview area click enters edit mode
- `edit-enter`/`edit-exit` custom events sync with parent shape editing state
- Refactored into `enterMarkdownEdit()`/`exitMarkdownEdit()` helpers
### + Button Opens rApps (canvas.html)
- `#quick-add` button at top of toolbar opens rApps group in popout panel
- Mobile FAB first tap auto-opens rApps panel
### SVG Drawing Persistence (community-sync.ts + canvas.html)
- `addShapeData()` method on CommunitySync for DOM-less shapes
- `wb-svg` type: SVG serialized on pointerup, stored in Automerge, recreated on load
- Eraser removes from both DOM and Automerge doc
### Canvas dblclick → Pencil Mode
- dblclick on empty canvas background activates pencil drawing tool
### Files Modified
- `website/canvas.html` — toolbar panel, click-to-place, findFreePosition, +button, SVG persistence, dblclick
- `lib/folk-shape.ts` — dblclick→editing state, enterEditMode/exitEditMode, CSS
- `lib/folk-markdown.ts` — click-to-edit preview, edit-enter/exit events
- `lib/community-sync.ts` — svgMarkup field, addShapeData() method
### Commits
- `eee9cbe` — shape overlap push-aside, coordinate persistence, toolbar panel clipping
- `645f1fc` — SVG drawing persistence, click-to-edit markdown, quick-add rApps, dblclick pencil
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@ -0,0 +1,49 @@
---
id: TASK-72
title: 'Standardize canvas header to match renderShell (MI bar, welcome, Try Demo)'
status: Done
assignee: []
created_date: '2026-02-28 01:10'
labels:
- fix
- canvas
- header
- ux
dependencies: []
references:
- website/canvas.html
- server/shell.ts
- website/shell.ts
priority: high
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Canvas.html was served as a static SPA fallback and had a hand-crafted header missing several features that renderShell() provides to all other rApp pages. Fixed to achieve full parity:
1. **RStackMi registration**: `<rstack-mi>` tag was in the HTML but never registered as a custom element — MI bar was dead on canvas. Added import + define().
2. **"Try Demo" button**: Added to header right section, with visibility logic (hidden on demo space, shown on bare domain).
3. **Embedded iframe detection**: Added `rspace-embedded` CSS + early script to hide shell chrome when canvas is loaded inside an iframe (e.g. folk-rapp).
4. **Welcome overlay**: Full popup for first-time demo visitors with "Create a Space" + "Explore Demo" actions.
5. **Auto-space resolution**: Logged-in users on demo space get redirected to their personal space via `/api/spaces/auto-provision`.
6. **auth-change listener**: Reloads space switcher dropdown when user signs in/out.
7. **`window.__rspaceNavUrl` global**: Exposed nav URL helper globally, matching shell.js behavior.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 RStackMi imported and defined — MI bar functional on canvas
- [ ] #2 Try Demo button in canvas header with correct visibility logic
- [ ] #3 rspace-embedded iframe detection hides chrome when embedded
- [ ] #4 Welcome overlay shows for first-time demo visitors
- [ ] #5 Auto-space resolution redirects logged-in demo users to personal space
- [ ] #6 auth-change listener reloads space switcher on sign in/out
- [ ] #7 bun run build passes with zero errors
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Canvas.html now has full header parity with renderShell(). Added RStackMi registration (MI bar was dead), Try Demo button, iframe detection, welcome overlay, auto-space resolution, and auth-change listener. 1 file changed, +165 lines. Commit: 6c22559, merged dev→main as 6f80f7a.
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@ -0,0 +1,55 @@
---
id: TASK-73
title: Logo + standardized header across all rSpace pages
status: Done
assignee: []
created_date: '2026-02-28 01:17'
labels:
- ux
- header
- branding
dependencies: []
references:
- website/public/shell.css
- website/public/landing.html
- website/index.html
- website/canvas.html
- website/admin.html
- website/create-space.html
- server/shell.ts
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Added logo.png and the full standard rstack-header (app-switcher, space-switcher, MI bar, identity, Try Demo) to every page in rSpace:
1. **Landing page** (`landing.html`): Replaced the simple Next.js `<nav>` (just text links for "Demo", "Create Space", "Sign In") with the full standard `rstack-header` including logo, app-switcher dropdown, MI bar, identity component, and "Try Demo" button. Added shell.css + shell.js imports.
2. **Index/about page** (`index.html`): Added logo, RStackMi import+define, auth-change listener.
3. **Canvas** (`canvas.html`): Added logo to header.
4. **Admin** (`admin.html`): Added logo, RStackMi import+define.
5. **Create Space** (`create-space.html`): Added logo, RStackMi import+define.
6. **renderShell()** (`server/shell.ts`): Added logo to both the module shell header and the module landing header.
7. **shell.css**: Added `.rstack-header__logo` style (28px rounded square).
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Logo visible in header on all pages (landing, canvas, index, admin, create-space, all rApp modules)
- [ ] #2 Landing page has standard rstack-header with app-switcher, MI bar, identity
- [ ] #3 MI bar functional on all pages (RStackMi registered everywhere)
- [ ] #4 bun run build passes with zero errors
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Added logo.png and full standard rstack-header to every page. Landing page upgraded from simple nav to full header with app-switcher, MI bar, identity. All static pages (index, admin, create-space) now register RStackMi. 7 files changed, +26/-2 lines. Commit: c54be8e, merged dev→main as d64bedf.
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@ -0,0 +1,23 @@
---
id: TASK-HIGH.2
title: 'Landing pages for rspace.online/{moduleId}'
status: Done
assignee: []
created_date: '2026-02-27 20:50'
updated_date: '2026-02-27 20:50'
labels: []
dependencies: []
parent_task_id: TASK-HIGH
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Exact module paths (rspace.online/rtube) show a generated landing page with icon, name, description, and CTAs (Try Demo → demo.rspace.online/{moduleId}, Create a Space). Removes iframe embed branch. Sub-paths still rewrite to /demo/...
<!-- SECTION:DESCRIPTION:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
Implemented in commit 9203761. server/index.ts: exact module paths call renderModuleLanding(); sub-paths rewrite to /demo/. server/shell.ts: removed iframe branch, all modules use generated landing page.
<!-- SECTION:NOTES:END -->

View File

@ -0,0 +1,23 @@
---
id: TASK-HIGH.3
title: 'Zoom-aware drag, collision fix, Unicode escape cleanup'
status: Done
assignee: []
created_date: '2026-02-28 00:52'
updated_date: '2026-02-28 00:52'
labels: []
dependencies: []
parent_task_id: TASK-HIGH
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Fix three canvas/rendering issues: (1) Shape drag now accounts for canvas CSS transform scale so elements track cursor at all zoom levels, (2) Collision resolution uses minimum penetration depth instead of movement-direction bias preventing elements from flipping sides, (3) Replaced all surrogate pair escapes with actual Unicode emoji across 64 files
<!-- SECTION:DESCRIPTION:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
Committed 9742bd1, merged to main 1165a7f, deployed. Key changes: lib/folk-shape.ts (#getParentScale method, minimum penetration collision algo), 60+ lib/modules/shared/server files (unicode emoji cleanup)
<!-- SECTION:NOTES:END -->

View File

@ -0,0 +1,23 @@
---
id: TASK-MEDIUM.1
title: Restyle rSpace.online + rStack.online to match rApp theme
status: Done
assignee: []
created_date: '2026-02-28 01:51'
updated_date: '2026-02-28 01:52'
labels: []
dependencies: []
parent_task_id: TASK-MEDIUM
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Restyle the rSpace.online about page to use the standard rl-* rich landing page CSS utilities matching all rApp module landing pages. Updated rstack.online nav to match standard rstack-header. Added yourSpace CTA in space switcher.
<!-- SECTION:DESCRIPTION:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
Committed 2ec5027 (rspace-online) and 6975cbe (rstack-online). Both merged to main. rstack-online push to main blocked by pre-push hook - needs manual push.
<!-- SECTION:NOTES:END -->