Repository navigation
Keep a run's stored stages on reattach and open card diagrams fitted - #696
Merged
Merged
Conversation
A Planner that reattaches reports the runs it remembers again, and an ended run it no longer holds the stages of arrives as a full card with no stages. That card replaced the run's stages: Chat stored nothing for it and deleted the stages it had stored, so a finished run's "+N earlier" unfolded to nothing, even after a reload. A full card with no stages for a run that already has some now keeps them. Its other fields, such as the status and times, still change the card, and its earlierStages is ignored. The agent connection keeps the session's stages for the run, and Chat keeps the card's stages and leaves the stored ones alone for a report from a later session. A full card with any stages still replaces them all. docs/agent-connection.md states the rule under Run stage deltas. Stages already deleted cannot be restored: Chopin keeps no other record of them. Chat's card carries only the latest 12, and the reattached report overwrote it; the document checkpoint copies that card within half a second; channel events and document versions do not carry runs. Assistant-model: Claude Opus 5.5 (fast) Assistant-workflow: inline (fast subagents) Assistant-verification: bun test (unit, domain and memory storage) Assistant-verification: bun run types and bun run ci Assistant-verification: Chromium run card and Planner attachment suites Co-authored-by: Alex Lavaee <alexlavaee@microsoft.com>
A Mermaid diagram on a decision card opened at its drawn width, so a chart wider than the card was cut at its edge until the reader pressed "Fit diagram to width". A card's diagram now opens fitted to the card's width, with "Actual size" to draw it at its own size and scroll it. A phone still offers "Expand diagram" for a full-screen reading. A diagram in the document opens as before. Assistant-model: Claude Opus 5.5 (fast) Assistant-workflow: inline (fast subagents) Assistant-verification: bun test (unit, domain and memory storage) Assistant-verification: bun run types and bun run ci Assistant-verification: Chromium decision Markdown and wide content suites at desktop and phone sizes Co-authored-by: Alex Lavaee <alexlavaee@microsoft.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.
Two fixes: a finished workflow run lost its stages when an attached Planner reattached, and a wide Mermaid diagram on a decision card opened cut off at the card's edge.
A run's stored stages survive a reattach
A Planner that reattaches reports the runs it remembers again. An ended run whose stages it no longer holds arrives as a full card with no stages. That card replaced the run's stages: Chat deleted the stages it had stored and showed a card with none. A finished run's "+N earlier" then unfolded to nothing, even after a reload.
The rule now: a full card with
"stages": []for a run that already has stages keeps them. Its other fields, such as the status and times, still change the card, and itsearlierStagesis ignored. A full card with any stages still replaces them all, so the contract for clients that send stages is unchanged.docs/agent-connection.mdstates the rule under Run stage deltas.apps/server/src/harness/remote/link.ts: within one agent connection session, an empty full card keeps the session's stages for that run. Delta cards that follow add to them.apps/server/src/chat/service.ts: for a report from a later session, Chat keeps the card's stages and leaves the stored ones alone.Runs whose stages are already gone cannot be restored. Chopin keeps no other record of them:
No repair task was added. It would have nothing to restore from.
A card's diagram opens fitted to the card
A Mermaid diagram on a decision card opened at its drawn width, so a chart wider than the card was cut off until someone pressed Fit diagram to width. A card's diagram now opens fitted to the card's width, with Actual size to draw it at its own size and scroll it. On a phone the card offers Expand diagram for a full-screen reading. A diagram in the document opens exactly as before.
Verification
data-fit.bun test: 6473 passed.bun run typesandbun run cipass, and no design-contract hashes changed.decision-markdown,wide-content,run-cardandplanner-attachmentall pass (20 tests). The new browser tests check the card at 1280 px and on a 390 px touch phone.apps/connectoris unchanged.