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 X button in the footer's Background Tasks popover silently failed when
ai_sessions.lockedByTab pointed to a stale/closed tab: cancelPlanning et al.
returned 409, dismissSession set lockConflict and bailed before calling
deleteAiSession. Always proceed to delete; the dismissal tombstone already
prevents stale SSE/sync from resurrecting the session.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add dismissal tombstone tracking in useBackgroundSessions to ignore stale refresh, sync, and SSE updates for dismissed session IDs
- Treat terminal session states consistently and broadcast completion on dismiss so local/session-sync state remains converged
- Keep lock-conflicted planning cancellations visible instead of falsely dismissing the session when another tab owns the lock
- Expand useBackgroundSessions regression tests to cover stale sync/SSE resurrection, refresh behavior, lock-conflict handling, and newer-authoritative restore paths
- Limit background session inclusion to active statuses (generating and awaiting_input)
- Remove sessions from local state when SSE updates deliver complete or error terminal statuses
- Update useBackgroundSessions tests to assert terminal sessions are filtered out and removed on SSE updates
- Adjust session count expectations to reflect active-only tracking
- Update BackgroundTasksIndicator to display error sessions count alongside active sessions
- Include error sessions in App filter for notification banner visibility
- Add session cancellation for mission interviews on banner dismiss
- Add comprehensive test coverage for SessionNotificationBanner component
- Update useBackgroundSessions hook to expose error session counts
- Add abandon action to useBackgroundSessions hook for deterministic session cleanup
- Make background dismissal deterministic instead of relying on 7-day TTL expiration
- Update PlanningModeModal to include abandon button in header actions
- Add comprehensive tests for abandon behavior and session lifecycle
- Update dashboard guide with session lifecycle documentation
- Add a shared AiSessionSync store with BroadcastChannel + storage fallback, ownership locks, heartbeats, and stale-tab detection
- Merge cross-tab session snapshots into useBackgroundSessions with timestamp guards and rebroadcast SSE updates to peers
- Update background session UI and planning/mission/subtask modals to show active-tab lock status and only allow takeover when ownership is stale
- Add hook tests covering sync store messaging/fallback behavior and background session cross-tab merge flows
- Keep errored AI sessions retryable in the session store and add backend retry handlers for planning, subtask breakdown, and mission interview flows
- Add retry API routes and dashboard API client helpers for planning, subtask, and mission interview session retries
- Update PlanningModeModal, SubtaskBreakdownModal, MissionInterviewModal, and background session handling to show error states with retry/cancel UX
- Expand unit and integration tests across store, services, routes, and modal components to cover retry success and failure paths
- Include complete planning sessions in active session queries and background tracking
- Add create-task fallback to recover completed planning data from persisted ai session records
- Validate and reconstruct summary/initial plan data from stored JSON before creating tasks
- Expand tests for modal resume flow, session-store filtering, and route fallback behavior
- Add badge indicator to Planning button showing count of active background planning sessions
- Integrate useBackgroundSessions hook in App and Header components
- Add badge styles with pulse animation for active session indicator
- Add comprehensive tests for badge rendering and session count display
Introduces ai_sessions table (schema v9), AiSessionStore, and background
session support for mission interviews, planning, and subtask breakdown.
Adds BackgroundTasksIndicator component, SSE-based progress streaming,
and dashboard API routes for session management.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>