From 8bfba5dd17827ac3513a2022a5bf9c9e332a7ae6 Mon Sep 17 00:00:00 2001 From: fluid-chey Date: Fri, 13 Mar 2026 12:20:53 -0600 Subject: [PATCH 1/2] fix: resolve template iframe paths for /templates/social/*.html The template library index.html uses relative paths like social/t1-quote.html, which resolve to /templates/social/t1-quote.html. The middleware was hardcoding templates/social/ as the base, causing double-nesting (templates/social/social/). Now resolves from templates/ root so subdirectory paths work correctly. Co-Authored-By: Claude Opus 4.6 --- canvas/src/server/watcher.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/canvas/src/server/watcher.ts b/canvas/src/server/watcher.ts index 82a1f0a..d02eecd 100644 --- a/canvas/src/server/watcher.ts +++ b/canvas/src/server/watcher.ts @@ -222,11 +222,11 @@ export function fluidWatcherPlugin(workingDir: string): Plugin { } }); - // Serve template HTML files at /templates/:id.html with asset path rewriting + // Serve template HTML files at /templates/:path.html with asset path rewriting srv.middlewares.use(async (req, res, next) => { if (!req.url?.startsWith('/templates/') || !req.url.endsWith('.html')) return next(); - const fileName = req.url.replace('/templates/', ''); - const templatePath = path.resolve(projectRoot, 'templates', 'social', fileName); + const filePath = req.url.split('?')[0].replace('/templates/', ''); + const templatePath = path.resolve(projectRoot, 'templates', filePath); try { let html = await fs.readFile(templatePath, 'utf-8'); // Rewrite relative asset paths for serving via /fluid-assets/ From 4dd27b58c7ce497f0efd769714e2c89ca659cbb9 Mon Sep 17 00:00:00 2001 From: fluid-chey Date: Fri, 13 Mar 2026 12:38:34 -0600 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20update=20STATE.md=20and=20ROADMAP.m?= =?UTF-8?q?d=20=E2=80=94=20Phase=2010=20complete,=20nomenclature=20overhau?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .planning/ROADMAP.md | 11 +++++++---- .planning/STATE.md | 21 ++++++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 23e3d96..3a3a628 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -240,6 +240,7 @@ Phases execute in numeric order: 1 > 2 > 3 > 4 > 4.1 > 4.2 > 4.3 > 5 > 6 > 7 > 8 | 6. Marketing Skills Integration | 2/2 | Complete | 2026-03-11 | | 7. Merge Jonathan's Codebase | 7/7 | Complete | 2026-03-12 | | 8. AI Sidebar to Campaign Dashboard E2E | 4/4 | Complete | 2026-03-13 | +| 10. App Navigation Overhaul | 2/2 | Complete | 2026-03-13 | ### Phase 9: Conversational chat UI — bottom input, message bubbles, auto-scroll @@ -251,13 +252,15 @@ Phases execute in numeric order: 1 > 2 > 3 > 4 > 4.1 > 4.2 > 4.3 > 5 > 6 > 7 > 8 Plans: - [ ] TBD (run /gsd:plan-phase 9 to break down) -### Phase 10: App Navigation Overhaul — Icon Left Nav + Collapsible Chat Sidebar +### Phase 10: App Navigation Overhaul — Icon Left Nav + Collapsible Chat Sidebar ✓ (2026-03-13) -**Goal:** Replace the current flat layout with a slim icon-based left nav (Campaigns, Templates, Patterns, Voice Guide) that controls the main viewport, reposition the AI chat sidebar between the left nav and viewport as a collapsible panel (toggled via bottom nav icon), and add Voice Guide as a new markdown-rendering viewport with vertical side-tabs for 13 brand knowledge docs +**Goal:** Replace the current flat layout with a slim icon-based left nav (Create, Templates, Patterns, Voice Guide) that controls the main viewport, reposition the AI chat sidebar between the left nav and viewport as a collapsible panel (toggled via bottom nav icon), and add Voice Guide as a new markdown-rendering viewport with vertical side-tabs for 13 brand knowledge docs **Requirements**: NAV-01, NAV-02, NAV-03, NAV-04, NAV-05, NAV-06, NAV-07, NAV-08 **Depends on:** Phase 8 **Plans:** 2/2 plans complete Plans: -- [ ] 10-01-PLAN.md — Core layout overhaul: store extension, LeftNav, ChatSidebar, AppShell rewrite, viewport switching -- [ ] 10-02-PLAN.md — Voice Guide (markdown renderer + side-tabs), patterns middleware, test updates, visual checkpoint +- [x] 10-01-PLAN.md — Core layout overhaul: store extension, LeftNav, ChatSidebar, AppShell rewrite, viewport switching +- [x] 10-02-PLAN.md — Voice Guide (markdown renderer + side-tabs), patterns middleware, test updates, visual checkpoint + +**Post-phase:** Deep nomenclature rename (Asset→Creation, Frame→Slide, Variation→Version), NavTab campaigns→create with Campaigns/Creations sub-tabs, template iframe path fix, DB migration diff --git a/.planning/STATE.md b/.planning/STATE.md index 3a765ad..e7f2cb6 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -3,15 +3,15 @@ gsd_state_version: 1.0 milestone: v1.0 milestone_name: milestone status: completed -stopped_at: Completed 10-02-PLAN.md -last_updated: "2026-03-13T17:14:47.636Z" -last_activity: "2026-03-13 -- PR #1 merged, chey-work branch cleaned up" +stopped_at: Phase 10 complete + nomenclature overhaul + template fix +last_updated: "2026-03-13T19:30:00.000Z" +last_activity: "2026-03-13 -- Phase 10 executed, deep rename (Asset→Creation, Frame→Slide, Variation→Version), template iframe fix, DB migrated, PR #2 created on chey-work" progress: total_phases: 14 - completed_phases: 11 + completed_phases: 12 total_plans: 39 - completed_plans: 37 - percent: 94 + completed_plans: 39 + percent: 100 --- # Project State @@ -21,13 +21,13 @@ progress: See: .planning/PROJECT.md (updated 2026-03-10) **Core value:** An agent using this system produces assets that look and sound like Fluid made them from the very first prompt -**Current focus:** Phases 1-8 complete. Remaining: 4.2 (asset linking refactor), 4.3 (install safety), 9 (chat UI). +**Current focus:** Phases 1-10 complete. Remaining: 4.2 (asset linking refactor), 4.3 (install safety), 9 (chat UI). ## Current Position Phase: Between phases. Next unexecuted: 4.2 (Asset Linking & Output Refactor) -Status: Phase 8 complete and merged to main. README.md + ARCHITECTURE.md added. -Last activity: 2026-03-13 -- PR #1 merged, chey-work branch cleaned up +Status: Phase 10 complete. Deep nomenclature rename shipped (Asset→Creation, Frame→Slide, Variation→Version). Template iframe fix applied. DB migrated. +Last activity: 2026-03-13 -- Phase 10 + rename + fixes on chey-work branch, PR #2 created Progress: [█████████░] 94% (Overall: 35/36 plans) @@ -199,6 +199,9 @@ Recent decisions affecting current work: - [Phase 10]: chatSidebarOpen is canonical new name; leftSidebarOpen kept in sync for backward compat - [Phase 10]: Patterns /patterns/ middleware added in watcher.ts (Phase 10-01 deviation) — needed for patterns iframe to resolve - [Phase 10-top-level-tab-navigation-main-viewport-overhaul]: VoiceGuide uses Vite ?raw imports for markdown (zero runtime fetch); wired directly in AppShell not via prop; DOCS ordered company-identity first then product areas +- [Post-Phase 10 rename]: Deep nomenclature rename — Asset→Creation, Frame→Slide, Variation→Version across DB schema, types, store, API routes, components, tests. NavTab 'campaigns'→'create' with Campaigns/Creations sub-tabs in Create viewport. Rationale: "assets" conflicts with brand assets; "creations" better represents user-generated content. "slides" and "versions" are more intuitive than "frames" and "variations". +- [Post-Phase 10 rename]: DB migration required for existing data — old tables (assets, frames) coexist with new (creations, slides); iterations.frame_id→slide_id column rename. CREATE TABLE IF NOT EXISTS won't recreate existing tables with new schema. +- [Post-Phase 10 fix]: Template iframe middleware was double-nesting social/ subdirectory — templates/index.html uses relative src="social/t1-quote.html" which resolves to /templates/social/t1-quote.html, but middleware mapped to templates/social/social/. Fixed by resolving from templates/ root. ### Parallel Development Note