Skip to content

feat(web): the sidebar as a tree, with what needs you and pull requests - #443

Merged
kalaspuff merged 38 commits into
mainfrom
fctl/850-tree-sidebar
Nov 7, 2026
Merged

kalaspuff merged 38 commits into
mainfrom
fctl/850-tree-sidebar

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The left sidebar becomes a tree that starts with what needs you. At the top are the Agent Floor, Needs you, and Pull requests with how many are ready for review. Below them come your workspaces and their projects, each with its icon and a count of sessions at work. Under each project are its sessions at work and those that ended in the last hour. The project a page is about also shows links to its own pull requests and tickets. The sidebar is wider by default (288 px, was 244). You can drag its edge from 240 to 420 px, or use the arrow keys on the edge; a double click resets it. ⌘\ (Ctrl+) folds it into a 60 px rail of icons that keeps the counts. On phones it stays a drawer. The browser keeps the width, the fold and whether Needs you is open.

  • Needs you lists what the sessions you started or follow are waiting on you for, most pressing first: an agent's question (from feat: agents ask people for their input with fctl ask #441, shown on two lines), a failure in the last day, failed checks, a pull request its agent finished, a reply, a pause on a usage limit. Each session shows up once, for its most pressing need. It looks through a list of its own, from a new ?yours=1 filter on GET /api/v1/sessions (sessions the caller started or follows), so other people's sessions can't push yours out. The count goes in front of the tab's title ("(3) fctl") and on the app's icon when it is installed; signing out clears it.
  • On feat: a page of pull requests, sorted by what each needs next #442's page for one project, that project stays open with its own link lit. A session opened by link opens its project even when no list has it.
  • The folded rail keeps Settings, and Admin with its early-access count for admins.
  • Maintainers change a project's icon from its row, with feat: projects keep an icon, chosen from IconMCP's #440's picker. The search button shows the platform's own shortcut (⌘K or Ctrl K); it used to always show ⌘K.

The old sidebar is removed. I checked the new one in cargo xtask demo: both themes, folded, and at phone width. I also checked ?yours=1 there by following and unfollowing someone else's session. The shell's tests cover the order of Needs you and what it looks through, the count in the title and on the icon, the pull requests count, the open project on each page, and the folded rail with ⌘\ only beside the page. cargo xtask check lint, npm run check and the web suite (1197 tests) pass.

Related

It builds on the three pull requests that came before it, now all merged: project icons, fctl ask and the pull requests page.

Screenshots

These come from cargo xtask demo at 1440 × 900, as its Noor Haddad sees it. Each pair shows main's sidebar first, then this branch's.

Dark theme, on a session:

Before: main's sidebar, dark
After: the tree, dark

Light theme, on the same session:

Before: main's sidebar, light
After: the tree, light

Folded into its rail. A dot marks a project with sessions at work, blue when one of its agents is asking you something. The badges count the pull requests ready for review and what needs you:

Folded into its rail

The drawer on a phone (390 px), in both themes:

On a phone, dark and light

On #442's pull requests page for one project, with that project's own link lit:

With a project's pull requests

Worth confirming

  • Decision: the old sidebar is gone, not kept behind a setting. Of the proposal's other designs, only the rail remains, as the folded sidebar.
  • Decision: Needs you covers the sessions you started or follow, not everything in your projects. A failure stays in it for a day. Drafts, archived sessions and review agents' sessions are left out.
  • Decision: the count in the tab's title and on the app's icon includes everything in Needs you, finished pull requests and replies too, not only questions and failures.
  • Decision: the open project's second link goes to its Tickets tab. There is no task list of its own yet.
  • Decision: the sidebar is 288 px wide by default (was 244), and between 240 and 420 px when dragged.

fctl session


Note

Medium risk. It replaces the whole web app shell and sidebar and adds a ?yours=1 filter to the sessions list endpoint, which every signed-in page touches, though nothing is stored or migrated.

