Repository navigation
feat(web): the sidebar as a tree, with what needs you and pull requests - #443
Conversation
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.
…l/850-tree-sidebar
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.
…l/850-tree-sidebar
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
…st when a refresh fails
…l/850-tree-sidebar # Conflicts: # web/src/routes/pulls.tsx
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…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.
…l/850-tree-sidebar
…l/850-tree-sidebar # Conflicts: # web/src/routes/pulls.tsx
|
On the review of 79b330f, A withdrawn or answered question stays in Needs you ( |
…l/850-tree-sidebar
# 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
…l/850-tree-sidebar
|
fctl reviewed 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 }; |
There was a problem hiding this comment.
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.
| 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.
# Conflicts: # crates/fctl/src/main.rs
# Conflicts: # crates/fctl/src/main.rs # web/src/components/shell/app-shell.tsx
…l/850-tree-sidebar
# Conflicts: # crates/fctl-control/src/api/sessions.rs # docs/api.md # web/src/lib/api.ts # web/src/routes/pulls.tsx
|
fctl reviewed Also: Reviewed by fctl · Review agent settings |
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…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:  ## 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>
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.
?yours=1filter onGET /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.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=1there 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 checkand the web suite (1197 tests) pass.Related
It builds on the three pull requests that came before it, now all merged: project icons,
fctl askand the pull requests page.Screenshots
These come from
cargo xtask demoat 1440 × 900, as its Noor Haddad sees it. Each pair shows main's sidebar first, then this branch's.Dark theme, on a session:
Light theme, on the same session:
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:
The drawer on a phone (390 px), in both themes:
On #442's pull requests page for one project, with that project's own link lit:
Worth confirming
fctl session
Note
Medium risk. It replaces the whole web app shell and sidebar and adds a
?yours=1filter 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=1filter onGET /api/v1/sessionslists 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/sessionsgains an optionalyours=1filter, documented indocs/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