- Header collapse hides entire section, resets to 5 items on re-expand
- List truncation: show first 5, "Show more (N)" expands to all
- Clicking a flow auto-collapses back to 5
- Smooth max-height CSS transition (250ms ease-out)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Favorites section: compact grid from pinnedFlowsStore, max 2 rows, expandable
- My Flows: author_id filter, URL-synced pagination (10/25/50/All)
- View toggle (grid/list/table) with independent preference
- Skeleton loaders, empty states with CTAs
- Create dropdown with AI Builder option
- 500-item ceiling for "Show All" mode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace single Create link with dropdown menu (3 flow types + AI Builder)
- Wire pinnedFlowsStore to all view components
- AI Builder modal integration via useCachedQuota hook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- TreeGridView: star in top-right corner of cards
- TreeListView: star at end of each row
- TreeTableView: dedicated leftmost Favorite column
- All with proper a11y (aria-label), event isolation, loading states
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add pin() to pinnedFlowsApi
- Create pinnedFlowsStore (Zustand) — single source of truth for pin state
- Add dashboardMyFlowsView preference to userPreferencesStore
- Create usePaginationParams hook (URL-synced)
- Create useCachedQuota hook (5-min TTL)
- Sidebar uses pinnedFlowsStore instead of local state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the complete AI flow builder feature using a guided 4-stage
wizard (Foundation → Scaffold → Branch Detail → Review & Assemble).
AI assists at bounded points using Claude Haiku for cost-efficient
structured JSON generation (~$0.01-0.03/flow).
Backend: new models (ai_conversations, ai_usage), Alembic migration,
quota enforcement with billing anchor, Anthropic API integration with
prompt caching, tree validation, conversation CRUD with 24h TTL,
APScheduler cleanup job, 5 API endpoints, Pydantic schemas.
Frontend: TypeScript types, API client, Zustand store for wizard state,
7 components (modal, step indicator, foundation form, branch selector,
branch detail view, tree preview, quota display), MyTreesPage integration
with "Build with AI" button (hidden when AI not configured).
Tests: 14 validator unit tests + 11 endpoint integration tests with
mocked Anthropic (zero real API spend). All 25 tests passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: tree editor authoring blockers - scroll trap, form density, branching hint
- Replace fixed viewport height with flex layout in NodeEditorPanel
- Make footer sticky so Save/Cancel always reachable
- Compact root node banner to single-line with InfoTip tooltip
- Reduce resolution note from callout box to inline text
- Add answer-first branching hint below options label
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: broken functionality - auth errors, toast logic, role update, routing, step library
- Extract backend error detail in auth store login/register
- Fix inverted 4xx toast logic and add 429 rate limit handling
- Send account_role field to match backend schema in role update
- Use type-aware routing for Repeat Last Session button
- Add step library placeholder page and route, remove dot badge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: navigation correctness - back buttons, exit dialog, dedup nav, redirects
- Standardize all procedural back/exit paths to /trees (not /my-trees)
- Add exit button with ConfirmDialog to procedural session top bar
- Consolidate duplicate account links in sidebar and topbar
- Auto-redirect non-owners to personal analytics
- Add toast feedback before silent permission redirects in tree editor
- Delete orphaned AdminCategoriesPage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: shared components, ConfirmDialog migration, pinned flow fixes
- Create shared Spinner component with sm/md/lg sizes
- Migrate 13 page-level spinners to shared Spinner
- Promote EmptyState to shared component, adopt in MyShares and SessionHistory
- Replace window.confirm with ConfirmDialog in 3 files
- Fix PinnedFlow.tree_type to include maintenance, update emoji display
- Verify sidebar unpin handler already correct (no-op)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: visual consistency - toasts, typography, focus rings, container padding
- Remove richColors from Sonner toasts, limit stacking to 3
- Add font-heading to all page H1s (7 files)
- Add font-label (Outfit) to TagBadges component
- Fix focus ring tokens on analytics pages
- Replace deprecated glass-stat with design system tokens
- Standardize container padding on analytics pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: backend alignment - remove drafts toggle, clean dead code, truncation indicator
- Remove non-functional drafts toggle and clean TreeFilters type
- Fix AccountInvite type to match backend schema
- Remove dead API methods: pinnedFlows.pin/reorder, trees.getSharedTree
- Remove unused types: SessionListResponse, RatingCreate.is_verified_use
- Add session list truncation indicator with size=51 lookahead
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove bg-black from PageLoader and RouteError, fix PageLoader height
PageLoader used h-screen inside a grid cell, causing it to overflow.
Changed to h-full so it fits within the main-content area. Removed
bg-black from both PageLoader and RouteError in favor of theme-aware
bg-background to prevent black flash during lazy loading.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: guard against Pydantic validation error objects in toast/error messages
FastAPI returns `detail` as an array of objects for 422 validation errors,
not a string. Passing these objects to toast.error() or rendering them in
JSX crashes React with Error #31 ("Objects are not valid as a React child").
Now checks typeof detail === 'string' before using it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: toast styling, node editor first-click, action node placeholder pattern
1. Toast fixes: Add theme="dark" to Sonner, use !important CSS overrides
instead of zero-specificity :where() selectors, suppress noisy 4xx
global toasts (pages handle their own errors)
2. Node editor first-click: Add node.type to draft initialization
useEffect deps so draft resets when answer stub converts to real type
3. Action node redesign: Remove NodePicker dropdown, auto-create answer
placeholder on save (matching decision node pattern). Users click the
placeholder on canvas to choose type and fill in details.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: auto-seed test users when release command fails on PR envs
The background seeder now creates users directly via DB if login fails,
instead of silently aborting. This handles Railway PR environments where
the releaseCommand may not execute properly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove categories/tags from sidebar to prevent footer clipping
Categories and Tags sections were pushing Feedback, Account, and
Collapse off-screen when All Flows expanded its children. These
filters already exist on the TreeLibraryPage, so the sidebar
duplicates were removed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add procedural/maintenance editor redesign design
Collapsible sections, fixed-height layout, drag-to-reorder steps,
maintenance schedule section, and step list UX improvements.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add procedural editor redesign implementation plan
7 tasks across 7 phases: collapsible sections, fixed-height layout,
step list improvements, drag-to-reorder, maintenance schedule section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: restructure procedural editor with collapsible sections and fixed-height layout
Convert scrolling document layout to fixed-height editor with accordion-mode
collapsible sections for Details and Intake Form. Step list now gets all
remaining height with independent scrolling. Add CollapsibleEditorSection
component with ARIA attributes (aria-expanded, aria-controls).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add step count with time estimate header and auto-scroll to new steps
Remove outer card wrapper from StepList (now rendered in scrolling container).
Header shows total estimated minutes when steps have time estimates. Auto-scrolls
to newly added steps using ref + scrollIntoView.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add drag-to-reorder steps with @dnd-kit
Wrap step list in DndContext + SortableContext. Each step/section header
gets a SortableStepWrapper with useSortable. Drag handles have accessible
labels and keyboard support. procedure_end stays non-draggable and always
last. Expanded steps are disabled for dragging. Array-index reorder only.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add MaintenanceScheduleSection with schedule builder and summary
Schedule draft state is local UI only (not in store). Hydrates form from
existing schedule on load. Includes getScheduleSummary helper for collapsed
section display. Two-stage save: tree first, schedule second. Schedule
failure shows actionable error without rolling back tree save.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: wire maintenance schedule section into procedural editor
Add collapsible Schedule section for maintenance flows with accordion
integration. Schedule summary shows frequency, time, and target count
when collapsed. New maintenance flows default to schedule section expanded.
Two-stage save preserved: tree saved first, schedule managed independently.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve lint issues in maintenance schedule and editor page
Move getScheduleSummary to scheduleUtils.ts to satisfy react-refresh
only-export-components rule. Add onScheduleLoaded to useEffect deps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add design and implementation revision documents
Revision docs correct original plans: schedule persistence via API
endpoints (not tree_structure), array-index reorder (no display_order),
store minimum-one-step invariant, accordion mode, ARIA requirements,
and two-stage save orchestration with failure handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: auto-seed PR environments with SEED_ON_DEPLOY flag
Release command now runs migrations + seeds test users when
SEED_ON_DEPLOY=true. Tree seeding runs as a background task
on startup via HTTP API. Everything is idempotent and non-fatal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add httpx to requirements for PR environment seeding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: seed all flow types (v2, procedural, maintenance) on deploy
Runs seed_trees, seed_trees_v2, seed_procedural_flows, and
seed_maintenance_flows sequentially as background tasks when
SEED_ON_DEPLOY=true. Each script failure is non-fatal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: trigger redeploy for full seed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
ReactFlow v12 requires a 'dark' CSS class on the component to activate
dark theme variables. Without it, controls SVGs are invisible (dark on
dark) and the minimap mask uses white (light theme default).
Also fix library views (table, grid, list) to use getTreeEditorPath()
instead of hardcoding /trees/:id/edit, which sent procedural/maintenance
flows to the wrong editor.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add React Flow migration design for flow editor canvas
Replaces hand-built CSS flexbox canvas with @xyflow/react for zoom/pan,
dagre auto-layout, collapsible minimap, and side-panel editing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add React Flow migration implementation plan
12 tasks across 8 phases covering dagre layout, custom nodes,
side panel editor, and full canvas integration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: install @xyflow/react and @dagrejs/dagre
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add dagre layout utility for React Flow node positioning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add FlowCanvasNode compact card for React Flow canvas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add FlowCanvasAnswerNode stub card for React Flow canvas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add useTreeLayout hook for tree-to-ReactFlow conversion with dagre
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add NodeEditorPanel side panel for React Flow canvas editing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add FlowCanvas main React Flow component with zoom/pan/minimap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: wire FlowCanvas and NodeEditorPanel into TreeEditorLayout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add panel state management for node editor in TreeEditorPage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style: add React Flow dark theme overrides for canvas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: export new React Flow canvas components from barrel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: enable scrolling in node editor panel sidebar
Add min-h-0 to flex containers in the ancestor chain so overflow-y-auto
actually triggers instead of content overflowing off-screen.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: constrain tree editor page height to prevent panel overflow
Add overflow-hidden to TreeEditorPage root and NodeEditorPanel container
so the flex height chain is properly constrained by the CSS Grid cell,
preventing the node editor sidebar from growing beyond the viewport.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve lint errors in NodeEditorPanel and useTreeLayout
- Fix unused 'children' destructuring with _children prefix
- Move handleClose declaration above the useEffect that references it
- Use handleClose as proper dependency instead of eslint-disable
- Fix unused _parentId parameter type in useTreeLayout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use viewport-based height for node editor panel
Replace h-full with calc(100vh - 105px) to bypass the CSS height chain
that fails to constrain the panel across browsers. The 105px accounts
for the topbar (56px) and editor toolbar (49px).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style: fix canvas controls visibility and enhance dot grid background
- Add !important to all React Flow dark theme overrides to ensure they
win over library default styles (fixes white controls rectangle)
- Add SVG fill inheritance for control button icons
- Use slightly lighter canvas background (bg-accent/30) so dot grid
is more visible
- Increase dot size and use muted-foreground color for better contrast
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: collapse sidebar categories with show more/less toggle
Show only the first 4 categories by default with a "N more" button
to expand the full list. Reduces sidebar clutter when many categories
exist.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
When the dropdown is open with a highlighted option, pressing Tab now
selects that option and then moves focus to the next field naturally.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: Add TreeCanvasNode inline editor card component
Replaces modal-based node editing with inline expand/collapse cards.
Each card shows node type, title, and options in compact mode, then
renders the full edit form inline on expand — no modal required.
Local draft state with save/cancel prevents premature store writes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: Add TreeCanvas layout with visual branching and orchestration
Replaces NodeList + TreePreviewPanel with a single full-width canvas.
Decision nodes branch horizontally; action/solution nodes flow vertically.
Inline type picker adds nodes without modal interruption. Handles pending
link resolution, inbound reference cleanup on delete, and selection sync.
CSS dot-grid background + connector lines for structure clarity.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: Update forms for inline safety, add MetadataSidePanel, update layout
- NodeFormDecision: option reorder via onUpdate (no premature store writes)
- NodePicker: add allowCreate prop (default true) to hide Create New options
during inline canvas editing, preventing side-effect node creation
- MetadataSidePanel: 320px right slide-in overlay wrapping TreeMetadataForm,
closes on backdrop click, close button, and Escape key
- TreeEditorLayout: Flow mode now renders full-width TreeCanvas + MetadataSidePanel
overlay; Code mode unchanged (Monaco + preview split)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: Wire toolbar metadata toggle and integrate canvas layout
- Add isMetadataOpen state in TreeEditorPage
- Add Metadata toolbar button (visible in Flow mode only)
- Auto-close metadata panel when switching to Code mode
- Pass isMetadataOpen/onCloseMetadata props through TreeEditorLayout
- Update Flow mode toggle tooltip to reflect new canvas editing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add canvas UX fixes design doc (scroll, tooltips, answer stubs)
Captures approved design for three post-implementation UX improvements
to the tree canvas editor: card scroll fix, info tooltip replacement for
hint text, and the new 'answer' node type for sketching decision branches
before assigning types.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add implementation plan for canvas UX fixes
12-task plan covering scroll fix, info tooltips, and answer stub
node type. Each task has exact file paths, code, and build
verification steps.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: make canvas card expanded area scrollable with sticky header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add fullscreen toggle to Modal, enable in NodeEditorModal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add reusable InfoTip component for field-level help
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: replace hint paragraphs with InfoTip tooltips in NodeFormDecision
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: replace hint paragraphs with InfoTip tooltips in NodeFormAction
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: replace hint paragraphs with InfoTip tooltips in NodeFormResolution
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add 'answer' to NodeType union for branch placeholder stubs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add AnswerStubCard component for unresolved branch placeholders
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: guard NODE_TYPE_CONFIG lookup against 'answer' type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: redesign NodeFormDecision to label-only options, remove NodePicker
Users now type answer labels only. Stub nodes are created automatically
by TreeCanvas when the decision node is saved.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: auto-create answer stubs on decision save, render AnswerStubCard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: add answer type to all Record<NodeType> icon and color maps
Fixes NodeList, ContinuationModal, NodePicker, and TreePreviewNode.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: allow 'answer' type in tree drafts, block on publish
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: block publish if unresolved answer stub nodes exist
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: serialize 'answer' stub nodes in markdown output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: add defensive guard for answer nodes in session navigation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add delete button with confirmation to AnswerStubCard
Adds an inline delete flow to answer stub placeholder cards:
- Trash icon button (top-right, subtle) visible in idle state
- Click reveals "Delete this stub?" confirmation with Delete/Cancel
- Confirmed delete calls onDelete(nodeId) wired to handleDelete in TreeCanvas
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: prevent category Cancel overflow and add Tab/Enter to create options
- TreeMetadataForm: add min-w-0 + shrink-0 to keep Cancel button in-panel
- NodeFormDecision: Tab or Enter on the last non-empty option input adds a
new option and auto-focuses it; empty last input lets Tab pass through normally
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: re-sync draft from store when canvas card is opened
When a decision node is saved with new options, stub next_node_id values
are written back to the store. But the local draft was initialized once at
mount and never refreshed, so reopening the card gave a stale draft with
empty next_node_ids — causing duplicate stubs on every subsequent save.
Fix: reset draft from the live node whenever isExpanded transitions to true.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix+feat: blank options, stub card dismiss, collapsible subtrees
- TreeCanvas: strip blank-label options on save so they don't generate
stubs; also filter them from the unlinked-option add-button list
- AnswerStubCard: collapse type-picker when clicking outside the card
- TreeCanvasNode: add subtree collapse toggle button (ChevronsDownUp icon)
visible in compact mode when the node has children
- TreeCanvas: track collapsedNodeIds; hide subtree behind a clickable
"N nodes hidden" pill when collapsed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: stop connector fork line from overlapping child cards
Replace the two-element approach (separate fork line + child lanes div with
mismatched maxWidth values) with a single relative-positioned container.
The fork line is absolutely positioned and its left/right are calculated from
the number of children so it spans exactly from the center of the first lane
to the center of the last lane.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: replace Show Drafts checkbox with Drafts tab in Flow Library
- Remove the out-of-place checkbox; add 'Drafts' as a tab alongside
All | Troubleshooting | Projects | Maintenance
- Drafts tab sets showDrafts=true + typeFilter='all' so the API filter
still works correctly via include_drafts
- Move SortDropdown to the right side next to ViewToggle, so both
secondary controls are grouped together
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add require_engineer_or_admin to POST/PUT/DELETE in target_lists.py (blocks viewers from write ops)
- Add require_engineer_or_admin to POST/PATCH in maintenance_schedules.py (blocks viewers from write ops)
- Add team ownership guard in batch_launch_sessions after active/published checks (Fix 2)
- Wrap scheduler.remove_job in try/except for SchedulerNotRunningError and JobLookupError (Fix 3)
- Recompute next_run_at when is_active flips to True, capturing was_active before update (Fix 4)
- Add optional batch_id and target_label fields to Session type; remove unsafe cast in MaintenanceFlowDetailPage.tsx (Fix 5)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: add analytics & user feedback design document
Covers team analytics, personal analytics, flow analytics,
step-level thumbs up/down feedback, and flow CSAT ratings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add analytics & feedback implementation plan
12-task TDD plan covering session ratings, step feedback,
team/personal/flow analytics endpoints, and frontend pages.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add session_ratings table and analytics indexes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add SessionRating model and analytics schemas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add session CSAT rating endpoint with tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add step thumbs feedback and /ratings alias routes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add team, personal, and flow analytics endpoints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add recharts, analytics types, and API client
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add inline step thumbs up/down feedback during sessions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add CSAT rating modal after session completion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add Team Analytics page with charts and leaderboards
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add Flow Analytics panel with step dropoff and CSAT data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add My Analytics page with personal stats and charts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add workspace system and sidebar layout (UI design system Phase A+B)
Backend: Workspace model, migration (036), schemas, CRUD API endpoints.
Adds workspace_id to trees and categories, seeds 4 default workspaces
per account, auto-assigns existing trees by tree_type.
Frontend: Complete AppLayout rewrite from top-nav to CSS Grid shell
with persistent sidebar + topbar. New components: WorkspaceSwitcher,
NavItem, CategoryList, TagCloud, TopBar, Sidebar. Dashboard components:
QuickStats, FiltersBar, SectionGroup, TreeListItem, SessionsPanel.
WorkspaceStore with localStorage persistence.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add command palette search, dashboard rewrite, and shell height fixes (Phase C)
- Add ⌘K command palette with debounced search across flows and sessions
- Rewrite QuickStartPage as dashboard with stats, filters, sessions panel
- Fix h-[calc(100vh-4rem)] → h-full across all pages for CSS Grid shell
- Add active session count badge to sidebar Sessions nav item
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add sidebar collapse, category/tag filtering, and workspace CRUD (Phase D)
- Sidebar collapse/expand toggle with icon-only rail mode (persisted)
- Sidebar category/tag clicks navigate to /trees with URL params
- TreeLibraryPage syncs filters from URL search params bidirectionally
- Workspace create modal with icon picker and auto-slug generation
- TopBar logo adapts to collapsed sidebar state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add Quick Launch modal with actions and recent flows
- Zap button opens Quick Launch with create/navigate shortcuts
- Shows recent flows for quick session start
- Keyboard navigation support (arrows + enter)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add activity notifications panel with session feed
- Bell icon shows dot indicator for recent activity
- Dropdown panel shows recent sessions with status icons
- Links to session detail and sessions list page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: remove workspace system, add pinned flows and label renames
Replace workspace system with pinned flows API (pin/unpin/list/reorder).
Rename user-facing labels: Tree→Flow, Procedure→Project. Add sidebar
nav sub-items for flow type filtering. Remove 11 workspace files,
add migrations 037-038, clean all workspace references.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: collapsed sidebar layout scaling and toggle button size
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate auth pages to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate TreeLibraryPage to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate session pages to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate TreeEditorPage to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate TreeNavigationPage to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate session sharing components to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove workspace dropdown animation (dead code)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate common components to new design system
Migrate 15 components from monochrome glass-card design to purple gradient
accent design system tokens (bg-card, border-border, text-foreground,
bg-gradient-brand, etc.)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate procedural and step library components to new design system
Migrate 10 components from monochrome glass-card design to purple gradient
accent design system tokens.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate admin pages and components to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate remaining pages to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: migrate remaining components to new design system
Migrates 38 files: tree-editor forms, session modals, step library,
common components, library views, tree preview, and misc UI to use
design tokens (bg-card, border-border, text-foreground, bg-accent,
bg-gradient-brand) replacing old monochrome patterns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: keep brand text visible on sidebar collapse, hide sub-items until hover
- TopBar: always show "ResolutionFlow" text regardless of sidebar state
- NavItem: sub-items (Troubleshooting, Projects) hidden by default,
revealed on hover or when a child route is active
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Replaces all type="password" inputs site-wide with a PasswordInput
component that includes an eye icon toggle for visibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add session sharing types, API client, and utilities
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add SessionTimeline and ActionMenu reusable components
SessionTimeline extracts timeline/checklist rendering from SessionDetailPage
into a reusable component for both authenticated and public session views.
ActionMenu provides a dropdown action menu with keyboard/click-outside dismiss.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add ShareSessionModal and integrate into SessionDetailPage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add Share Progress popover to TreeNavigationPage
Replace the single "Copy for Ticket" button with a "Share Progress"
popover that offers three actions: Copy Progress Summary (existing PSA
export flow), Copy Share Link (auto-creates account-only share if
needed), and Manage Share Links (opens ShareSessionModal).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add public SharedSessionPage with tree preview
Add the public-facing shared session page at /share/:shareToken that
renders shared sessions without authentication. Includes error handling
for 401 (redirect to login), 403 (access denied), 404 (not found),
and 410 (expired). The page features a minimal header, session metadata,
SessionTimeline component, and a new SharedSessionTreePreview component
that renders the decision tree structure with the path taken highlighted.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add My Shares management page with nav link
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address code review issues in session sharing
- Add useCallback for loadShares in ShareSessionModal (React hook deps)
- Use TreeStructure type instead of Record<string, unknown> for type safety
- Fix login redirect format to match LoginPage's expected state shape
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test: add focused tests for session sharing utilities and API
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve tree_structure type compatibility for shared session views
- Use TreeStructure & Record<string, unknown> intersection for JSONB flexibility
- Add explicit cast in SharedSessionTreePreview for recursive node rendering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add session sharing learnings to CLAUDE.md
Add gotchas #12 (TreeStructure vs Tree types) and #13 (login redirect
state format), note about npm run build strictness, and public route
pattern to Common Tasks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: procedural editor UX improvements
Add URL intake field type, fix variable name editing collapsing fields
(index-based keys/updates), auto-generate variable names by field type,
add section header as first-class step type, and simplify step editor
with "More Options" collapsible for advanced fields.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: allow section_header step type in validation, improve tag input
- Add 'section_header' to VALID_STEP_TYPES in backend validation so
procedural flows with section headers can be published
- Replace procedural editor's inline tag input with TagInput component
(supports autocomplete, Tab, comma, semicolon, and paste splitting)
- Add semicolon delimiter support to TagInput component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add type-aware routing for procedural flows
Centralizes tree navigation routing via getTreeNavigatePath helper.
Fixes all pages to route procedural sessions to /flows/:id/navigate
instead of /trees/:id/navigate. Adds safety redirect in troubleshooting
navigator and resume support in procedural navigator.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove unused index prop from IntakeFieldEditor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Pre-compute section header visibility before render instead of mutating
a variable during .map() callback, which violates react-hooks/immutability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a new "procedural" tree type for linear step-by-step project workflows
(domain controller setup, M365 onboarding, VPN config, etc). Includes intake
form builder, two-panel step navigation, variable resolution, procedural
exports, 3 seed templates, and UI rename from "Trees" to "Flows".
Also archives 19 implemented plan docs and creates deferred features backlog.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Server-side regex redaction masks IPs, emails, bearer/API tokens, and
UNC paths in exported session content. Redaction runs post-generation
and post-variable-resolution with fail-closed error handling. Frontend
gets a "Mask Sensitive Data" toggle in the export preview modal with
a summary of what was redacted. 24 unit tests passing, frontend build clean.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add next_steps to Session, SessionUpdate, SessionComplete, SessionExport types
- Add Next Steps textarea to SessionOutcomeModal
- Update TreeNavigationPage consumer callback for next_steps
- Display next_steps with whitespace-pre-wrap on SessionDetailPage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add copy-to-clipboard buttons on command blocks (action + custom step nodes)
- Add keyboard shortcuts modal (?) with option loading spinners and [Esc] hint
- Restyle session timer as a pill badge for better visibility
- Add prominent "Create Tree" CTA to MyTreesPage header and empty state
- Make breadcrumb items clickable to rewind navigation to any previous step
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Engineers can now paste command output during action steps. Output is
stored in the session decisions JSONB, displayed in session review,
included in all 4 export formats with command context, and preserved
in session-to-tree conversions.
- Collapsible "Paste Output" textarea on action nodes with commands
- 10,000 character limit with live character count
- Works on both built-in and custom action steps
- Preloads output when revisiting a step via Go Back
- All exports show commands run alongside captured output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Revoke-and-recreate flow for both invite systems with email delivery
via Resend API. Includes account invite email template and audit logging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Migration 030: add email, assigned_plan, trial_duration_days, email_sent_at
to invite_codes with CHECK constraints
- Resend email integration (graceful degradation when API key not set)
- Invite codes now support plan assignment (free/pro/team) and trial duration (1-90 days)
- Registration applies invite code plan/trial to new subscription
- Auto-downgrade expired trials on authenticated access
- Enriched GET /admin/users/{id} with account, subscription, sessions, audit logs
- New endpoints: PUT /admin/users/{id}/subscription/plan and extend-trial
- Frontend: enhanced invite codes page with email, plan, trial fields
- Frontend: new user detail page at /admin/users/:userId
- Fixed API path drift: /invite-codes -> /invites
- 11 new backend tests, 416 total passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add session quick wins (#51-#55)
- Session timer showing elapsed time in header (#51)
- Tab keyboard shortcut to focus notes textarea (#52)
- Repeat Last Session button on tree library page (#53)
- Auto-recovery banner for incomplete sessions (#54)
- Copy individual step to clipboard on session detail (#55)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add missing delete button to table and list tree views
The onDeleteTree prop was accepted but never used in TreeTableView and
TreeListView. Now both views show a trash icon (permission-gated) matching
the existing grid view behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add monaco-editor to frontend deps, gitignore temp files (test_results.txt,
stats.html, .agents/), and add VS Code workspace config.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all `from '@/api'` barrel imports with direct imports from
specific module files (e.g. `from '@/api/trees'`) across 20 files.
This enables better tree-shaking so each page only bundles the API
modules it actually uses.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>