What it does. Turns the sidebar into a tree of workspaces and projects, with a Needs you list (questions, failed checks, pull requests waiting on you), pull request links and counts, a resizable and foldable width, and the count on the page title and app icon. A new optional ?yours=1 filter on GET /api/v1/sessions lists the sessions the caller started or follows, so Needs you doesn't depend on lists of everyone's sessions.

New session filter. GET /api/v1/sessions gains an optional yours=1 filter, documented in docs/api.md; it has no client method or CLI flag yet.

fctl review's first look at 1908dc7 · 20 files, +2091 −677 · Review agent settings

fctl-sh Bot added 19 commits November 7, 2026 00:41
Maintainers choose a project's icon on its page, in its settings or as
they create it (fctl projects set --icon): an IconMCP glyph in a
workspace color, drawn in outline, duotone or solid. Everyone in the
workspace sees it in the sidebar, on the project's page, on the
workspace's and in search. A project without one shows the glyph that
fits its name and description, in ink lines.

The control plane keeps it as JSON in projects.icon (migration 0050)
and checks only a name's shape, so the set can grow with the web app,
which carries about 150 glyphs in a chunk of their own and draws them as
React elements. The picker keeps a draft until it's saved, searches by
name, label and tags, and works from the keyboard.
An agent that needs a person to go on asks with fctl ask, offering
answers to click (-o), and ends its turn. The call goes through
fctl-agent and its host like fctl memory (AgentCall::Ask). SessionDO
keeps the session's one open question (Session.question, written
through to sessions.question by migration 0051), shows it to viewers
and dashboards at once, and drops it when a person's message arrives.
Followers hear of it as the turn ends, in a notification of its own:
"shop#231 asks you", with the question and its answers.

The session page shows the question above the composer with its
answers as buttons; the transcript keeps a question_asked notice; the
Agent Floor, project pages and the sidebar show sessions that ask in
blue; fctl show and fctl sessions print the question. fctl-agent tells
Claude about fctl ask where the sandbox's fctl has it, and fake-claude
asks with 'ask <question> / <answer> / <answer>' (ADR 0078).
…nMCP's licence

- ⌘Enter in the icon grid saved twice: the grid's handler saved and let
  the key go on to the picker's, which saved again. The picker saves
  alone now, once until the save settles.
- A color or a style this build doesn't know (a newer control plane's)
  threw while drawing: it draws as ink lines now.
- IconMCP's MIT notice was a // comment, which the minifier dropped: it
  is a legal comment now, which the build keeps (comments.legal).
- docs/api.md names the icon field of projects.
…topped

A question stayed on a session that failed or that someone stopped, so
lists and the sidebar went on saying it asked, with nobody able to
answer. It goes now when the session fails, and when FleetDO stops it
for a person or a deletion (ControlState::drop_question); an idle stop
or a runner's drain keeps it, since a message resumes the session and
answers it. Also puts SessionDO's ask and the transcript's
QuestionNotice where they don't take another's doc comment.
… once

- A question that came after FleetDO's stop dropped one, or after the
  session failed, stayed with nobody to answer it: SessionDO refuses a
  new one while the session is stopping, stopped or failed (taking one
  back still goes).
- The same question again, as an agent that retries after a timeout
  asks it, no longer publishes it again or notifies again.
- Find in the transcript reads a question_asked notice as its question
  alone, as the page shows it.
