Commit Graph

560 Commits

Author SHA1 Message Date
b414502062 feat: unified sessions — merge assistant chat into ai_sessions table
Add session_type ('guided'|'chat') and title columns to ai_sessions,
enabling both FlowPilot guided sessions and assistant chat sessions to
live in a single table. This is the foundation for a unified session
history and consistent UX across both interaction modes.

Backend:
- Migration 066: session_type + title columns
- unified_chat_service: chat sessions on ai_sessions with same AI/RAG
- POST /ai-sessions supports session_type='chat' creation
- POST /ai-sessions/{id}/chat for chat messages
- DELETE /ai-sessions/{id} for session deletion
- session_type filter on GET /ai-sessions

Frontend:
- AssistantChatPage rewired to aiSessionsApi (no more assistantChatApi)
- /assistant/:sessionId route for deep-linking
- Session history: type filter pills (All/Guided/Chat), type icons
- Dashboard: both types shown with correct routing and icons
- Fixed glass-border → border-default in dashboard components

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 17:29:25 +00:00
72678e7f26 feat: rich input for assistant chat — paste, drag-drop, attach, logs
Upgraded AssistantChatPage input from basic textarea to ChatGPT-style:
- Paste images (Ctrl+V) with thumbnail previews
- Drag-and-drop files with drop zone overlay
- Attach button for images, logs, docs, PDFs
- Expandable "Paste Logs" section for raw error output
- Conclude session button moved into toolbar row
- Auto-growing textarea
- Replaced all glass-border dividers with border-border/border-default

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:28:19 +00:00
73c529d6f3 feat: beta feedback widget — frictionless in-session feedback
Full-stack beta feedback system:

Backend:
- BetaFeedback model with reaction, category, text, page context
- POST /feedback/beta (any auth user), GET /feedback/beta (admin, filtered)
- Alembic migration 065 with indexes on user_id, reaction, created_at

Frontend:
- Persistent "Feedback" tab on right edge of all authenticated pages
- Slide-out panel: quick reaction (👍😐👎), category pills, optional text
- Auto-captures page URL and FlowPilot session ID
- Hidden on mobile (<640px), closes on Escape/outside click
- Shows "Thanks!" confirmation then auto-closes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:12:06 +00:00
03a1f104d2 docs: add lessons 92-93 — tsc -b strictness, header action bar pattern
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:55:31 +00:00
483653f5fc fix: remove unused props from FlowPilotSession after action bar removal
canResolve, canEscalate, onResolve, onEscalate, onPause, onAbandon are
now handled at the page level in FlowPilotSessionPage header. Remove
from component interface to fix TS6133 build errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:45:20 +00:00
0ec59276c7 refactor: move FlowPilot actions to header bar, fix dividers
- Moved Resolve/Escalate/Share Update buttons from fixed bottom bar into
  the session header. Desktop: inline buttons + overflow menu (Pause/Close).
  Mobile: single overflow menu with all actions.
- Removed FlowPilotActionBar from bottom — message input is now the only
  fixed element at bottom, giving more breathing room.
