#2152

feat: list every Space and its Sessions in Home

DraftDouglasymlaiwants to merge intofrom

Pull Request

Related Issue

N/A. This is maintainer-directed work, part of the plan in #2113.

Description

Draft. Part 3 of 3. It's based on #2151 (pin Spaces to the rail), which is based on #2150, so this diff shows only what this part adds. Merge in order: #2150, then #2151, then this.

Problem

Home lists Spaces, but not their Sessions. To open or start a Session, people first have to enter its Space. Work that's waiting for a reply in another Space is easy to miss.

Fix

  • Two places on one page: / now shows either Home or the Space view, and the app remembers which one was shown last.
    • Both show the same Workspace content, so a running Task, an open Session and a typed draft are kept when people move between Home, the Space view and Settings.
    • Opening a tab that only the Space view has (Files, Dispatch, Automations and so on) moves to the Space view.
  • Home sidebar:
    • Every Space is listed with its four most recent Sessions, and Show all opens the rest.
    • A Needs you group at the top lists the Sessions waiting for a reply, from every Space, in the order they started waiting.
    • Hovering a Space's icon turns it into the fold control, and folds are remembered.
    • Rows are sorted once each time Home opens, so they don't move under the pointer. A new Session or Space joins at the top.
    • Session status comes from the loaded Session when there is one, and otherwise from the same GET /runs/attention the rail reads. One poll serves both.
  • Sessions open in Home:
    • Clicking a Session from any Space opens it next to the Home sidebar, and that Space becomes active first. A Session that has its own window is brought forward instead.
    • The Session header shows only the Session's name.
    • In Home, the Space menu adds "Open in Space view".
  • New session in Home:
    • ⇧⌘H and the rail's Home open New session, or keep the open Session.
    • The composer shows a Space chip that picks the Space the new Session starts in.
  • Workspace page: a Space's overview in Home becomes its Workspace page, with the Space's name as the title and its actions in the header.
  • Moved, not changed:
    • The Session rename, delete and end dialogs moved out of the Space sidebar into SessionControlDialogs, so both sidebars share them.
    • The "should this Session be listed" and "open this Session" logic moved into src/lib/sessionOpen.ts.

Testing

  • npm run type-check, npm run check:i18n, npm run check:design-tokens and ESLint on the changed files pass.
  • Full vitest run: no new failures. The tests that fail here fail on main too, apart from two that depend on the local setup: the Electron build-config test, and the session-execution integration test, which needs a running backend.
  • New unit tests:
    • the Home sidebar: folding, Show all, the Needs you group, and opening a Session from another Space;
    • the sidebar ordering model;
    • the place switches between Home and the Space view;
    • the composer Space chip;
    • the top bar's Space context;
    • the ⇧⌘H and ⌘1 commands.
  • Not yet tested by hand. Screenshots will follow before this leaves Draft.

Testing Evidence (REQUIRED)

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

Manual testing and screenshots are still to do.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

Activity

58

This pull request is a draft

Merging is unavailable until it is marked ready for review.