- fake-claude asks only on a line that starts with 'ask', not wherever
  a message says it (fctl's follow-ups do).
/pulls lists the pull requests agents opened or worked on, each once
with the sessions that list it, as the session that heard of it last
has it. Open ones come sorted by what they need: ready for review
(their agents finished and nothing failed), checks failing, agents at
work, in a merge queue, drafts; merged and closed ones by when. Tabs
count each state, a filter finds them by title, repository, number or
session, a picker narrows them to a workspace or a project, and Mine to
your sessions'. j/k move through them, Enter opens the session, o the
pull request on GitHub, / filters. The feed keeps it current.

GET /api/v1/sessions takes ?pulls=open|merged|closed|any for it, and
fctl pulls lists the same in a terminal (fctl_domain::pulls::listed).
Pull requests is in ⌘K too.
…50-tree-sidebar

# Conflicts:
#	crates/fctl-domain/src/validate.rs
#	crates/fctl-proto/src/api.rs
#	docs/architecture.md
…l/850-tree-sidebar

# Conflicts:
#	crates/fctl/src/main.rs
#	web/src/components/shell/command-palette.tsx
The open pull requests come in a list of their own, as the sidebar
will ask for them, so that the page shows them at once; the merged and
closed ones load beside them for their tabs and counts. Shorter copy
and a filter hint that fits.
The pulls filter read pull_request_sessions.state, which changes only
when the control plane hears from GitHub: pull requests that agents saw
merged on an instance without webhooks stayed open there, and the page
counted none merged. The filter now reads the sessions' own lists, as
their pages show them. The page and fctl pulls ask for every state and
take each pull request's from the session that heard of it last, since
one that heard of it earlier may still say open.
The sidebar becomes a tree, 288 px wide by default:

- At the top, the Agent Floor, Needs you and Pull requests. Needs you
  lists what the sessions you started or follow wait on you for, most
  pressing first (an agent's question, a failure, failed checks, a pull
  request its agent finished, a reply, a pause) and opens in place. Its
  count goes in the tab's title and on the installed app's icon. Pull
  requests opens /pulls and counts those ready for review.
- Each workspace's projects show their icons and their sessions at work.
  The project a page is about opens into its own links, its pull
  requests and its tasks, above its sessions, and its maintainers change
  its icon from its row.
- People drag its edge to make it wider or narrower, which this browser
  keeps (a double click puts it back), and fold it into a rail of
  workspace avatars and project icons with mod+\.

Workspaces and projects still drag into their order, kept lists still
show at once, and the drawer works on phones as before. The pull
requests page shows each project's icon too.
…e live

- Merged and closed ones come by when they merged or closed, in their
  days' order, with that time on their rows: GitHub's last change (a
  comment, say) put one merged long ago first.
- A session that lists a new pull request brings the lists of pull
  requests again: one opened mid-run showed only once its session's
  status changed.
- The page says when it can't load, with Try again.
- fctl pulls says when it looked at only the newest sessions, and its
  --json carries next_before.
- fctl_domain::pulls::listed keeps only GitHub's pull request links, as
  the web app's list does.
…l/850-tree-sidebar

# Conflicts:
#	web/src/routes/pulls.tsx
@fctl-review

This comment has been minimized.

Comment thread crates/fctl-proto/src/api.rs Resolved
Comment thread web/src/components/shell/sidebar.tsx Resolved
Comment thread web/src/components/shell/sidebar.tsx Resolved
Comment thread web/src/components/shell/sidebar.tsx Resolved
Comment thread web/src/components/shell/app-shell.tsx Resolved
Comment thread web/src/lib/attention.ts Resolved
Comment thread web/src/lib/needs.ts Resolved
@fctl-review

This comment has been minimized.

Comment thread web/src/components/shell/sidebar.tsx Resolved
fctl-sh Bot added 2 commits November 7, 2026 01:59
…beside the page

- Needs you looks through the sessions you started or follow from the last
  day (GET /api/v1/sessions?yours=1), so a failure no longer drops out when
  twelve other sessions end, and is empty until it is known who you are.
- The pull requests page of one project keeps that project open with its own
  link lit, and a session no list has opens its project, as its page loaded it.
- The folded rail has Settings, and Admin with its early-access count.
- Closed, Needs you's links are inert; ⌘\ folds only where the sidebar
  shows beside the page; signing out takes the count off the app's icon.
@fctl-sh

fctl-sh Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

On the review of 79b330f, A withdrawn or answered question stays in Needs you (web/src/lib/feed.ts): fixed in #441, where the bug came from, in 82da7f5, and merged here in 4bae12d. patchSession now drops a cached question when the newer summary has none, since the server leaves out empty fields. It still fills in what else the summary leaves out, such as the caller's role. Before this, a question taken back while the session stayed idle stayed in the lists, in Needs you, and in the count on the title and icon. The session page itself was right all along, because it replaces the summary rather than merging it. queries.test.ts covers both cases, and the first one fails without the fix.

fctl-sh Bot and others added 7 commits November 7, 2026 02:13
# Conflicts:
#	crates/fctl-domain/src/validate.rs
#	crates/fctl-proto/src/api.rs
#	docs/architecture.md
# Conflicts:
#	web/src/components/shell/command-palette.tsx
# Conflicts:
#	crates/fctl-domain/src/validate.rs
#	crates/fctl-proto/src/api.rs
#	docs/architecture.md
#	web/src/components/shell/app-shell.tsx
#	web/src/components/shell/command-palette.tsx
@fctl-review

fctl-review Bot commented Nov 7, 2026

Copy link
Copy Markdown

fctl reviewed ec32a7d and found 1 issue.

Reviewed by fctl · Review agent settings

}

