GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(app): show a prompt sent while agents and models load in the timeline at once by Hona · Pull Request #62025 · anomalyco/opencode Conversation
|
| Case | Server | pre-series | dev | this PR |
|---|---|---|---|---|
| Session in a folder still loading | idle | 192 ms | 188 ms | 14 ms |
| 400 ms per request | 1.6 s | 1.6 s | 7 ms | |
| 2.5 s per request | 10.0 s | 10.1 s | 6 ms | |
| agent/model catalog +3 s | 3.1 s | 3.1 s | 9 ms | |
| main thread 100% busy | 4.3 s | 4.2 s | 12 ms | |
| Follow-up, loaded session | 2.5 s per request | 877 ms | 887 ms | 17 ms |
| Follow-up, loaded session | every other condition | 31–54 ms | 36–46 ms | 32–49 ms |
| New-session draft in a folder still loading | main thread 100% busy | 4.3 s | 4.1 s | 3.4 s (still held) |
stateDiagram-v2
[*] --> idle
idle --> held: Enter, no agent or model yet
note right of held
shown (steer to a Session):
timeline shows it as Pending,
composer is cleared
end note
held --> preparing: hold.loaded with a selection
held --> idle: Stop / unmount (prompt returns to the composer)
held --> idle: loaded without a model (prompt returns, choose a model)
preparing --> handing_off: session.started
handing_off --> idle: handoff.ready
composer/machine.ts):
held now carries the captured snapshot and a shown field. A steer to an active Session (not a slash command, shell command or queued prompt) enters held with shown, and the transition emits hold.show.hold.loaded carries the resolved selection and continues from the snapshot taken at Enter, with the same message ID.preparing and handing-off carry cleared. The later composer.clear then never wipes a draft typed while the prompt waited, and history is recorded once.session/handoff-machine.ts): a new held phase. No request is in flight, so it starts no timer and ignores reconnects. The real send replaces it with sending under the same message ID, so the row does not remount.sending pending status.session-ui shows it like a waiting steer (faded, "Pending"), with no actions: there is no server row to move, delete, revert or fork yet.| Event while a shown prompt is held | Before | After |
|---|---|---|
| Enter | text stays in the composer, spinner on Send | timeline shows it as Pending, composer clears |
| Typing | cancels the send | new draft, the send continues |
| Stop, leaving the Session, a load without a model, or a failed send, after typing a new draft | (not possible: typing cancelled the send) | prompt returns in front of the new draft, which keeps its comments |
| Stop / leaving the Session | cancels, text stays | cancels, prompt returns to the composer, row removed |
| Load ends without a model | toast, text stays | toast, prompt returns to the composer, row removed |
<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none"> <style> .t{animation:t 3.2s infinite} .b{animation:b 3.2s infinite} @keyframes t{0%,18%{opacity:1}24%,100%{opacity:0}} @keyframes b{0%,18%{opacity:0}26%,62%{opacity:.4}72%,94%{opacity:1}100%{opacity:0}} @media (prefers-reduced-motion:reduce){.t,.b{animation:none}.t{opacity:0}.b{opacity:.4}} </style> <rect x="8" y="48" width="224" height="18" rx="5" stroke="currentColor" stroke-opacity=".35"/> <rect class="t" x="18" y="55" width="96" height="4" rx="2" fill="currentColor" fill-opacity=".7"/> <g class="b"> <rect x="120" y="10" width="110" height="20" rx="7" fill="currentColor" fill-opacity=".16"/> <rect x="130" y="18" width="80" height="4" rx="2" fill="currentColor"/> <rect x="186" y="34" width="44" height="4" rx="2" fill="currentColor" fill-opacity=".5"/> </g> </svg>
This code runs once per send, not on a per-frame path, so there is no strobe benchmark.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The change looks sound. A prompt to a Session sent while its Location loads now shows in the timeline as Pending at once, the composer clears, and it sends under the same message ID once the agents and models load. Holds that aren't shown keep the old behaviour. I checked it with the new browser test, which fails on the base for the three held-prompt cases and passes here, plus the composer, handoff and timeline unit tests and tsc -b for app and session-ui. I couldn't run the Playwright e2e test (no browsers here). The change is in the web app, not the TUI, so I have no screenshots.
Public API: unchanged. The new handoff.hold / held and the "sending" pending status are internal to packages/app and packages/session-ui.
One case worth handling: a cancelled shown hold can drop the prompt after the user has typed a new draft (see inline).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This push rebases the change onto #62021. The adaptations to its retry fingerprints, restoreDraft and the removed setMode look correct, and the composer, handoff and timeline unit tests, the loading browser test and tsc -b for app and session-ui pass. Public API: unchanged.
The earlier point about a cancelled held prompt being dropped after a new draft is typed isn't addressed yet. Nothing new to raise.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The new commit is correct: a held prompt, which has only an empty placeholder model, no longer shows an empty model label, and other callers are unaffected. The rest of the push is the same change rebased. tsc -b for session-ui, the loading browser test and the composer and handoff unit tests pass. Public API: unchanged.
The earlier point about a cancelled held prompt being dropped after a new draft is typed is still open.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The earlier point is addressed: a held prompt cancelled by Stop, by leaving the Session or by a load without a model now comes back in front of a draft typed while it waited, and the new browser test cases cover it. The same applies when the send fails after the hold. Checked with the loading browser test (7 pass), the src/composer and src/session unit tests (760 pass) and tsc -b for app. Public API: unchanged. Nothing new to raise.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.