Repository navigation
fix(web): keep a start form's files in it while the session starts - #231
Merged
kalaspuff merged 2 commits intoOct 23, 2026
Merged
Conversation
Starting a session took the attached files out of the form as soon as their uploads were done, so they vanished until the session page opened. The form now shows them until it goes away, without the buttons that remove them, and stops taking files from the paperclip as it does from pastes and drops. If the start fails, they are the form's again. Taking files that were still uploading compared them by identity, which missed those whose upload finished meanwhile: they stayed in the composer and uploaded again. They now go by their keys.
…g-an-agent-from-the-composer # Conflicts: # web/src/routes/home.tsx # web/src/routes/project.tsx
kalaspuff
approved these changes
Oct 23, 2026
kalaspuff
deleted the
fctl/176-when-starting-an-agent-from-the-composer
branch
October 23, 2026 13:58
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.
Attaching a file to a task and pressing Start took the file out of the form as soon as its upload was done. It vanished while the form said "Starting", until the session page opened, although the session got it all along. Now the form keeps showing its files until the session page replaces it.
What changed
useAttachments'takegets astayoption: the start hands the files to the new session, and the form goes on showing them. The session composer still empties as it sends, since its message shows the files in the transcript at once. The form frees the files' previews when it goes away; before, the start freed them as soon as the session existed.DraftTraytakesreadOnlyandAttachButtontakesdisabled.IconButtonnow looks disabled when it is, likeSelect(none was disabled before).A bug this found on the way
takeremoved the files it took by object identity. A file sent while it was still uploading gets a new object when its upload finishes, sotakemissed it: the file stayed in the composer and, because its upload had been handed over, uploaded again. In the session composer, a file sent with a message mid-upload stayed behind, ready to go out with the next message (two uploads of one file, in the browser).takenow goes by the files' keys, and puts them back as uploaded if sending fails.Screenshots
At 608f8ce (with main merged in, so the forms have #229's Schedule button), with an image attached (a drawing made for this) and the request that starts the session held in the browser, so that the form stays on "Starting".
Home, dark theme, 1440 px wide:
A project's Sessions tab, light theme, 1440 px wide:
A phone, 390 px wide, dark theme. Touch screens always show a file's remove button; while the form starts, the file now stays without it:
At rest, the forms look as they did on main (pixel for pixel, apart from the moving scene behind Home's header).
How I verified it
Unit tests.
attachments.test.tsxcovers:start.test.tsxchecks that a start asks forstayand frees no previews. The five new attachment tests fail with main'sattachments.tsx.cargo xtask check webpasses.In the browser, with
cargo xtask devand Playwright, holding requests to slow them down:Merging main
#229 merged while this was open, and changed the lines around
<AttachButton …>inweb/src/routes/home.tsxandweb/src/routes/project.tsx. 608f8ce merges main in, keeping #229's lines and addingdisabled={starting}to the paperclip. I ran the browser checks above again on the merged code, with the same results.Session: https://app.fctl.sh/s/ses_01M5MFKE7Q1K3E7855Q7CS1R9V