Repository navigation
feat(web): keep what's written in a project's task box - #246
Merged
kalaspuff merged 3 commits intoOct 23, 2026
Merged
Conversation
The Sessions tab's start form now keeps its draft in this browser, as the Agent Floor's does: the words, the model, effort level and GitHub access picked, the files and the caret, until a session or a schedule starts with it. Each project has its own draft, apart from the Agent Floor's. The home page's saving and restoring moves into useKeepDraft, which both forms use, and the project page's form becomes a component keyed by the project, so that another project's page opens with its own draft.
kalaspuff
pushed a commit
to hyperstructure/fctl-site
that referenced
this pull request
Oct 23, 2026
app.fctl.sh's project pages now keep the task being written in their task box in the browser, as the floor does, until a session starts with it or you sign out: hyperstructure/fctl#246. Each project keeps its own, apart from the floor's. The policy said only the floor's task stays in the browser; it now says each project page's does too. `updated` is already today's date. `npm run build` renders the page with the change. Merge this together with hyperstructure/fctl#246, or after it. Session: https://app.fctl.sh/s/ses_01M5NC3YGDDG8BZZMRARNZFWS4 Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
…en-in-the-composer-box-on-th # Conflicts: # web/src/routes/project.tsx
kalaspuff
approved these changes
Oct 23, 2026
kalaspuff
deleted the
fctl/209-what-s-written-in-the-composer-box-on-th
branch
October 23, 2026 22:25
This was referenced Oct 23, 2026
kalaspuff
pushed a commit
that referenced
this pull request
Oct 23, 2026
New projects now start with all four follow-ups on: comments that mention the agent, failed checks, merge conflicts, and merged or closed. Before, every switch started off, so in session #209 an agent wasn't told when its pull request (#246) began to conflict with `main`. ## What changed - `settings::for_new_project` (`crates/fctl-domain`) turns on each follow-up that the create request leaves out, next to where it turns connectors off. A request that sends `follow_ups`, or some of its fields, keeps what it sends. The project then stores every switch. - **Existing projects are left as they are stored. There is no migration**, as the issue's decision asks. `FollowUps::default()` is still all off, so a project stored without `follow_ups`, or without one of its fields, still reads them as off. Serde and the SQL in `pull_requests::moved_onto` (`json_extract(…) = 1`) therefore still agree. To turn them on in an existing project, use its Settings or `fctl projects set --follow-ups all`. - `fctl projects create --connectors` sends whole settings, which turned follow-ups off. It now sends `FollowUps::ALL`, a new constant in `fctl-proto` that `--follow-ups all` uses too. A CLI one version behind still sends them off. - Docs: architecture, self-hosting and cli are updated, and the new ADR 0051 supersedes the "all off" part of ADRs 0043 and 0045 for new projects. The ADR also says what limits the cost: at most three failed checks and three conflicts in a row while nobody messages the agent, and one follow-up for a merge or close. - The protocol doesn't change: only a doc comment does, which shows up in `web/src/gen`. Hosts and agents need nothing. - fctl-site's privacy policy needs no change: it says what happens "where the project's follow-ups are on", which still reads right. ## Verification - New unit tests in `fctl-domain` (`new_projects_start_with_follow_ups_on_unless_asked`) cover a request with no settings, one with other settings, one with some follow-ups, and an older CLI's whole default settings. - `cargo xtask check --quick` passes. - In `cargo xtask dev`: - `fctl projects create` and `fctl projects create --connectors` both stored all four switches as `true` in D1. - A POST with `{"follow_ups":{"checks":false}}` stored checks off and the other three on. Fixes #247 Session: https://app.fctl.sh/s/ses_01M5NFNH5ZCX4BA0S6QERHAB57 Co-authored-by: fctl-sh[bot] <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.
The task box on a project's Sessions tab now keeps what you write in it, as the Agent Floor's has since #117. Leave the page, reload it or close the tab, and the task comes back with the model, effort level and GitHub access you picked, the files you attached and the caret where you left it. It stays until a session starts with it or a schedule is set up with it. Each project keeps its own draft, apart from the Agent Floor's and other projects'.
This also fixes a bug on
main. Going straight from one project's page to another that was already loaded kept the first project's text in the second one's box, where Start would have started it in the wrong project.How
@/lib/draft. Drafts have ids (draftId). The home page's is the person's id, as before, so drafts written before this change come back. A project's is<person>:<project id>. Text is in localStorage underfctl:draft:<id>, files in IndexedDB under<id>/<file key>. The separator is:because a/would put a project's files inside the home page's key range. Starting a session forgets that one draft; signing out still forgets them all.useKeepDraft(web/src/components/session/start.tsx) is what the home page's form did inline. It saves the draft as it changes, as the box loses the focus (with the caret) and as the form goes, puts the caret back, and forgets the draft once a session starts with it. Both forms use it.Sessionsinto its ownStartForm, keyed by the project's id. Without the key, React keeps the form's state when you go from one project's page to another that is already loaded, because the route's component stays mounted. That is how the text carried over.docs/getting-started.mdsays project pages keep their task too.The privacy policy on fctl.sh lists what app.fctl.sh keeps in the browser. hyperstructure/fctl-site#51 adds project pages' tasks. Merge it together with this one, or after it.
Verification
web/src/lib/draft.test.ts: each project's draft is kept apart from the home page's and the others'. Forgetting one leaves the rest, and signing out forgets them all.web/src/components/session/start.test.tsx:useKeepDraftkeeps a draft as it changes, keeps one of files alone and forgets one with neither words nor files. It keeps the caret and puts it back, keeps nothing once a session starts, and leaves other drafts alone. Each of these tests fails when the line it covers is broken.cargo xtask check webpasses: Biome, TypeScript, 681 tests and the production build. After mergingmainin (feat(web): group a project's sessions by recency #245 regrouped the Sessions tab's list around the same code), Biome, TypeScript and all 703 tests pass, and the end-to-end run below passes again.cargo xtask devand Playwright in Chromium, with two projects, Playground and Second:key={project.id}, step 2 fails: Second's text shows in Playground's box.main, step 2 shows the bug (Playground's text appears in Second's box), and Playground's text is gone after a visit to the Agent Floor.Recordings
After at 509b6f8 (with
mainmerged in), before atmain's c0d0169; dark theme, 1280 × 720 shown at 960 px. Each writes a task in Playground and attaches a picture, goes to the Agent Floor, and comes back to Playground.Made in fctl session https://app.fctl.sh/s/ses_01M5NC3YGDDG8BZZMRARNZFWS4