Commit Graph

14 Commits

Author SHA1 Message Date
gsxdsm
8a88e23b9c feat(dashboard): UI polish pass — resizable modals, themed scrollbars, settings overhaul
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>
2026-04-27 17:26:07 -07:00
gsxdsm
d73f227cc6 feat(dashboard): redesign Planning modal as two-pane session manager
- 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>
2026-04-27 16:58:35 -07:00
gsxdsm
9514d12ef2 fix: dismiss background tasks even when session lock-conflicted
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>
2026-04-26 23:13:08 -07:00
Fusion
e2e79ec704 fix(FN-2534): prevent dismissed background sessions from resurfacing
- 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
2026-04-25 15:17:52 -07:00
Fusion
4bd7999153 fix(FN-2177): exclude terminal AI sessions from background list
- 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
2026-04-19 20:48:13 -07:00
gsxdsm
3a05ea0198 feat(FN-2092): merge fusion/fn-2092 2026-04-18 22:07:20 -07:00
Fusion
39e833b91e feat(FN-2014): merge fusion/fn-2014 2026-04-17 14:31:43 -07:00
gsxdsm
e4b05b1c4f fix(FN-1620): show error sessions in notification banner
- 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
2026-04-12 13:46:32 -07:00
gsxdsm
97e153b754 feat(FN-1456): add explicit abandon flow for planning and subtask AI sessions
- 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
2026-04-09 19:35:17 -07:00
gsxdsm
2a34ebe6cc feat(FN-1154): sync AI session state across browser tabs
- 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
2026-04-08 16:48:35 -07:00
gsxdsm
0ff6d42c0f feat(FN-1152): add retry flows for failed AI planning sessions
- 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
2026-04-08 15:10:46 -07:00
gsxdsm
f47d1c5c17 feat(FN-1132): support resuming completed planning sessions
- 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
2026-04-08 02:06:37 -07:00
gsxdsm
0eb8d3b594 feat(FN-934): add active planning session badge to Header
- 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
2026-04-04 15:10:11 -07:00
gsxdsm
eef87a2aea feat: add background AI sessions with persistent storage and SSE streaming
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>
2026-04-04 13:42:02 -07:00