- Replaced jarring white dividers (var(--glass-border)) with subtle
  border-border (#2e3240) throughout FlowPilot session.
- Restyled status badge from button-looking element to dot + text indicator
  with semantic colors (green=resolved, amber=escalated).
- Reduced content padding from pb-32 to pb-24.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:41:28 +00:00
b118e158d4 feat: rich message bar in FlowPilot — paste, drag-drop, attach, logs
Upgraded FlowPilotMessageBar from basic textarea to ChatGPT-style input:
- Paste images (Ctrl+V) with thumbnail preview
- Drag-and-drop files with drop zone overlay
- Attach button (images, logs, docs, PDFs)
- Expandable "Paste Logs" section for raw error output
- Auto-growing textarea with focus ring
- Adjusted bottom offset for slimmer action bar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:25:37 +00:00
e205c44448 fix: FlowPilot action bar single-row layout on mobile
Action bar was flex-col on mobile, creating two rows that covered the
message input. Now a single horizontal row on all screen sizes — Resolve
and Escalate always show labels, secondary actions (Pause, Close, Update)
show icon-only on mobile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 12:09:05 +00:00
701ae7c7e7 fix: assistant chat mobile layout — sidebar hidden, slide-out toggle
Chat sidebar was rendering side-by-side on mobile causing squished layout.
Now hidden on mobile with a "Chats" toggle button + "+ New" in a compact
header bar. Sidebar slides out as an overlay on mobile, auto-closes on
chat selection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 09:34:45 +00:00
778a172f4e fix: resolve TypeScript build errors in StatusUpdateModal and FlowPilotSessionPage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 06:43:54 +00:00
7eaeb660dd fix: dashboard and omnibar route to /assistant chat, not /pilot guided flow
Aligns with copilot-first GTM direction — the dashboard chat input and
CommandPalette "Troubleshoot with FlowPilot" now launch the conversational
AI chat (/assistant), not the structured diagnostic flow (/pilot). Guided
flows remain accessible from the sidebar "Flows" section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 06:36:51 +00:00
fab25456a5 feat: mid-session status updates — ticket notes, client updates, email drafts
Engineers can now generate AI-powered status updates during active FlowPilot
sessions and after resolve/escalate. Three audiences (Ticket Notes, Client
Update, Email Draft) with Quick/Detailed length options. Copy to clipboard
with one click. Client names auto-inserted from intake/PSA context.

Backend: new endpoint POST /ai-sessions/{id}/status-update with audience-aware
system prompts. Frontend: StatusUpdateModal with 2-step selection flow,
Share Update button in action bar, Share Resolution/Escalation on completed
sessions. Also updates Solutions Library spec with Community tier design.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 06:26:32 +00:00
0d78410dea fix: mobile landing page text overflow clipping
Reduce section/card padding on mobile, allow mock node and chat text to
wrap, and add flex-wrap to the brand equation so nothing overflows the
viewport edge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 06:08:35 +00:00
a40c9b561e docs: update CLAUDE.md and CURRENT-STATE.md for copilot-first redesign
- Update phase to GTM Validation, reflect copilot-first dashboard
- Add charcoal palette, sidebar restructure, Solutions Library rename
- Update recently completed, in progress, and what's next sections
- Add lessons 88-91 (charcoal palette, QuickLaunch removal, copilot-first, amber button)
- Fix outdated references (Slate & Ice → Charcoal, Step Library → Solutions Library)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 05:21:41 +00:00
8ca36316c4 refactor: merge QuickLaunch into CommandPalette, amber New Session button
- Remove QuickLaunch (lightning bolt) from TopBar — redundant with CommandPalette
- Delete QuickLaunch.tsx (dead code, no remaining imports)
- Add "New Project" to CommandPalette quick actions
- Change sidebar "New Session" button from cyan to amber-400

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 05:06:44 +00:00
961a95c20f fix: fully remove maintenance flow references from TreeLibraryPage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:48:23 +00:00
6b449c4f69 fix: remove unused imports breaking Railway build
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:41:44 +00:00
4b0097a9e2 fix: hero copy "Fix tickets" → "Resolve tickets"
Matches MSP terminology and the product name (ResolutionFlow).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:37:32 +00:00
20d60bf83d refactor: landing page copy — copilot-first messaging
Rewrite landing page to lead with speed + auto-documentation:
- Hero: "Fix tickets faster. Notes write themselves."
- App preview: shows FlowPilot chat conversation, not decision tree editor
- How It Works: Describe → Troubleshoot Together → Resolve & Document
- Features: FlowPilot copilot first, "Zero Empty Ticket Notes", team knowledge
- CTA: "Never write ticket notes again"
- Sidebar preview updated to match new nav (FlowPilot, History, Flows, Scripts)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:32:01 +00:00
ceb1423b6a fix: command palette section labels amber + item hover borders
Section labels now use amber (#fbbf24) mono font matching sidebar
drawer style. Items show border highlight on hover/selection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:22:55 +00:00
0a4185a00d fix: command palette hover contrast + FlowPilot routing
- Hover state uses bg-card-hover + text-foreground for readable contrast
- FlowPilot item navigates to /pilot (copilot) instead of /assistant
- Rename "Ask FlowPilot AI" → "Troubleshoot with FlowPilot"
- Update placeholder to hint at troubleshooting capability

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:20:23 +00:00
99e53f5d70 refactor: rename Step Library → Solutions Library site-wide
User-facing text updated across page title, sidebar, command palette,
quick launch, quick actions, post-step modal, empty state, and
procedural editor. File paths/component names unchanged — those
will be renamed when the full Solutions Library feature ships.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:09:19 +00:00
590d1ad1cb refactor: onboarding, mobile nav, remove maintenance flows
- Onboarding steps guide toward copilot usage, not flow building
- Mobile nav updated to match sidebar (Session History, Guided Flows)
- Remove Step Library from mobile nav
- Remove Maintenance from flow type filter tabs
- Remove Maintenance badge from all tree views (grid, list, table)
- Remove Maintenance create option from CreateFlowDropdown
- Add copilot-first dashboard plan and solutions library spec docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:00:52 +00:00
ee606643d5 refactor: simplify sidebar for copilot-first navigation
- Add "New Session" button at top of rail and pinned mode
- Replace Work → History, Know → Flows, add Scripts as own icon
- Remove Help/Guides/Feedback from sidebar rail
- Remove Maintenance from flow sub-items
- Remove Step Library from pinned Knowledge section
- Remove FlowPilot Analytics and Rocket icon
- Rename "Active Sessions" → "Session History"
- Rename "Flows" → "Guided Flows" in pinned mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 03:58:14 +00:00
36be22e407 feat: copilot-first dashboard — chat-style input with file support
Redesign dashboard as copilot-first experience:
- Large auto-growing textarea with paste/drag-drop file support
- Attach button for native file picker (images, logs, docs)
- Paste Logs expandable textarea for raw error output
- Suggestion chips for common issues (VPN, Outlook, lockout, etc.)
- Remove Guided/Chat toggle — copilot is always the default
- Collapsible Dashboard section for stats/KB/team summary
- Centered layout with "What are you troubleshooting?" hero

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 03:56:37 +00:00
6e01a4d04b fix: fade-in animation no longer blocks hover transforms
The fadeIn keyframe included transform: translateY(0) with
fill-mode: forwards, which permanently overrode hover translateY
transitions. Replaced with opacity-only animation so card bounce
hover works correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:11:17 +00:00
40044a6a9c fix: add cursor pointer to all buttons and interactive cards
Buttons and [role="button"] elements now show pointer cursor globally.
card-interactive utility also sets cursor: pointer explicitly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:07:07 +00:00
25241e5351 feat: spring bounce hover animation on dashboard cards
card-interactive utility now bounces on hover (translateY(-4px) with
cubic-bezier(0.34, 1.56, 0.64, 1) spring easing). Applies to stat
cards, session items, and onboarding checklist. Knowledge Base and
Team Summary inner items also bounce individually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:03:12 +00:00
e41810ee01 fix: category badges use subtle cyan pill instead of solid bg-accent
Solid cyan background with gray text was unreadable. Now uses
bg-primary/10 + border-primary/20 + text-primary for clear contrast.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 22:26:37 +00:00
ae25c564b6 fix: card-level buttons use ghost/outline instead of solid primary
Repeated per-card action buttons (Start Session, Resume, Save, Insert,
Start batch) now use cyan outline style to reduce visual noise.
Page-level and modal primary actions remain solid cyan.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 22:22:52 +00:00
8fd4207ee6 refactor: charcoal palette + sidebar drawer fixes
- Switch from true-dark to charcoal palette (sidebar darkest, content lighter)
  Page #1a1c23, Sidebar #10121a, Card #22252e, Border #2e3240
- Update all Tailwind semantic mappings to match new palette
- Update landing page CSS hardcoded hex to new palette values
- Fix remaining hardcoded hex in SurveyResponsesPage, SessionsPanel, FlowPilotMessageBar
- Sidebar drawer starts below topbar (top: var(--topbar-h)) instead of viewport top
- Drawer section title uses amber (#fbbf24) for visual pop
- Unify all rail icons: white when inactive, cyan with bg-accent-dim when active

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 21:39:05 +00:00
dfbb51b582 fix: Home icon active state — exact match "/" instead of startsWith
matchPaths: ['/'] with startsWith('/') matched every route,
keeping Home highlighted on all pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:32:55 +00:00
2bcd3e2f3c fix: design system v4 polish — home icon, mobile hamburger, contrast, font-label cleanup
- Home sidebar icon: always cyan, bg-accent-dim only when route is "/"
- Mobile TopBar: add left padding so hamburger isn't hidden behind logo
- Landing page: bump card border color (#1e2130 → #2a2f3d) for better contrast
- Replace all font-label references (40 occurrences, 19 files) with font-mono or font-sans
- Remove deprecated --font-label CSS variable from index.css
- Convert hardcoded hex in layout inline styles to CSS variables (light-mode ready)
- Add @types/react-syntax-highlighter for script builder types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:19:44 +00:00
Michael Chihlas
83a27b4d9a chore: add temporary session handoff context file
Transfers design system migration context to next session.
To be deleted after reading.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 13:14:04 -04:00
Michael Chihlas
20b3627fe0 fix: dark-mode-aware shadows — elevated surfaces + faint accent glow
Black shadows are invisible on dark backgrounds. Replaced with:
- Primary button hover: faint cyan glow (rgba 0.2)
- Ghost button hover: brighter border only (no shadow)
- tab-active-shadow: bg-elevated + faint cyan glow (rgba 0.08)
- card-lift: brighter border + subtle cyan glow on hover

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 05:18:37 -04:00
Michael Chihlas
6eae234991 fix: stat card left borders, tab shadow on toggle, larger rail icons
- Stat cards get 3px colored left border matching their icon color
- Guided/Chat toggle uses tab-active-shadow on selected state
- Rail icons increased to 24px with 1.6 stroke width
- Rail labels increased to 10px with font-sans (not mono)
- More vertical spacing between rail items

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 05:12:41 -04:00
Michael Chihlas
a73d34c39b feat: add interactive shadow patterns — hover lift, active tab elevation
Shadows communicate interaction state, not decoration:
- Primary buttons: cyan-tinted shadow + lift on hover
- Ghost buttons: subtle shadow + lift on hover
- Both: shadow shrinks on active/click (press effect)
- tab-active-shadow: elevation shadow for selected tabs/toggles
- card-lift: optional hover lift for interactive cards

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 04:51:14 -04:00
Michael Chihlas
303a558432 refactor: replace hardcoded hex values with Tailwind semantic tokens
3,200+ hardcoded color values replaced with CSS variable-backed
Tailwind classes (bg-card, text-foreground, border-border, etc.).
Enables light mode via CSS variable swap. Only syntax highlighting
colors and intentional one-offs remain hardcoded (~15 values).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 04:34:35 -04:00
Michael Chihlas
123fc50af9 fix: replace all remaining old brand tokens (text-brand-dark, border-brand-border, bg-white opacity)
30 references to removed CSS variables: border-brand-border → border-[#1e2130],
text-brand-text-muted → text-[#4f5666], text-brand-dark → text-white,
bg-white/[0.04] → bg-[#191c25], hover:border-white/[0.12] → hover:border-[#2a2f3d].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 04:27:46 -04:00
Michael Chihlas
4c5649d620 chore: remove design system v3 compatibility shims
Glass-card, text-gradient-brand, active-glow, bg-gradient-brand-hover
shims removed. All components migrated to v4 flat dark theme.
font-label alias kept temporarily (still referenced in ~10 files).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:29:52 -04:00
Michael Chihlas
6ec05757a7 fix: migrate 11 remaining files missed by component sweep
editor-ai, guides, maintenance, scripts, settings, NavItem,
and dashboard active-glow removal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:26:25 -04:00
Michael Chihlas
756f78a1a9 refactor: migrate landing page to Design System v4
Replace glass/gradient/blur effects with flat dark theme:
- Solid bg-[#14161d] cards instead of glass surfaces
- Solid #22d3ee buttons instead of gradient CTAs
- #67e8f9 text instead of gradient text
- Flat nav background (no backdrop-filter blur)
- Subtle radial-gradient hero glow instead of animated pulses
- Featured pricing card uses border-[#22d3ee]
- Remove all transition: all per lesson 81
- Update color tokens: #e2e5eb foreground, #848b9b muted, #1e2130 borders

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:23:03 -04:00
Michael Chihlas
367f6f4507 fix: clean up remaining design system v4 stragglers
Remove shadow-primary remnants and fix double text-xs from font-label
replacement in CopilotToggle, ValidationSummary, TemplateDetailModal,
and ParameterSchemaBuilder/ParameterDetectorStepper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:21:25 -04:00
Michael Chihlas
d1a56f0529 refactor: migrate remaining components to Design System v4
111 files across 14 directories: common, tree-editor, kb-accelerator,
copilot, assistant, analytics, library, procedural, procedural-editor,
public, script-editor, ui, admin, step-library.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:18:15 -04:00
Michael Chihlas
858f890ed3 refactor: migrate session, script-builder, account to Design System v4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:08:57 -04:00
Michael Chihlas
e4ef904707 refactor: migrate page components to Design System v4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:04:16 -04:00
Michael Chihlas
fd28921373 fix: remove unused BookOpen/MessageSquare imports from Sidebar
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:01:06 -04:00
Michael Chihlas
96a4130c0e refactor: migrate dashboard components to Design System v4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 02:00:35 -04:00
Michael Chihlas
56ff792f8e refactor: migrate FlowPilot components to Design System v4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:56:27 -04:00
Michael Chihlas
97a20a4225 fix: drawer uses fixed positioning to overlay main content
Grid cell was clipping the drawer at 72px. Now uses position: fixed
with left: 72px so it overlays the main content area and links
are clickable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:42:32 -04:00