- Reformat PSA resolution/escalation notes: clean single-line header,
steps with engineer responses inline, remove duplicate timing blocks,
remove AI confidence section, add follow-up recommendations
- Standardize time display to decimal hours (e.g. 0.25 hrs) across all
note formatters and status update context
- Add follow_up_recommendations to SessionDocumentation schema and
surface in SessionDocView; extracted from resolution suggestion steps
- Add _build_what_we_know() helper: uses session.evidence_items when
cockpit branch merges, falls back to deriving findings from steps
- Fix option label lookup in generate_status_update (was passing raw
machine values to AI instead of human-readable labels)
- Add 'What We Know' section to status update ticket notes prompt
- Improve _build_session_context in resolution_output_generator to
include intake text and full step details instead of truncated chat
- Add request_info audience type: client-facing information request
that skips the length step and generates a numbered question list
- Improve client_update and email_draft prompts with per-context
guidance (status/resolution/escalation) and fix escalation subject
line from 'Specialist Review' to 'Specialist Assistance'
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
#60a5fa (electric blue) is a light colour — near-white and muted-foreground
text on it produced ~1.9–2.1:1 contrast, well below WCAG AA.
- TreeNavigationPage: option number badges + timer badge → text-[#0e1016]
- StepChecklist: active step was blue badge on blue row (invisible); now
inverts to navy circle with blue number when current, dark-on-blue otherwise
- StepDetail: step number circle → text-[#0e1016] (was near-white on light blue)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added 'All Scripts' as the first/default tab (no mine/shared filter) so the
page opens with every script the user can access. My Scripts and Team Scripts
tabs remain for filtered views.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setCategory and setSearch called loadTemplates() with no arguments, dropping
the mine/shared filter set by the active tab — causing the list to show all
templates instead of the current user's scripts after any filter interaction.
Store now persists tabFilters whenever loadTemplates is called with explicit
filters, and reuses them for subsequent no-arg calls from setCategory/setSearch.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- script_builder endpoint: pg_advisory_xact_lock on user_id before
session count check, preventing concurrent creates from both passing
the MAX_SESSIONS_PER_USER guard
- script_builder_service send_message: pg_advisory_xact_lock on session_id
before message count check, preventing concurrent sends from both
passing the MAX_MESSAGES_PER_SESSION guard
- script_builder_service save_to_library: replace check-then-insert slug
logic with IntegrityError retry loop (3 attempts with fresh UUID suffix);
add unique constraint on script_templates.slug (migration 070)
- ScriptBuilderPage: add creatingSessionRef to serialize concurrent
handleSend calls that would otherwise both call createSession() while
session is still null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Race condition: on page remount, selectChat(oldId) loads session data async.
If the user clicks New Chat before the API returns, the old session's
pending_task_lane was being applied to the new session's state, showing
stale tasks and blocking new ones from appearing.
Fix: currentChatRef tracks the most recently requested chat ID synchronously.
All chat-creation paths (selectChat, handleNewChat, handleResumeNew) update it
immediately. After each await in selectChat, bail if the ref no longer matches.
Also documents the pattern as Lesson 106 in CLAUDE.md for future reference.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
VITE_SENTRY_DSN is already set in Railway as a build arg. The hardcoded
fallback was unnecessary and triggered GitHub secret scanning alerts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- landing.css: hardcode --lp-btn to #60a5fa (lesson 104 — no var(--color-*) in landing.css)
- ScriptBuilderInput: suggestion chips now correctly disabled during generation
- ChatSidebar: wrapper onClick no longer fires onSelect while in confirming state
- SessionHistoryPage: fix loadMoreAiSessions race condition with generation counter;
flow session tab auto-activates when URL params target flow session filters
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Slower chat stagger (1.2s between lines, not 0.6s) so each message
is clearly individual and watchable
- Messages slide in from left (translateX -20px) not just fade up
- Typing indicator is bigger with blue tinted background, border,
and "FlowPilot is thinking..." label
- Typing indicator holds for 3s before collapsing (was 1.8s)
- App preview has cinematic entrance (scale 0.95 → 1 + translateY)
- AI responses wait until typing indicator finishes, then cascade
- Doc confirmation has extra pause before appearing (9.6s total)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
A) Live App Preview:
- Chat messages animate in with staggered timing (0.6s apart)
- Typing indicator with bouncing dots appears before AI response,
then fades out as the response lines arrive
- Sidebar items stagger in during the entrance sequence
- Creates a "show don't tell" demo moment in the hero
B) Scroll-Driven Enhancements (@supports animation-timeline):
- Sections use CSS scroll-driven animations instead of JS IntersectionObserver
- Problem cards, feature cards, pricing cards, and step cards stagger
within their parent as they enter the viewport
- Social proof bar has subtle parallax drift
- Falls back to existing JS-based reveal for Firefox/older browsers
Accessibility:
- prefers-reduced-motion removes all chat animations, shows content
immediately, hides typing indicator entirely
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bg-accent (#f97316 orange) with text-muted-foreground (#848b9b gray)
is nearly invisible. Replaced with bg-elevated + border pattern for
readable contrast across TagBadges, StepForm, StepDetailModal, and
StepLibraryBrowser. Also fixed emerald → success-dim token.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- FolderTree, Plus, ListOrdered, Wrench are still used in empty state
and tree card rendering — restore the imports
- SessionHistoryPage needs default export for lazyWithRetry
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Session History:
- Split into AI Sessions / Flow Sessions tabs (AI default)
- Load More pagination (25 per page) instead of 50-item hard cap
- Dynamic problem domain filter from actual session data
- Fix all blue focus rings to ember orange
- Fix badge colors to use design system tokens
Escalation Queue:
- Add wait-time color coding (muted <1h, amber 1-4h, red >4h)
- Sort oldest-first for triage urgency
- Compact right-aligned pickup button
- Widen container, dynamic session count in subtitle
- Fix typos and non-system color tokens
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change "Questions" and "Diagnostic Checks" headers from text-muted
(#4f5666, barely visible on sidebar) to text-muted-foreground (#848b9b).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
orange-400→blue-400, orange-500→blue-500, orange-600→blue-600
across ~21 component files.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mechanical find-and-replace: rgba(249,115,22,...) → rgba(96,165,250,...)
across ~40 component and page files.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two issues fixed:
1. TaskLane useEffect on [questions, actions] was resetting all tasks
to pending with empty values, wiping restored user answers. Now
checks sessionStorage for saved state before resetting.
2. selectChat was setting activeQuestions/activeActions before writing
responses to sessionStorage, causing a race where TaskLane mounted
with new props but empty sessionStorage. Now writes responses to
sessionStorage first so TaskLane can restore them on prop change.
The backend saveTaskLane debounce (2s) persists responses to the DB,
and selectChat restores them via pending_task_lane.responses. This
chain now survives browser close.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The non-streaming fallback used getDocumentation which relies on
session.steps — empty for chat sessions, producing only the bare
resolution_summary text. Switch fallback to generateStatusUpdate
which reads conversation_messages and generates proper context-aware
ticket notes for both chat and guided sessions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The sendPrefill flow (dashboard handoff) did not clear activeQuestions/
activeActions before creating the new session. The task lane initializer
loaded stale data from sessionStorage keyed to the previous session ID,
showing old tasks while the new session was processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SSE stream URL was /api/ai-sessions/ but the backend mounts all
routes under /api/v1/. This caused a 404, falling through to a
non-streaming fallback that returned empty documentation for chat
sessions. This is why "Conclude → Resolved" never showed ticket notes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire StatusUpdateModal into AssistantChatPage with "Update" button in
the chat toolbar. Enhance ConcludeSessionModal pause/escalate outcomes
to offer ticket notes, client update, or email draft generation instead
of static messages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Opens the ParameterizeAndSavePanel in paste mode, letting users import
raw scripts with parameter detection and review before saving to library.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace SaveToLibraryDialog with the new panel that includes parameter
detection, review, and template rewriting before saving to library.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Slide-in panel for saving scripts to library with parameter detection,
stepper review, template rewriting, and metadata collection. Supports
both script mode (from AI builder) and paste mode (raw script import).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SessionCloseResponse.documentation is now nullable — update resolve/escalate
return types to match.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ConcludeSessionModal now resolves instantly (Phase 1) then streams
ticket notes via SSE (Phase 2), with skeleton loading and fallback.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ScriptBodyEditor's onChange fired when the value prop changed externally
(from handleAcceptCandidate inserting placeholders), creating a feedback
loop that reset acceptingCandidateRef before the second useEffect cycle.
Guard onChange to only propagate when the value actually differs from the
current prop.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
_build_session_detail was omitting pending_task_lane, is_branching, and
active_branch_id from the GET /ai-sessions/{id} response. The fields
existed on the schema and model but were never passed in the manual
constructor, so task lane state could never be restored on navigation.
Also adds console logging to AssistantChatPage selectChat flow to
diagnose message restoration, and fixes ScriptTemplateEditor stepper
dismiss firing during programmatic script_body updates.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add PUT /ai-sessions/{id}/task-lane endpoint that saves the full task
lane state (AI questions/actions + user's in-progress responses) to
the pending_task_lane JSONB column. TaskLane debounce-saves to the
backend every 2s after changes. On session load, user responses are
restored from the backend into sessionStorage so TaskLane picks them
up on mount. Users can now close the browser, come back later, and
find their task lane exactly where they left it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The showTaskLane initializer was comparing the saved chatId against
urlSessionId (null on /assistant), so it never matched. Now compares
against activeChatId which is already restored from sessionStorage.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Save activeChatId to sessionStorage so reloading /assistant restores
the last conversation. Messages load from backend conversation_messages,
task lane restores from sessionStorage (with partial answers intact).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>