Repository navigation
feat(web): list a project's active sessions under it on a session's page - #234
Merged
Merged
Conversation
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.
kalaspuff
approved these changes
Oct 23, 2026
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 | |---|---| |  |  | |  |  |  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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withstatus=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.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.Verified
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.cargo xtask dev, driven with Playwright, with sessions working, waiting, paused and stopped in two workspaces:fctl runshowed up 170 ms later (queued: the runner was full) and left whenfctl stopstopped it.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.Made in fctl session https://app.fctl.sh/s/ses_01M5MGFAQ9D5TRYXDKE2EA95NM.