diff --git a/CLAUDE.md b/CLAUDE.md index e28bb710..40dd0e05 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -24,10 +24,10 @@ - **Logo:** Inline SVG in `BrandLogo.tsx` (decision-tree icon with gradient). Wordmark: "Resolution" in white + "Flow" in `text-gradient-brand` - **Brand assets:** `brand-assets/` (source SVGs + brand-guide.html), `frontend/src/assets/brand/` (app assets), `frontend/public/icons/` (favicon) - **CSS utilities:** `text-gradient-brand`, `bg-gradient-brand`, `bg-gradient-brand-hover` (defined in `tailwind.config.js` and `index.css`) -- **Layout:** App shell with persistent sidebar + top bar + main workspace (CSS Grid). See [UI-DESIGN-SYSTEM.md](UI-DESIGN-SYSTEM.md) -- **Workspace system:** Top-level context switcher (Troubleshooting, Procedures, Policies, Finance). Sidebar categories, tags, stats, and content adapt per workspace. See [UI-DESIGN-SYSTEM.md](UI-DESIGN-SYSTEM.md) +- **Layout:** App shell with persistent sidebar + top bar + main content (CSS Grid). See [UI-DESIGN-SYSTEM.md](UI-DESIGN-SYSTEM.md) +- **Navigation:** Sidebar nav with type sub-items (All Flows → Troubleshooting / Projects). Pinned flows section for quick access. NO workspace switcher. See [UI-DESIGN-SYSTEM.md](UI-DESIGN-SYSTEM.md) +- **Terminology:** User-facing label is "Flows" (not "Trees"). Procedural flows are called "Projects" in the UI. `tree_type` column values unchanged in DB. - **Rebrand guide:** [REBRAND-IMPLEMENTATION-GUIDE.md](REBRAND-IMPLEMENTATION-GUIDE.md) -- **Interactive mockup:** `docs/mockups/resolutionflow-workspaces-mockup.html` (open in browser for visual reference) **Component styling rules:** - Primary buttons: `bg-gradient-brand` with `shadow-lg shadow-primary/20`, hover lifts with stronger shadow @@ -40,7 +40,7 @@ - Cards: `bg-card border-border rounded-xl`, hover brightens border - Section labels: `font-label text-[0.6875rem] uppercase tracking-wide text-muted-foreground` -When adding new pages/components: use "ResolutionFlow" branding, purple gradient accent theme, `bg-card` containers, `text-foreground`/`text-muted-foreground` hierarchy. Primary actions use `bg-gradient-brand`. Pages render inside the app shell (CSS Grid: topbar + sidebar + main). Reference [UI-DESIGN-SYSTEM.md](UI-DESIGN-SYSTEM.md) for layout patterns, workspace context, and component specs. +When adding new pages/components: use "ResolutionFlow" branding, purple gradient accent theme, `bg-card` containers, `text-foreground`/`text-muted-foreground` hierarchy. Primary actions use `bg-gradient-brand`. Pages render inside the app shell (CSS Grid: topbar + sidebar + main). Use "Flows" not "Trees" in all user-facing text; use "Projects" not "Procedures" for procedural flows. Reference [UI-DESIGN-SYSTEM.md](UI-DESIGN-SYSTEM.md) for layout patterns, navigation, and component specs. --- diff --git a/UI-DESIGN-SYSTEM.md b/UI-DESIGN-SYSTEM.md index dfc31804..241dbb01 100644 --- a/UI-DESIGN-SYSTEM.md +++ b/UI-DESIGN-SYSTEM.md @@ -1,10 +1,49 @@ # ResolutionFlow UI Design System & Layout Architecture -> **Purpose:** This document defines the new app-shell layout, design tokens, component patterns, and workspace architecture for ResolutionFlow. It is the single source of truth for all frontend UI work going forward. +> **Purpose:** This document defines the app-shell layout, design tokens, component patterns, and navigation architecture for ResolutionFlow. It is the single source of truth for all frontend UI work going forward. > **Last Updated:** February 15, 2026 -> **Status:** Approved for implementation -> **Reference Mockup:** `docs/mockups/resolutionflow-workspaces-mockup.html` (interactive, open in browser) -> **Note:** If the mockup file is not yet in the repo, it should be placed at the path above. The mockup is also available as a project output artifact. +> **Status:** Approved for implementation (v2 — workspace system removed, replaced with flat nav + type sub-items) +> **Reference Mockup:** `docs/mockups/resolutionflow-workspaces-mockup.html` (interactive — note: mockup shows old workspace switcher design which has been superseded by this document) + +--- + +## IMPORTANT: Changes from Previous Version + +This is version 2 of the design system. The following changes were made based on UX research and product decisions: + +1. **Workspace system REMOVED.** The workspace switcher, workspace table, workspace API, `workspaceStore`, and all workspace-related components should be removed. Workspaces added unnecessary cognitive overhead and context-switching cost for the current scale of the product. +2. **"Procedures" renamed to "Projects"** in all user-facing labels. The `tree_type` database column retains the value `'procedural'` — only UI labels change. +3. **"Trees" renamed to "Flows"** in all user-facing labels. "Tree" is an internal/technical term. Users see "Flows" everywhere. +4. **Flow type filtering** is handled via nav sub-items (All Flows → Troubleshooting / Projects), not workspaces. +5. **Pinned Flows** section added to sidebar for quick access to favorites. +6. **Folder sidebar panel REMOVED** from the flow library page. Folders remain in the database and API but are not displayed as a persistent second panel. Folder organization is deferred to a future release. +7. **Search bar centered** in the top bar (flex spacers on both sides). +8. **Keyboard shortcut badge** is platform-aware: `⌘K` on Mac, `Ctrl+K` on Windows/Linux. + +### Files to Remove or Deprecate + +These files were created for the workspace system and should be **deleted**: + +``` +frontend/src/store/workspaceStore.ts → DELETE (replace with flowFilterStore.ts) +frontend/src/api/workspaces.ts → DELETE +frontend/src/types/workspace.ts → DELETE (remove Workspace type) +frontend/src/components/workspace/ → DELETE entire directory +frontend/src/constants/workspaceLabels.ts → DELETE (replace with flowLabels.ts) +backend/app/models/workspace.py → DELETE +backend/app/api/endpoints/workspaces.py → DELETE +backend/app/schemas/workspace.py → DELETE (if exists) +``` + +### Database Migration + +Create a new migration that: +1. Drops the `workspace_id` column from `trees` table (if added) +2. Drops the `workspace_id` column from `tree_categories` table (if added) +3. Drops the `workspaces` table +4. **Does NOT touch** the existing `tree_type` column — it stays as-is + +Remove the workspace router from `backend/app/api/router.py`. --- @@ -12,16 +51,15 @@ 1. [Layout Architecture](#1-layout-architecture) 2. [Design Tokens](#2-design-tokens) -3. [Workspace System](#3-workspace-system) +3. [Naming & Terminology](#3-naming--terminology) 4. [Sidebar Components](#4-sidebar-components) 5. [Top Bar](#5-top-bar) 6. [Main Content Area](#6-main-content-area) 7. [Component Patterns](#7-component-patterns) 8. [Icon System](#8-icon-system) 9. [Animation & Transitions](#9-animation--transitions) -10. [Data Model Changes](#10-data-model-changes) -11. [Migration Strategy](#11-migration-strategy) -12. [Implementation Phases](#12-implementation-phases) +10. [Migration Strategy](#10-migration-strategy) +11. [Implementation Phases](#11-implementation-phases) --- @@ -29,21 +67,22 @@ ### Overview -ResolutionFlow transitions from a top-nav + full-width content layout to a **persistent sidebar + top bar + main workspace** layout. This mirrors the UX patterns MSP engineers already use in ConnectWise Automate, Datto RMM, and HaloPSA. +ResolutionFlow uses a **persistent sidebar + top bar + main content** layout. This mirrors the UX patterns MSP engineers already use in ConnectWise Automate, Datto RMM, and HaloPSA. ### Shell Structure ``` ┌──────────────────────────────────────────────────────┐ -│ TOP BAR (56px) — Logo, Search, Quick Actions, User │ +│ TOP BAR (56px) — Logo, ── Search (centered) ──, User│ ├──────────────┬───────────────────────────────────────┤ │ SIDEBAR │ MAIN CONTENT AREA │ │ (260px) │ │ │ │ Page Header + Actions │ -│ Workspace │ Quick Stats Row │ -│ Switcher │ Filters Bar │ +│ Pinned │ Quick Stats Row │ +│ Flows │ Filters Bar │ │ │ Content Sections │ -│ Navigation │ (trees/flows list, sessions, etc.) │ +│ Navigation │ (flow list, sessions, etc.) │ +│ + sub-items │ │ │ │ │ │ Categories │ │ │ Tags │ │ @@ -57,7 +96,7 @@ ResolutionFlow transitions from a top-nav + full-width content layout to a **per ### CSS Grid Implementation ```tsx -// AppLayout.tsx - new shell structure +// AppLayout.tsx