Add a markdown/plain toggle to the planning summary description so users can preview formatted content before creating a task.
- add a Description header toggle that switches between editable plain textarea and rendered markdown preview
- render description preview with react-markdown and remark-gfm while preserving expand/collapse layout behavior
- add preview container styles and spacing adjustments for summary form
- add UI interaction test coverage for markdown toggle behavior and rendered heading/bold content
- document the new markdown/plain description toggle in dashboard guide
Files changed:
docs/dashboard-guide.md | 1 +
packages/dashboard/app/components/PlanningModeModal.css | 18 +++++++-
packages/dashboard/app/components/PlanningModeModal.tsx | 32 ++++++++++---
packages/dashboard/app/components/__tests__/PlanningModeModal.ui-interactions.test.tsx | 54 ++++++++++++++++++++++
4 files changed, 98 insertions(+), 7 deletions(-)
Fusion-Task-Id: FN-5801
Fusion-Task-Lineage: 34972830-7d51-4fcd-bf00-3de8f5aff028
Adds planning branch controls to the PlanningModeModal, extending the planning API and routes with supporting tests and documentation. The changeset bumps `@runfusion/fusion` as a minor release.
Fusion-Task-Id: FN-5585
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5585
Adds inline loading spinners to the planning mode task-creation modal, replacing any placeholder states during the creation flow, with a new planning-flow test covering the spinner behavior.
Fusion-Task-Id: FN-4769
Merged PlanningModeModal swipe-back and New Session handling: the feature commits wire key swipe-back gestures to control mobile detail-pane visibility and document the nav trigger rule, while the test commit adds coverage for New Session and mobile swipe-back regressions.
Fusion-Task-Id: FN-4187
Implements swipe-back gesture support for mobile navigation across ChatView, MissionManager, and PlanningModeModal, wired through a shared navigation history context and covered by a comprehensive test suite (~548 lines of swipe-back tests). A small fixup ensures swipe-back behaves correctly when la
Fusion-Task-Id: FN-4139
Merges FN-4076: tightens the mobile Agents header and aligns the controls popup on smaller screens, while also introducing compact planning breakdown task creation with preserved payload coverage — tests for scoped and empty-generated planning payloads were added alongside fixes to the legacy API an
Fusion-Task-Id: FN-4076
Adds per-subtask priority controls to planning mode with three implementation steps (route priority support, UI controls, and design-token polish), gates research tools behind an experimental feature flag with a new core infrastructure module, and introduces a WhatsApp chat plugin with discovery and
Fusion-Task-Id: FN-3716
Merges fixes for the planning refine continuation flow (FN-3209) alongside a new local startup script for development environments. The changes include updates to `PlanningModeModal.tsx`, new and updated tests for the planning system, route handler improvements in `chat.ts` and `planning.ts`, and do
Fusion-Task-Id: FN-3209
Two related bugs left the Planning Mode modal stuck at partial height on
mobile. useModalResizePersist replayed desktop-saved pixel dimensions
that overrode the mobile 100dvh rule, and React reconciled removed CSS
custom properties to empty string rather than calling removeProperty(),
which on iOS Safari defeated the var() fallback after keyboard dismiss.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This merge delivers four major features: a planning session rewind system (FN-3447, steps 1–4) with a new backend route for rolling back sessions, modal back-action wiring, and updated typing; workspace verification gates (FN-3385) for agent prompt editing; an agents view org chart spacing rework (F
Fusion-Task-Id: FN-3447
Merges FN-3237 to stabilize the mobile viewport teardown flow when closing the planning modal, ensuring the viewport state resets correctly. Adds test coverage for the mobile planning close path and includes a changeset for the patch release.
Fusion-Task-Id: FN-3237
- Add useMobileScrollLock hook using position:fixed body lock (Bootstrap/
Headless UI/Stripe pattern) to prevent iOS Safari from shifting the
document and visualViewport when an input inside a fixed-position modal
is focused. Wire into 15 input-bearing modals plus ChatView, replacing
ChatView's inline body-overflow effect.
- Widen computeBuildVersion in vite.config.ts to hash the entire app/ tree
so the version-check poll actually notices rebuilds (FN-3333 follow-up;
previously only main.tsx and package.json were hashed).
- ChatView: on input blur, suppress keyboard-aware sizing for 450ms while
reserving mobile-nav-bar space, so the composer snaps to its final
height in one move instead of crawling down with iOS's keyboard slide
and then jumping again when the nav bar reappears.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This merge includes three features: FN-3337 fixes mobile keyboard handling in the PlanningModeModal by wiring in `useMobileKeyboard` and adding keyboard-aware CSS sizing, with regression tests; FN-3336 recovers the `isGenerating` chat state on session reload to prevent UI flickering; and FN-3338 fix
Fusion-Task-Id: FN-3337
This merge introduces visibility of the AI's first-turn reasoning in the planning modal (FN-3274), with corresponding regression tests, and removes all PI (Prompt Intelligence) install references and documentation from the codebase (FN-3309).
Fusion-Task-Id: FN-3274
Merges mobile Planning Mode empty-state auto-routing to the composer (Step 2 of FN-3269) alongside wired Insights create-task integration with real task creation (FN-3265), with corresponding tests and documentation updates.
Fusion-Task-Id: FN-3269
The merge completes UX updates for the planning disclosure flow (steps 2–3) in the PlanningModeModal, including CSS enhancements and test coverage for the new behavior.
Fusion-Task-Id: FN-3268
Adds a resolved planning model display to the planning modal by introducing a new `/api/models/resolve` endpoint, wiring it through the legacy API, and updating the modal to show the final resolved model alongside its source (FN-3120).
Fusion-Task-Id: FN-3120
This merge lands v0.16.0 with several major features: an advanced planning mode modal redesign with collapsible disclosure controls (FN-3222), a durable insight lifecycle system using bounded run executors with quick recovery (FN-3243/FN-3013), and per-project SQLite connection caching for AgentStor
Fusion-Task-Id: FN-3222
Group the planning model selector and depth controls under a collapsible
"Advanced planning settings" disclosure (defaultOpen) in the Planning Mode
modal. Adds a defaultOpen prop to OnboardingDisclosure and tightens the
node.capabilities readonly typing in NodeDetailModal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the loop on the blur/close summarize work. Previously the sidebar
always rendered `session.preview` for drafts, so the model call fired by
blur/close updated `session.title` to a value the user never saw, and
then `startExistingSession` summarized again on Start Planning even when
blur had already produced a title for the exact same text.
The sidebar now shows the summarized title once available and falls
back to the inputPayload preview only while the title is still the
placeholder. summarizeDraftTitle persists the plan text it summarized
from via a new `markDraftSummarized` store method, and updateDraft
preserves that marker only while the persisted text still matches it
(text edits invalidate it automatically). startExistingSession reads
the marker and skips its own summarize when the persisted plan equals
what was summarized last, eliminating the redundant model call.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The planning modal's draft sync only updated SQLite, never the in-memory
session, so Start Planning ran the agent against whatever fragment was
typed before the first 500ms debounce and silently dropped everything
after. Drafts that survived a backend restart couldn't be started at
all (lazy rebuild was missing for the start path), reopened drafts left
the textarea empty, and the model override the user picked at create
time was forgotten on reopen — Start Planning would silently use the
project default instead.
This change rehydrates initialPlan from SQLite in startExistingSession,
flushes the latest text from the request body before reading it back,
lazy-rebuilds the in-memory session from the persisted row when needed,
and round-trips the model override through inputPayload so reopen
restores it into modal state. Sidebar drafts now render a derived
preview (from inputPayload, never persisted as title) so multiple
drafts are distinguishable while editing, and summarizeDraftTitle fires
on textarea blur and modal close — gated on status rather than title
content so blur-then-edit still refreshes rather than locking to the
first snapshot.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged two changes: a new feature (FN-3229) that syncs planning drafts to the server in real-time while the user types, adding a PlanningModeModal component, a new ai-session-store for managing session state, and a dashboard API route to persist drafts; plus a performance fix replacing a blocking `e
Fusion-Task-Id: FN-3229
Inline object passed to setPlanningSessions widened type/status to string,
breaking AiSessionSummary's literal union. Hoist the draft into a typed
variable so the literals narrow correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Swap summary action emphasis so "Break into Tasks" is the primary CTA and "Create Single Task" is secondary
- Update loading labels and button copy to match the revised action mapping
- Adjust PlanningModeModal tests to assert new labels, button styling roles, and click targets
- Stabilize onboarding test setup by making global settings mock responses reusable across calls
Fusion-Task-Id: FN-3172
Merges FN-3139 planning comment infrastructure (comment inputs in mission/milestone-slice/planning modals, comment display in conversation history), FN-3119 Quick Chat FAB with slash-triggered skill menu and plugin integration, FN-3117 plugin dashboard views and chat session icons, and FN-3066 plugi
Fusion-Task-Id: FN-3139
This merge lands four features: a `/clear` command for Chat and Quick Chat with session banner fixes (FN-3062), a todo view redesign with restructured rows and improved styling (FN-3063), deterministic peer exchange shutdown with dashboard improvements (FN-3040), and a summary Q&A disclosure feature
Fusion-Task-Id: FN-3078
- Stop overwriting AI session titles with the "Planning session" fallback
during cross-tab broadcasts before initialPlan has hydrated on resume.
- Persist SessionNotificationBanner dismissals to localStorage keyed by
updatedAt so they survive refresh and auto-re-show on the next event.
- Add Settings → Appearance toggle to hide the banner entirely.
- Drop the inner scrollbar on the planning question list; let the outer
pane handle all scrolling.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add 8s polling fallback while view is "loading" so a missed SSE
question/summary event self-heals instead of leaving the panel stuck
on "thinking" until close+reopen.
- Track dismissed resumeSessionIds in a ref and drop loadSession from
the resume effect's deps so typing into the textarea no longer
re-fires resume and yanks the user back to the previous session.
- Guard SSE onThinking/onQuestion/onSummary against late events from a
torn-down connection by comparing the captured sessionId against
currentSessionIdRef.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move the show/hide archived control out of the sidebar header (where it
competed visually with the New Session button) into a small muted link
in a new sidebar footer below the list.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Archive/unarchive routes were returning the row-update boolean rather than
the actual archived flag, so a no-op unarchive replied with `archived: true`.
Re-read the row and report its current state instead. Also adds tests for
archive (terminal-only), unarchive event emission, and listAll filtering.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Planning sidebar's `/api/ai-sessions` listing filtered out `complete`
rows, so a session that finished while the modal was closed disappeared
on refresh even though the result was still in SQLite. Add
`?includeCompleted` / `?includeArchived` flags and a new `archived`
column (migration 57) so users can hide terminal sessions on demand
without deleting them; only `complete`/`error` rows are archivable so
live agents can't be orphaned.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Modal resize + size persistence
- Extract `useModalResizePersist` hook (ResizeObserver + localStorage),
apply to Files, Git Manager, GitHub Import, Workflow Steps, Automations
(ScheduledTasks), and Settings modals. Each gets `resize: both`, sane
min/max constraints, and a unique storage key.
- Bump default heights so the modals feel less cramped (Git: 92vh,
Workflow/Automation: 80vh, Settings: 80vh / 1100px).
Scrollbar theme
- Add a global `*::-webkit-scrollbar*` + `scrollbar-color` rule in
styles.css so chat, document, system stats, file browser, usage
indicator, etc. inherit the theme. Existing per-component overrides
(.board, .column-body, .settings-sidebar, planning modal) still win.
Document view
- Collapse "Show hidden" toggle and search input onto the same row as
the Project Files / Task Documents segmented control. Stack again
below 768px.
Mailbox / Todos
- Match Todos header treatment to the Mailbox header (typography,
padding, border).
- Add top spacing above Mailbox Inbox/Outbox/Agents tab bar so the
vertical gaps balance.
Settings
- Wider, resizable, persisted Settings modal.
- Project Models description and Authentication panel get proper
horizontal padding.
- Reorder project sidebar so "General" is first.
- Plugins page: clean margins, integrate refresh button, exclude
bundled runtimes from the "Installed Plugins" list (they were
appearing twice — once erroring, once in their own section).
- New "Updates" panel with auto-check toggle + "Check now" button
(frequency control noted as needing a backend schema field).
Background sessions
- Fix stale "AI N" / planning-icon badge: `handleDeleted` in
`useBackgroundSessions` now writes a tombstone, advances the
timestamp guard, and broadcasts completion so the cross-tab
sync store stops resurrecting the deleted session on the next
merge tick. Added regression test.
- Re-fetch list on SSE reconnect so terminal events fired during a
network blip don't get permanently lost.
System stats
- Refresh button uses correct single class (was getting both `btn`
and `btn-icon`, which conflicted on padding/border).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Sidebar lists all planning sessions for the project (any status) with
inline status badges, relative timestamps, "+ New session", and an
inline delete confirm. Mobile collapses to a single pane with a back
chevron in the header.
- Closing the modal (X / Escape / overlay) no longer cancels the server
session — it stays in the list, resumable. Only an explicit Delete
cancels + removes. Removes the now-redundant minimize button.
- Add re-sync on reopen so a session whose terminal SSE event was missed
doesn't stay stuck on a stale loading view; previously only a hard
reload recovered.
- Persist user-chosen modal width/height across opens via localStorage,
driven by a ResizeObserver on the modal element.
- Theme the modal scrollbars to match the rest of the app.
- Banner dismiss only hides the banner now — it must not delete the
underlying session, since sessions are first-class in the new sidebar.
- Refresh background sessions list on SSE reconnect so the footer "AI N"
pill never gets stuck on tombstoned sessions after a network blip.
- Drop selection + broadcast completion on Create Task / Create Tasks
so the footer count drops in lockstep instead of waiting on SSE.
- Auto-scroll the AI thinking output as new tokens stream in (only when
already pinned to the tail).
- Guard overlay-click dismissal with a mousedown-on-overlay check so
releasing a resize drag outside the modal doesn't close it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The task card timer chip previously fell back through several metrics
(timed duration → workflow runtime → wallclock), so cards showed only a
subset of execution time. For FN-2714 this rendered <1m on the card while
the stats tab reported >2m of workflow runtime.
The chip now reports the sum of [timing]-tagged log events and workflow
step runtime (matching the new "Total execution time" metric in the stats
panel), with live elapsed for in-progress workflow steps. When neither
metric is recorded, the chip is hidden rather than falling back to
wallclock.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The "restore description from localStorage" branch ran inside an effect
whose deps included handleStartPlanning, and that callback regenerated on
every change to initialPlan. So every keystroke would re-fire the effect,
hit the same `getPlanningDescription` value, and overwrite what the user
just typed.
Guard the restore with a one-shot ref so it only runs the first time the
modal opens, and reset the ref when the modal closes so a future re-open
still picks up an updated persisted value.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two related planning-mode issues:
1. The streaming "thinking" panel only showed for models that emit explicit
thinking_delta events (e.g. Anthropic Extended Thinking). For every other
model the user saw a spinner with no streaming content because text_delta
was being accumulated server-side without being broadcast over SSE. Now
onText also forwards deltas through the same stream channel so any model
surfaces its in-flight output.
2. Returning to the planning screen after the browser tab was backgrounded
long enough for the SSE socket to time out would land the user in a
permanent error view ("Session failed while contacting the AI") even
though the server session was still alive. The onError handler now first
re-fetches the AI session row; if the server still reports the session as
generating or awaiting_input it silently reconnects without surfacing the
transient error. Only genuine server-side failures still surface.
Tests for the obsolete manual-retry recovery path were rewritten as
auto-recovery assertions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Split app/styles.css from ~40k lines down to ~4.5k. Created 56 co-located
component CSS files in app/components/, each imported by its owning .tsx.
The remainder of styles.css holds genuinely global rules (design tokens,
.btn/.card/.modal/.form-input primitives, cross-component @media overrides).
- Lazy-load 13 heavy views (AgentsView, RoadmapsView, NodesView, etc.) via
React.lazy + Suspense; prefetch all chunks on idle so first navigation is
instant. Initial JS bundle: 1.58 MB → 1.16 MB (-26%). Initial CSS bundle:
635 kB → 471 kB (-26%); the rest splits into 13 per-view chunks.
- Add app/test/cssFixture.ts exposing loadAllAppCss() + loadAllAppCssBaseOnly()
so CSS regression tests load the full per-component bundle (mirroring Vite
source order). Migrate 30+ tests off direct readFileSync('../styles.css').
- Enable test.css: { include: [/.+/] } in vitest.config.ts so component CSS
imports actually inject styles in jsdom (fixes getComputedStyle assertions).
- Add ESLint rule (no-restricted-syntax) banning direct styles.css reads in
dashboard test files; points at loadAllAppCss() instead.
- Restore lost utility classes (.text-muted, .text-secondary, .text-dim,
.form-input) and rescue dropped chat tool-call rules into QuickChatFAB.css.
- Mobile fixes along the way: scroll containment for view containers
(min-height:0 + -webkit-overflow-scrolling), QuickChatFAB full-screen on
mobile (with safe-area-inset for iOS home bar), AgentsView single-row
header layout, ActivityLogModal close button on right, model-combobox
z-index above the mobile quick-chat panel.
- Bug fix: SkillsView toggle was display:none which hid the input from the
accessibility tree; replaced with the visually-hidden pattern so screen
readers + getByRole still find the checkbox.
- Bug fix: standalone Delete button in TaskDetailModal for triage-column
tasks (Actions dropdown is hidden in triage state, so previously no way
to delete a freshly-created task without status change first).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Parallel subagent pass: four typescript-pro agents on non-overlapping scopes.
Patterns applied:
- catch (err: any) { ... err.message ... } → catch (err) { ... getErrorMessage(err) ... }
using the new @fusion/core helper. Bare catch {} where the error was unused.
- SQLite row types: defined typed XxxRow interfaces per table and cast
.all()/.get() results via `as unknown as XxxRow[]` (the double cast is
required because better-sqlite3 returns Record<string, SQLOutputValue>).
- rowToX(row: any) converters: typed argument with the matching row interface.
- Dynamic settings key writes: (settings as Record<string, unknown>)[key].
- React event handlers and setState callbacks: inferred types or concrete
React.{Mouse,Change,Form}Event<...> where needed.
- pi-claude-cli: local PiMessage / PiContext duck types to avoid re-typing
pi-ai concrete shapes; typed Claude stream event message fields.
72 files changed, ~400 anys eliminated. Typecheck passes across the workspace.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add optional summary payload support to planning create-task and start-breakdown API client calls
- Pass edited summary data from PlanningModeModal when creating a task or starting breakdown
- Parse and validate summary overrides in planning routes and prioritize override data when present
- Add and update dashboard tests to verify override handling and modal call expectations
- Handle retry API "not in an error state" responses by refreshing the server session instead of failing immediately
- Restore the correct view state for generating, awaiting_input, complete, and error sessions during retry recovery
- Reconnect planning/interview/subtask streams only when needed while preserving in-flight output and history
- Add regression tests for connection-loss retry recovery across PlanningModeModal, MissionInterviewModal, and SubtaskBreakdownModal
- Add role=dialog and aria-modal attributes to all modal dialogs for accessibility
- Standardize close button aria-labels across all modals
- Unify overlay backdrop-filter, z-index, and background styles in styles.css
- Add light theme overrides for non-standard overlay backgrounds
- Update AgentListModal tests to reflect new aria attributes
- Add changeset for @gsxdsm/fusion package