/** The open pull requests the sidebar counts, as the pull requests page asks for them. */
export const OPEN_PULLS = { pulls: "open" as const, limit: 200 };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sidebar pull request count can disagree with the page

Medium severity. OPEN_PULLS asks the server for pulls: "open", which only returns sessions whose own list holds an open pull request. If one session still lists a pull request as open and a newer session lists it as merged, the sidebar never gets the newer one, so listPulls counts it as ready for review while the Pull requests page (pulls: "any", newest state wins) files it under Merged.

Suggested change
export const OPEN_PULLS = { pulls: "open" as const, limit: 200 };
export const OPEN_PULLS = { pulls: "any" as const, limit: 200 };

Found by fctl review in ec32a7d.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and I missed it before #443 merged. It's tracked in #446 (the sidebar should count from the same pulls: "any" list as the page), together with two related findings on #442.

fctl-sh Bot added 4 commits November 7, 2026 10:43
# Conflicts:
#	crates/fctl/src/main.rs
#	web/src/components/shell/app-shell.tsx
# Conflicts:
#	crates/fctl-control/src/api/sessions.rs
#	docs/api.md
#	web/src/lib/api.ts
#	web/src/routes/pulls.tsx
@fctl-review

fctl-review Bot commented Nov 7, 2026

Copy link
Copy Markdown

fctl reviewed 1908dc7 and found 1 issue.

Also: DeleteAccount in web/src/routes/settings.tsx (line 1675) goes to /login?deleted=1 without clearAttention(), which the two sign-outs now call, so an installed app keeps the old count on its icon after an account is deleted.

Reviewed by fctl · Review agent settings

Comment thread docs/architecture.md
Comment on lines 3553 to +3556
goes too, and the sandbox boots from its disk. A VM that runs through
the jailer saves its state at the root of its chroot, as the jail's
user, and the host takes it out to `saved/` before the jail goes; it
resumes in a new jail (below). A state saved in the jailer resumes
only in one, and one saved without it only without, so turning
`jailer` on or off lets the states kept before go. Image builders save
none: they boot afresh for each build.
the jailer saves none yet: Firecracker would write it in the jail's
chroot, which goes as the VM stops, so it boots from its disk. Image
builders save none either: they boot afresh for each build.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs for jailed VM saved state are reverted

Medium severity. The merge of main took out the paragraphs from #439 on how a jailed VM saves its state through its chroot and how a resume builds a new jail, and put back the older "saves none yet" wording. This branch changes nothing in crates/fctl-host, so the code still saves and resumes, and the doc now says it doesn't. Restore both hunks from origin/main so the file only gains the sidebar paragraph.

Found by fctl review in 1908dc7.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, and I missed this before #443 merged. To resolve #440's sentence, I took this branch's side of the whole file, which also dropped #439's two hunks. Main has had the old "saves none yet" wording since #443 merged, and so has fctl.sh. Tracked in #445; #447 restores both hunks exactly as #439 wrote them.

