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>
This commit is contained in:
gsxdsm
2026-04-27 16:58:35 -07:00
parent 9eef425525
commit d73f227cc6
5 changed files with 195 additions and 40 deletions

View File

@@ -39,7 +39,7 @@
}
.planning-modal {
width: min(95vw, 960px);
width: min(95vw, 1200px);
max-width: 95vw;
min-width: 360px;
height: 85vh;
@@ -247,6 +247,9 @@
}
.planning-mobile-back {
/* Visible only on mobile (see media query below). On desktop the sidebar
is always visible alongside the detail pane, so a back button is never
needed. */
display: none;
background: none;
border: none;
@@ -276,7 +279,9 @@
.planning-modal-body--show-list .planning-detail {
display: none;
}
.planning-modal-body--show-detail .planning-mobile-back {
/* Show back button on mobile whenever it's rendered (the React component
only renders it when `mobileShowDetail` is true). */
.planning-mobile-back {
display: inline-flex;
}
/* Always keep delete button visible on mobile (no hover) */