Repository navigation
Ask <app> and the assistant: a reload keeps notices in place and tool rows named - #281
Merged
Merged
Conversation
This was referenced Oct 2, 2026
Merged
Merged
…rows' names
Two things changed when a transcript was loaded again from history (the
"Ask <app>" panel reopened, the system chat's pane reopened):
- The panel's notices ("Stopped.", "Nothing of yours was running.", a
turn's "turn interrupted by client", ...) were appended after the whole
history, so on every reopen they moved below newer rows (instrument run,
frames 21 and 22). Conversation::load_history now puts what history
cannot know (notices, an open question, a running turn's rows) back
where it stood: right after the row it followed, found again by its kind
and turn (keep_in_place).
- Reloaded tool rows read "⚙ tool · done" instead of the tool's name
(frames 24 and 35). Both models read `name` or `tool_name`, which no
history row has: octos's session/hydrate row (HydratedMessage at the
pinned ae230ce) is seq, role, content, thread_id, persisted_at and the
like, with neither the tool's name nor its call id (the name is only on
the assistant's tool call, which hydrate does not return; octos-web and
Octoscode skip these rows), and the broker's merged history adds none.
So a reloaded tool row keeps the name the transcript already showed for
the same call (system_chat::model::ToolNames): a turn's tool rows in
order, matched by the turn every persisted row carries as `thread_id`,
when the transcript showed as many for that turn. A row of a turn the
transcript never followed in full (another run's) still says "tool",
never another call's name; octos would have to return the name for those.
The system chat now reads a row's turn from `thread_id` too, as the panel
did.
Tests: app_chat (the instrument run's notices, and tool names, across two
reloads) and system_chat (tool names across reloads; a turn seen in part).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote
force-pushed
the
fix/reload-keeps-notices-and-tool-names
branch
from
October 2, 2026 19:14
fdf57a6 to
73c66f4
Compare
Contributor
Author
|
Local CI passed on 73c66f4 ( GitHub would run for this PR: desktop.yml, phone.yml, apps.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.
Skipped (these did NOT pass; (!) marks a skip that blocks tools/ci-local-merge.sh):
Notes:
|
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.
A headless instrument run of the desktop shell (main f52620c) found two things wrong once a transcript is loaded again from history, after "Ask " or the system chat's pane is reopened.
1. The panel's notices moved below newer rows (frames 21, 22). Notices such as "Stopped.", "Nothing of yours was running.", "Stopped the system agent's task." and a turn's "turn interrupted by client" all ended up below the turn that ran while the panel was closed.
Conversation::load_history(app_chat/model.rs) appended everything history cannot know after the whole history. That covers notices, an open question and a running turn's rows.keep_in_placeputs each such item back right after the row it followed. It finds that row again in the new history by its kind and turn. An item from before any row stays first. An item whose rows history no longer has goes last, as before.2. Reloaded tool rows read "⚙ tool · done" instead of the tool's name (frames 24, 35;
system_chat/model.rs:580,app_chat/model.rs:262).name, thentool_name, and history rows have neither. At the pinned octos ae230ce,session/hydratereturnsHydratedMessagerows:seq,role,content,thread_id,persisted_at,message_idand the like. They carry no tool name and no tool call id. The name is only on the assistant's tool call, which hydrate does not return. octos-web and Octoscode skip these rows for that reason; they draw tool cards from v2 tool envelopes, which the shell's stdio link does not negotiate. The broker's merged history (merged_history) adds no name either. So there is no field to read.system_chat::model::ToolNames). octos stamps every row a turn persists withthread_id= that turn's id (pre_stamp_turn_thread_id). A turn's tool rows are matched in order with the tool calls the transcript showed for that turn, from livetool/startedor an earlier reload, when there are as many of each.thread_idtoo (history_turn), as the panel already did.Tests (Linux build host, from
phone/; this branch alone):cargo test --locked --features mobile-apps -p octosense-shell app_chat: 11 passed, including the newa_reload_keeps_the_notices_where_they_stood(the instrument run's order, across two reloads; first and last) anda_reload_keeps_the_tool_names_the_panel_showed.… system_chat: 66 passed, including the newa_reload_keeps_the_tool_names_the_chat_showed(hydrate-shaped rows: across reloads, a turn seen only in part stays "tool").… approvals: 58 passed.… questions: 9 passed.phone.ymlruns it (cargo test --locked --features mobile-apps -p octosense-shell, withOCTOS_SHELL_TEST_KERNEL): 778 passed.Instrument (the same harness, on the Linux build host; before = main, after = this branch):
Overlap. This branch is on main 4f73ab3, after #272, #273 and #274 merged; the rebase had no conflicts. #272 rewrote
system_chat/view.rs; this PR changes onlysystem_chat/model.rs. #274 added asserts to other tests inapp_chat/tests.rs. The open #230 and #255 merge with this branch cleanly. The four fixes from the same run are independent, and each pair merges without conflicts: this one, #279, #280 and #282.🤖 Generated with Claude Code