Skip to content

feat(web): group a project's sessions by recency - #245

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/208-on-the-project-view-it-would-be-nice-if
Oct 23, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/208-on-the-project-view-it-would-be-nice-if

Conversation

@fctl-sh

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

Copy link
Copy Markdown
Contributor

A project's Sessions tab listed its sessions in one list, newest first by when they started, so the last few hours' work looked like last week's, and the times beside them jumped around (3h, 4h, 7h, 4h). It now lists them in sections, as the Agent Floor does:

  • Working now: every session that hasn't ended, with how many on the right, as on the Agent Floor. They come in a request of their own (status=active), so a session at work shows however long ago it started: before, one that started before the project's 100 newest sessions didn't show at all. It is the request the sidebar already makes for the project (by its id, without mine), so the page makes no more requests than before.
  • Recently: the ended sessions that last moved in the past day, the ones whose times read in minutes and hours.
  • Older: the rest.

The ended sessions are listed by when they last moved, so their times read in order, and a days-old session that came back for a comment on its pull request shows at the top of Recently. The ones at work stay newest first, so that they keep their places while they work. A session that ends or resumes moves to its section at once, as the feed marks it.

All, Active and Mine stay above the sections. Active shows Working now alone, which says "No agents are working." where it used to say "No sessions yet" in a project with only ended sessions. Mine narrows every section to the sessions you started. As before, the page shows the project's 100 newest ended sessions; paging through older ones would be a change of its own.

The grouping is in web/src/lib/sessions.ts, with unit tests, and the home page takes its list of active statuses from there now. docs/getting-started.md says what each section holds.

Verification

  • cargo xtask check web: Biome, TypeScript, the 681 tests and the production build.
  • cargo xtask dev with 13 sessions in Playground: 10 stopped and backdated in the local D1 to between 40 minutes and 12 days ago (one started 6 days ago and last moved 5 hours ago), and 3 at work. With the page open, stopping Delete a project from the web app and the CLI #13 from the CLI moved it to the top of Recently within seconds, without a reload. On load, the page made one request for the project's active sessions, shared with the sidebar, and one for its ended ones.
  • The Active and Mine filters, a project with nothing at work, and a project with no sessions, which still says "No sessions yet".

Screenshots

At cd3b1d5, the Playground project of the dev stack, with the same sessions before and after.

The dark theme, 1440 px wide:

Before After
Before: the project's sessions in one list, the times beside them out of order After: the same sessions under Working now, Recently and Older

A phone, 390 px wide:

Before After
Before: one list on a phone After: the sections on a phone

The light theme, and the project once nothing is at work, where Working now says so, as on the Agent Floor:

Light theme Nothing at work
After: the sections in the light theme After: Working now says no agents are working, above Recently

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

A project's Sessions tab listed its sessions in one list, newest first, so
recent work and old work looked alike, and a session at work that started
before the 100 newest didn't show. It now lists them in sections, as the
Agent Floor does: Working now (every session that hasn't ended, fetched on
its own, in the same request as the sidebar's), Recently (the ended ones
that last moved in the past day, whose times read in minutes and hours)
and Older, the ended ones by when they last moved. A session that ends or
resumes moves between them at once.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 23, 2026 22:10
@kalaspuff
kalaspuff merged commit 306d3a5 into main Oct 23, 2026
10 checks passed
@kalaspuff
kalaspuff deleted the fctl/208-on-the-project-view-it-would-be-nice-if branch October 23, 2026 22:18
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