@kalaspuff
kalaspuff merged commit 944235a into main Nov 7, 2026
12 of 13 checks passed
@kalaspuff
kalaspuff deleted the fctl/850-tree-sidebar branch November 7, 2026 10:53
kalaspuff pushed a commit that referenced this pull request Nov 7, 2026
…464)

## Summary

Projects can have an icon of their own since #440, and the tree sidebar
(#443) shows one beside every project, but the demo cast had none, so
every Romanesco, milkfloat and punschrulle project showed the gray icon
the app picks for it. Each project of the cast now has one its people
chose, all duotone. Most use the workspace colors; a few have a color of
their own where the thing they show has one: Shop's carrot orange,
sourdough's crust, plantwatch's leaf green, and a violet cloud for Infra
so that no Romanesco project is gray. The seed sets them as it makes the
projects, and `the_cast_holds_together` fails on a glyph, color or style
the web app doesn't draw. The five project descriptions that began with
an emoji lose it, since the icon above them now shows the same thing.

`shoot.mjs` also takes what fctl.sh's redesigned features overview
needs: each page's tile shows a part of one of its shots at the app's
own size (`card`, in CSS pixels, written at twice that), instead of a
small thumbnail of the page's first shot. It also takes four new shots
for pages that showed the same screenshot twice. I ran `cargo xtask
demo` and took every feature page's shots from it, which are in the
fctl-site pull request below, and checked with `cargo test -p xtask`
(with an unknown icon to see the cast test fail), Clippy and rustfmt.

- hyperstructure/fctl-site#111

## Screenshots

The demo's sidebar at 09:10, before (left pair) and after (right pair),
in both themes:

![The sidebar before, with every project's icon in gray lines, and
after, with a carrot for Shop, a blue server stack for Platform, a
yellow van for Driver app, a violet cloud for Infra, a yellow route for
milkfloat, a blue gauge for Benchmarks, a loaf for sourdough, a green
sprout for plantwatch, a pink feather for Website and a pink climber for
Bookings](https://app.fctl.sh/api/v1/published/fJGE3iFqqkJkeInbhwtykGhNowENkEi5Uw0vdbcQSfa/sidebar-before-after.webp)

## Worth confirming

- **Decision:** the icons and colors: carrot (`#ff7a1a`), server stack
(blue), van (yellow), cloud (`#9b7bff`), route (yellow), gauge (blue),
bread (`#e0a458`), sprout (`#4cc76a`), feather (pink) and climbing
(pink), all duotone. Infra's cloud is violet rather than gray because it
was the only gray icon among Romanesco's projects. They're in
`cast.toml` and the demo skill's projects table.
- **Decision:** the emoji are gone from the five descriptions that had
them (🥕 Shop, 📱 Driver app, 🚐 milkfloat, 🍞 sourdough, 🌱 plantwatch).
Without that, the project header shows a carrot icon right above "🥕 The
web shop…".

[fctl session](https://app.fctl.sh/s/ses_01M6VD4JRYFH2CVB3D77Y947NG)

<!-- FCTL_REVIEW_SUMMARY -->
---

> [!NOTE]
> **Low risk.** It only touches the demo tooling in xtask, its cast data
and the demo skill's docs, nothing that ships in the product.
>
> **What it does.** Gives each project in the demo cast an icon, which
the seed sends when it creates the projects, and drops the emoji from
five project descriptions. A cast test checks that every icon's glyph,
color and style are ones the web app draws. `shoot.mjs` now crops each
fctl.sh feature page's tile from a shot at the app's own size, and takes
a few new shots.
>
> <sub>[fctl
review](https://app.fctl.sh/s/ses_01M6VF5R71TV90C5GPJF8ZDGXG)'s first
look at
[`c45083b`](c45083b)
· 6 files, +183 −55 · [Review agent
settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub>

<!-- /FCTL_REVIEW_SUMMARY -->

Co-authored-by: fctl-sh[bot] <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