Skip to content

feat(web): list a project's active sessions under it on a session's page - #234

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/178-when-in-the-session-viewer-for-an-agent
Oct 23, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/178-when-in-the-session-viewer-for-an-agent

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

On a session's page, the sidebar now lists the sessions of its project that haven't ended under the project: those starting, at work, waiting or paused. The one on the page is marked, so switching to another of the project's sessions takes one click. A line runs down beside them from the project's dot. Stopped and failed sessions are left out, as are review agents' (as on the Agent Floor). Other pages show the sidebar as before.

How

  • useLiveSessions (web/src/lib/queries.ts) asks for the project's sessions with status=active, as the Agent Floor's Working now list does. The feed already refetches session lists as sessions start and change, and patches them in place, so a session that ends leaves the list at once.
  • The sidebar finds the session's project from the page's path with useSessionSummary: the session page's query, which, until the summary comes, takes the session from a list in the cache. The project's list starts from the cached lists the same way. Switching between sessions, or opening one from the Agent Floor or the project page, shows the list from the first frame.
  • A session of a project the sidebar doesn't show (one shared with you, say) shows nothing under any project, and the sidebar asks for nothing.
  • Each project's row and its sessions are now one item to drag, so the sessions move with their project, and don't light up under the pointer meanwhile.
  • The getting-started guide says so, under Follow along and steer.

Verified

  • New tests in web/src/components/shell/app-shell.test.tsx: the sessions that haven't ended show under their project, and one the feed marks ended leaves; a session opened from a list shows them at once; nothing shows for a project the sidebar doesn't have, or on other pages. Each fails with its part of the change taken out.
  • cargo xtask check web (Biome, TypeScript, the web and standalone tests, the production build) passes.
  • In cargo xtask dev, driven with Playwright, with sessions working, waiting, paused and stopped in two workspaces:
    • Switching between the project's sessions from the sidebar, and opening one from the Agent Floor, keeps the list on every animation frame.
    • A session started with fctl run showed up 170 ms later (queued: the runner was full) and left when fctl stop stopped it.
    • Dragging the project with its sessions, and back, saved the order; Escape mid-drag left it as it was.
    • On a phone, a tap on a session in the drawer opens it, and the drawer goes at once.

Screenshots

At c73c6a1, in cargo xtask dev, on the page of playground#2 (working): playground#3 waits for a message, #4 is paused, #1 and #5 are stopped and don't show. The sidebar at 2x, then on a phone, mid-drag and the whole page.

Before After
Before: the sidebar on a session's page, dark theme After: Playground's three active sessions under it, the one on the page marked, dark theme
Before: the sidebar on a session's page, light theme After: Playground's three active sessions under it, the one on the page marked, light theme
On a phone (390 px), the menu open Playground dragged, with its sessions
After: the phone drawer lists Playground's sessions under it After: Playground lifted mid-drag, its sessions on the lifted row

After: the whole session page, 1440 px wide, dark theme

Made in fctl session https://app.fctl.sh/s/ses_01M5MGFAQ9D5TRYXDKE2EA95NM.

On a session's page, the sidebar lists the sessions of its project that
haven't ended under the project (starting, at work, waiting or paused),
the one on the page marked, so that switching to another takes a click.
A line runs down from the project's dot beside them, and the project's
row carries them when it is dragged.

The list is the project's sessions with status=active, which the feed
keeps current; a session that ends leaves it at once. Until it comes,
and until a session opened from a list has its own summary, the lists
in the cache stand in, so that the sessions show from the first frame.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 23, 2026 14:15
@kalaspuff
kalaspuff merged commit 2fbdae8 into main Oct 23, 2026
10 checks passed
@kalaspuff
kalaspuff deleted the fctl/178-when-in-the-session-viewer-for-an-agent branch October 23, 2026 14:17
kalaspuff pushed a commit that referenced this pull request Oct 23, 2026
…237)

Since #234, the sidebar lists a project's sessions that haven't ended
(starting, at work, waiting or paused) under the project on the pages of
its sessions. Now it lists them on the project's own page too, so the
list stays in place going between the project and its sessions, and the
project's other tabs (Settings, Memory, …) are a click from its sessions
as well.

## How

The sidebar takes the project from a project's page's path (`/p/<slug>`,
or `/p/<id>`, which the page also opens) as it takes a session's project
from a session's page. The list is the same query (`useLiveSessions`),
so going from the project to one of its sessions and back asks for
nothing new. On a project's page no session is marked; the project's row
is, as before. The getting-started guide says so.

## Verified

- A new test in `web/src/components/shell/app-shell.test.tsx`: on a
project's page, by its slug and by its id, the sidebar lists the
project's sessions that haven't ended under it. It fails without the
change.
- `cargo xtask check web` (Biome, TypeScript, the web and standalone
tests, the production build) passes.
- In `cargo xtask dev`, driven with Playwright, sampling the sidebar's
list on every animation frame: going from Playground's page to one of
its sessions from the sidebar, and back from the project's row, kept its
three sessions on every frame; Docs site's page swapped in its own list
without an empty frame, and Billing, with none at work, shows no list.

## Screenshots

At 8ab356d, in `cargo xtask dev`, Playground's page: playground#2 is
working, #3 waits for a message, #4 is paused, #1 and #5 are stopped and
don't show. The sidebar at 2x, then the whole page.

| Before | After |
|---|---|
| ![Before: Playground's page, its row marked and nothing under it, dark
theme](https://app.fctl.sh/api/v1/published/pVemSy6FqiJX4k7l4Aua21iyP9gxjotlIUv5zBj9seO/project-before-dark.png)
| ![After: Playground's three active sessions under its marked row, dark
theme](https://app.fctl.sh/api/v1/published/y1KgijlKLbtSrRgPjdKXTUMUQuIi9vAl6NFjvG9soWF/project-after-dark.png)
|
| ![Before: Playground's page, its row marked and nothing under it,
light
theme](https://app.fctl.sh/api/v1/published/0BOT2v6NpFTzKhtHdfxjtXsGQXD9U2gfOVgt8FmU1Ez/project-before-light.png)
| ![After: Playground's three active sessions under its marked row,
light
theme](https://app.fctl.sh/api/v1/published/tSpBT8yTRCsHItXtTqAoOctGE8CEmieWYdgMUzy1BEO/project-after-light.png)
|

![After: Playground's whole page, 1440 px wide, dark
theme](https://app.fctl.sh/api/v1/published/HlMg8bnAJaeYNGC8OK8A8Fb080QwRX7qVfnUStj5Hu7/project-after-page-dark.png)

Made in fctl session
https://app.fctl.sh/s/ses_01M5MGFAQ9D5TRYXDKE2EA95NM.

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant