Repository navigation
fix(chat): branch a history edit only when it is sent - #1009
Merged
Merged
Conversation
"Edit from here" called navigate_tree on click, which persisted a leaf move before the user committed to the edit. There was no way back, and a reload showed the conversation cut off at the edited message (#958). Clicking now only prefills the composer and records the target entry in useAgentSession. The composer shows an edit banner with Cancel, which clears the prefill without touching the session. Sending navigates first and then takes the normal prompt path; a failed navigation restores the draft and the edit state. The pending edit follows the session's in-memory draft across session switches, and a pending edit is never sent as steer or follow-up. Navigation and prompt remain two RPCs, so a prompt rejected after the navigation keeps the new leaf.
Always showing Copy / Edit from here / New session at 44px under every user message on phones is a separate design change from deferring the history-edit branch, and it costs a lot of vertical space per turn. A tap on the message already reveals the actions (mobile browsers emulate mouseenter on tap), so leave that layout as it is here. This reverts commit 8931c5a. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q8e4GL1QSNFveKtnFfP3FZ
Resolve the ChatInput props conflict with the default-model star (defaultModel, onSetDefaultModel) by keeping both sides. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q8e4GL1QSNFveKtnFfP3FZ
Resolve the MessageView props conflict with #968: keep dropping onNavigate (the edit branches on send now) and take the new onCompact / isCompacting / compactError props. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q8e4GL1QSNFveKtnFfP3FZ
Kano-u
pushed a commit
to Kano-u/pi-web
that referenced
this pull request
Oct 2, 2026
…#907 agegr#941 agegr#946 agegr#961 agegr#968 agegr#969 agegr#1007 agegr#1008 agegr#1009 agegr#1010) 上游已把我们提前摘取的 agegr#884 / agegr#871 / agegr#996 / agegr#961 原样合并(agegr#961 逐字节相同), agegr#967 与 agegr#963 由上游的 agegr#1009 / agegr#1008 接管。 冲突解决: - demo/ 对齐上游 fe288c0,撤销 agegr#963 对 demo 的两处改动(`@/lib/chat-phase-label` 在 demo/lib 下不存在,会打断 Pages 构建)。 - AGENTS.md:保留我们的 default-project 条目,open-folder 换成上游的 open-in-explorer。 - MessageView.tsx / SessionSidebar.tsx / FileExplorer.tsx:以上游为准, DismissButton 采用上游的独立文件,保留我们的思考卡片与文件管理改动。 - SessionSidebar 移除引用已删函数的旧 agegr#951 工作区按钮(agegr#951 的其他入口另行收尾)。
Kano-u
pushed a commit
to Kano-u/pi-web
that referenced
this pull request
Oct 2, 2026
agegr#967 / agegr#963 已由上游的 agegr#1009 / agegr#1008 落地,agegr#961 上游原样合并(逐字节相同), agegr#951 已收敛到上游的 agegr#907,agegr#960 上下游都拒绝——这些都与上游一致,按台账规则删行。 agegr#899 上游关闭但本地保留,状态注明为永久分叉。
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 6, 2026
* fix(chat): branch a history edit only when it is sent "Edit from here" called navigate_tree on click, which persisted a leaf move before the user committed to the edit. There was no way back, and a reload showed the conversation cut off at the edited message (agegr#958). Clicking now only prefills the composer and records the target entry in useAgentSession. The composer shows an edit banner with Cancel, which clears the prefill without touching the session. Sending navigates first and then takes the normal prompt path; a failed navigation restores the draft and the edit state. The pending edit follows the session's in-memory draft across session switches, and a pending edit is never sent as steer or follow-up. Navigation and prompt remain two RPCs, so a prompt rejected after the navigation keeps the new leaf. * fix(chat): expose history edit actions on touch screens * revert(chat): keep user-message actions on hover for touch screens Always showing Copy / Edit from here / New session at 44px under every user message on phones is a separate design change from deferring the history-edit branch, and it costs a lot of vertical space per turn. A tap on the message already reveals the actions (mobile browsers emulate mouseenter on tap), so leave that layout as it is here. This reverts commit 8931c5a. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q8e4GL1QSNFveKtnFfP3FZ --------- Co-authored-by: wayne.luo <[email protected]> Co-authored-by: Claude <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 8, 2026
* fix(chat): branch a history edit only when it is sent "Edit from here" called navigate_tree on click, which persisted a leaf move before the user committed to the edit. There was no way back, and a reload showed the conversation cut off at the edited message (agegr#958). Clicking now only prefills the composer and records the target entry in useAgentSession. The composer shows an edit banner with Cancel, which clears the prefill without touching the session. Sending navigates first and then takes the normal prompt path; a failed navigation restores the draft and the edit state. The pending edit follows the session's in-memory draft across session switches, and a pending edit is never sent as steer or follow-up. Navigation and prompt remain two RPCs, so a prompt rejected after the navigation keeps the new leaf. * fix(chat): expose history edit actions on touch screens * revert(chat): keep user-message actions on hover for touch screens Always showing Copy / Edit from here / New session at 44px under every user message on phones is a separate design change from deferring the history-edit branch, and it costs a lot of vertical space per turn. A tap on the message already reveals the actions (mobile browsers emulate mouseenter on tap), so leave that layout as it is here. This reverts commit 8931c5a. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q8e4GL1QSNFveKtnFfP3FZ --------- Co-authored-by: wayne.luo <[email protected]> Co-authored-by: Claude <[email protected]>
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.
Replaces #967 by @uvforce. Fixes #958. Their commits are kept. This branch reverts one of them and resolves the conflict with current
main.What
"Edit from here" called
navigate_treeon click. For a user message, pi moves the leaf to the message's parent and persists that, so:Changes
mainand resolve theChatInputprops conflict with the default-model star (defaultModel,onSetDefaultModel) by keeping both.Known limitation (from the original PR): navigate and prompt are still two RPCs.
Verification
tsc --noEmit,eslint, and the full unit suite (1324/1324) pass on this branch.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q8e4GL1QSNFveKtnFfP3FZ
Generated by Claude Code