Repository navigation
feat(fork): acks, an Edited mark and a divider in display modes - #149
Merged
Merged
Conversation
In Messages only, Messages + Dashboard and Chat + Replies, an agent could send exactly one message per typed message, a rewrite left no trace, and an edited reply did not count as new. - send_to_user takes an optional ack (at most 200 bytes): per user message the agent may send one ack, then one answer. A send after the answer is refused, and replace_send_to_user always leaves an answer, so it can turn the ack into the answer. One stage table per user message (replyStage.ts) decides sends and replaces for both the Messages path and each sub-thread, and a replace waits while the answer it would rewrite is still being delivered. - The history fold records which rewrite changed a message. The web shows a small "Edited" mark under it, and in Chat + Replies an edited reply takes the edit's time, so it shows as new and moves the sub-thread's latest activity. - A thin rule parts two agent messages drawn in a row in a view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
This pull request adds acks, an Edited mark and a divider to the Messages only, Messages + Dashboard and Chat + Replies display modes.
What behaviour changes
Behaviour change: yes, users of these three modes see acks, dividers and Edited marks.
If a citation made in the Replies view still lands in the main box, could the fork's owner say what they did?
Why
A long task left the user with no word until the answer. A rewrite left no trace, so the user could miss it. With acks, two agent messages often sit in a row, and the rule shows where one ends.
Checks
Unit tests cover the ack rules, edit times, unread counts and dividers. The new cases failed before the change. The repo's checks for changed files pass. In the web app, at desktop and phone size, a live agent sent acks, answers and rewrites, and its extra sends were refused. An edit of an answer already read showed "1 new".
How to undo
Revert the commit. Stored acks then show as ordinary messages. Nothing is stored outside the thread's history.
Design notes
send_to_usertakes an optionalack(true, false or null) of at most 200 bytes. In Chat + Replies, each user message keeps its own count, in the main list and in every sub-thread, as before.replyStage.tskeeps one stage per user message: open, acked or answered. The stage only moves forward.judgeSendandjudgeReplacedecide every send and replace, on the Messages path and in each sub-thread. Each refusal says which rule it broke.replace_send_to_userhas noackfield and always leaves an answer. After a replace of an ack, no further answer goes out.reply_to, so an ack withnew_sub_threadis refused. A message with only an ack stays in the refusals' list of unanswered messages, and an accepted ack starts no summary run.ackon an ack andeditedByon a rewritten message. The web takes the edit time from when the rewrite completed. An edited first message in the main list gets only the mark, since the main list has no unread state. A reply edited before this change, in a sub-thread read before that edit, shows as new once.replace_send_to_userdescription now says the agent answers each user message once, after at most one ack, and that a replace makes an ack the answer. Mode notices are unchanged. The tool list grows from 52134 to 52373 bytes.apps/web/src/types.ts+1 (ChatMessage.editedAt),MessagesTimeline.logic.ts+3 −1 (followsAgentMessageand itsisRowUnchangedline),TimelineAssistantRows.tsx+4 (two imports, two JSX lines) andagentContextBudget.json+1 −1. All other logic is in fork files.