Skip to content

fix(ui): fold server notices and editor references into single lines - #537

Open
jensenojs wants to merge 5 commits into
sudo-tee:mainfrom
jensenojs:fix/fold-system-notices
Open

jensenojs wants to merge 5 commits into
sudo-tee:mainfrom
jensenojs:fix/fold-system-notices

Conversation

@jensenojs

@jensenojs jensenojs commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Two things the transcript printed in full now print on one line.

                       what the transcript shows
- server notice     -> text: the instruction meant for the model .... n lines
+ server notice     -> description: one line meant for the reader ... 1 line

- editor selection  -> the selected code, expanded .................. n lines
+ editor selection  -> editor-context:selection:<file>:<lines> ...... 1 line

A selection still reaches the model unchanged; only the transcript got shorter.
A reference with a single match opens directly instead of showing a one-entry picker.

Suite green locally and in CI. Both real notices checked against a live server.

@jensenojs
jensenojs force-pushed the fix/fold-system-notices branch 6 times, most recently from 8cdcce9 to 76721ae Compare October 16, 2026 09:23
@jensenojs

Copy link
Copy Markdown
Collaborator Author

I'm also considering adding a CI check to ensure that all upstream events are handled (whether they are consumed or intentionally ignored)

I will check this PR more carefully later and fix the other issue where something should have been collapsed but wasn't. You don't need to review it before then

@jensenojs
jensenojs force-pushed the fix/fold-system-notices branch from 76721ae to 82af4ba Compare October 16, 2026 09:35
@jensenojs

Copy link
Copy Markdown
Collaborator Author

there is no need to display everything during rendering

图片

@jensenojs
jensenojs force-pushed the fix/fold-system-notices branch 2 times, most recently from 9c4f327 to c14b7ee Compare October 18, 2026 14:54
@jensenojs

Copy link
Copy Markdown
Collaborator Author

there is no need to display everything during rendering
图片

And it would be great if it were clickable

Synthetic and system notices arrive as a pair from the server: `description`
is the line meant for the user, `text` is the instruction handed to the model.
The transcript rendered `text`, so a one-line event showed up as a paragraph of
instructions in the middle of the conversation.

Render the notice from `description` and leave the instruction body out. Plain
synthetic parts keep coming from the snapshot, so only events the server marks
with a description are projected; background completions still refetch the
snapshot because they carry no message id.
Events arrive as free-form payloads, so an event type we never saw is dropped
without a trace and an upstream rename costs a debugging session to notice.

Extract the type table the distribution ships, diff it against the handlers we
register, and fail on an unknown type that is neither exempt nor a recorded gap.
Run the same check in CI, so an upstream bump surfaces there rather than as a
missing line in someone's transcript.
The waits were tight enough that a loaded runner missed them, and the spec
failed on timing instead of behaviour. Wait longer; the assertions are the same.
Sending a selection expanded the selected code into the transcript, so a
one-line reference became a wall of text and pushed the rest of the
conversation off screen.

Render the reference as `editor-context:selection:<file>:<lines>` on one line.
The selection still reaches the model; only the transcript gets shorter.
Opening a reference that resolves to a single location still showed a picker
with one entry in it. Jump there directly and keep the picker for the case
where several locations match.
@jensenojs jensenojs changed the title fix(ui): render system/synthetic notices via their transcript description fix(ui): fold server notices and editor references into single lines Oct 21, 2026
@jensenojs
jensenojs force-pushed the fix/fold-system-notices branch from 437d46f to ebdb133 Compare October 21, 2026 15:37
@jensenojs
jensenojs marked this pull request as ready for review October 21, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant