Repository navigation
Remove workflow runs from Chopin - #970
Merged
Merged
Conversation
Chat's overlay scrollbar kept where its thumb was as an offset in pixels, taken in each scroll event from the scroll timeline's progress times the range it knew then. When the transcript's range changed with no scroll after it, the thumb stayed where that old offset put it. A thread opened at its newest line does this: it is scrolled to its end while its rows are still mounting, and nothing scrolls it again. In a 640 by 800 window, a thread with 60 replies sat at its end (`scrollTop` 3178 of 3178) while its thumb was drawn 221 px down its 520 px travel, until the reader scrolled. A run card in the thread used to hide this, because unfolding the card scrolled the thread again. The thumb now takes its place from the timeline's progress when it is drawn, in the frame after the scroll or resize that asked for it. Reading the timeline there costs no layout, as reading it in the scroll event did. A new browser test opens a long thread at its newest line, points at it without scrolling, and expects the thumb at the end of its lane. It fails before this change, with the thumb 305 px short, and passes with it. `chat-long-transcript.e2e.ts` still finds no forced layout while scrolling under the pointer.
Chopin showed run cards for the workflow runs a remote Planner's client reported, let Stop and Resume Planner pause and resume them, and kept the client's session past its turn, and past a dropped link, while any run was live or paused. None of that is Chopin's to keep any more: a client's own work that outlives its turn is the client's to report in its replies. Chat and threads draw no run cards, and the composer has no Resume button; the build card under the transcript stays. The agent connection loses the `runs` report, the `run-stage-deltas` feature, the `stop` and `resume` run controls, and `workflowRunId`, `workflowStageId` and `rootRunId` on `input-request`: a client that still sends them is refused as a malformed message, and `run-stage-deltas` is no longer echoed in `attached.features`. A command of kind `workflow` runs as the same `/name args` any other kind does. The server tracks no runs, holds no Stops for a client's return, and no longer pages run stages. A session still outlives its turn, and a dropped resumable link is still kept, while it waits on a question it asked or on an answer its client has not acknowledged. Stop Planner stops the running turn, or with none running withdraws the question a kept session waits on. `workflow_run_stages` and the `stops` field of `planner_link_holds` stay, so the previous release can still run beside this one: the table is no longer written or read, and every hold this release writes has no Stops. A hold an earlier release wrote for a session it kept only for a run is not rebuilt, and that session's AI launch ends.
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.
Why
Chopin showed a card in Chat, and in threads, for each workflow run a remote Planner's client reported over the agent connection. Stop and Resume Planner paused and resumed those runs, and the server kept the client's session past its turn, and past a dropped link, for as long as any run was live or paused. A Planner on Atomic 0.10 or later has no workflows, and a client's own work that outlives its turn is the client's to report in its replies. So Chopin no longer tracks, shows or controls runs.
Rollout order: the remote Planner client stops sending run reports first, in a separate change to that client, and only then does this deploy. This server refuses a
runsreport, and aninput-requestthat names a run, as a malformed message and closes the link with 1008. A client that still sends them is cut off and loses the sessions that link held. The server never listsrun-stage-deltasinattached.features. There is no compatibility path.What
Agent connection (
packages/agent-link,docs/agent-connection.md)runsmessage, therun-stage-deltasfeature, the server'sstopandresumerun controls, andworkflowRunId,workflowStageIdandrootRunIdoninput-requestare gone from the schema, the package client (reportRuns,splitRuns, thecontrolhandler) and the docs. The docs say what an earlier version had and that this server refuses it.control-resultnow only answerssteer.Server (
apps/server)watchRuns,publishRuns, run stages and their paging route (/api/channels/<id>/runs/<run id>/stages), the held and unanswered Stops of a dropped link, and the wait that held an answer while its run was paused are all removed.chat:abort) stops the running turn. With no turn running, it lets go a kept session that waits on a question, which withdraws the question.chat:resume,chat:pause-runandchat:resume-runare gone.workflowis no longer special: it runs as/name args, as every other kind does.planner_link_holdsrows are written withstops: []. When a hold is rebuilt after a restart, a session that an earlier release kept only for a run (no question waiting, no answer owed) is not rebuilt, and its AI launch ends. Without this, a deploy could rebuild such a session and leave its document busy with no deadline.Web (
apps/web)workflowgets no group name or icon of its own. The card under the transcript now shows only a running build. The design audit's "Workflow runs" plate is now "Running build". The Stop and Resume run icons are deleted.Storage
workflow_run_stagesis kept but no longer read or written. The previous release still writes run stages until its cut, and on a rollback it refuses migration ids it does not know, so this change adds no migration. A later release can drop the table once no process of this release's predecessor can run.planner_link_holds.stopsstays, and is always written empty.Docs
docs/agent-connection.md,docs/hosted-agent.md,docs/storage.md,docs/chopin-cli.md,docs/local-agent-mcp.md,docs/architecture.md,docs/decisions.md,docs/machine-runner-design.md,AGENTS.mdandapps/web/DESIGN.mdno longer describe run cards, run reports, run control or keeping a session for a run.Overlay scrollbar (its own commit, 4eaf9cc)
Taking the run card out of threads exposed an older bug in Chat's overlay scrollbar. The thumb's place was an offset in pixels, computed in each scroll event from the scroll timeline's progress times the range known at that moment. If the range then changed with no further scroll, the thumb stayed where it was. A thread opened at its newest line hits this: it is scrolled to its end while its rows are still mounting, and nothing scrolls it again. In a 640 by 800 window, a 60-reply thread was at its end (
scrollTop3178 of 3178) while its thumb sat 221 px down its 520 px travel. The oldchat-run-scrollbarsspec only passed because unfolding the thread's run card scrolled the thread again. The thumb now reads the timeline's progress when it is drawn, which, like the old read in the scroll event, forces no layout.Tests
planner-dispatch.test.ts,link-resume.test.ts,reaction-reader.test.ts,handover-window.test.tsandremote-planner.test.ts.link.test.ts: a run report, and a question that names a run, close the link as malformed, andrun-stage-deltasis never echoed.protocol.test.tsandclient.test.ts: the schema has no run messages, and the client asks for no run feature.link-resume.test.ts: once a link's question is answered and the answer acknowledged, a drop keeps nothing and the ownership runs the grace period.handover-window.test.ts: a hold row from an earlier release with a session it kept only for a run is not rebuilt, and that session's AI launch ends. Beside it, only the session whose question its client waits on is given back. Both of these tests failed before the fix toPlannerAttachments.restore.plan/persistence.test.ts: a document saved with run cards opens and saves without them.address.test.ts,commands.test.tsandchat-agent-commands.e2e.ts: aworkflowcommand runs as/name args.chat-scrollbars.e2e.ts(renamed fromchat-run-scrollbars.e2e.ts): a thread opened at its newest line, with no scroll after it, has its thumb at the end of its lane. Before the scrollbar fix this failed with the thumb 305 px short of the lane's end, while the view was at its end.Verification
Run on this branch, rebased on 73d6370:
bun run fixmade one formatting change, which is in the commit.bun run ciandbun run typespass.GIT_CONFIG_GLOBAL=/dev/null bun test apps packagesat this head ran 9345 tests. Everything passed except 4 connector sandbox tests inapps/connector/src/main.test.tsandsandbox.test.ts, plus one late assertion from one of them, reported as an error between tests. All 4 time out on this VM, and they fail the same way on main.bun test apps/server/src/storage/postgres apps/server/src/machine-store, against my own PostgreSQL: 256 of 257 passed.startup.test.tstimed out once under load, then passed 5 of 5 when run alone.flockwith my own ports and databases:chat-agent-commands,chat-scrollbars,connection-banner,handover,implementation-launcher,planner-attachment,composer-send-stop,chat-hover-contrastandsteering: 92 passed. The only 3 failures were the thread-thumb checks inchat-scrollbars, which led to the scrollbar fix.chat-scrollbars,chat-long-transcriptandchat-threads: 14 passed. That includeschat-long-transcript's check that scrolling under the pointer forces no layout.chat-scrollbars(with the new thread-thumb test) andchat-agent-commands: 15 passed.CI on 298d633 passes every check. The integration suite reported 4 flaky tests that passed on retry. One of them is this change's
chat-scrollbars.e2e.ts:315, "in a phone the transcript's thumb is whole". On its first try, main Chat's lane fell outside the viewport (inViewfalse); the thumb's position was right (fromEnd0). The same phone test, aschat-run-scrollbars.e2e.ts, was flaky on main in CI runs 44815063317 and 44793078719.