fix: CLI agent 浮窗记忆用户调整的尺寸并跨重启保留#322
Open
Ghostknight0 wants to merge 1 commit into
Open
Conversation
每次新建对话时 CLI agent 浮窗都回到默认大小(360x320),因为 CLISubagentView::new 每次都创建全新的 ResizableStateHandle。 接入仓库统一的 ResizableData 机制(与 LeftPanel/RightPanel/WarpAI 相同): - ModalType 新增 CliSubagentWidth/CliSubagentHeight,ModalSizes 持有 共享 handle,同窗口内新对话自动复用记忆尺寸 - windows 表新增 cli_subagent_width/cli_subagent_height 两列 (迁移 2026-07-20-000000_add_cli_subagent_window_sizes), 经 WindowSnapshot 会话恢复链路跨重启保留
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.
Description
每次新建对话时,CLI agent 浮窗都会回到默认大小(360×320),用户手动调整的尺寸不会被记住。根因是
CLISubagentView::new每次都创建全新的ResizableStateHandle,尺寸只活在单个 view 实例里。本 PR 将浮窗尺寸接入仓库统一的
ResizableData机制(与 LeftPanel / RightPanel / WarpAI 面板相同的模式):ModalType新增CliSubagentWidth/CliSubagentHeight,ModalSizes持有共享 handle——同一窗口内所有 CLI 浮窗共用记忆尺寸,新建对话自动复用windows表新增cli_subagent_width/cli_subagent_height两列(迁移2026-07-20-000000_add_cli_subagent_window_sizes),经WindowSnapshot会话恢复链路跨重启保留with_bounds_callback自动 clamp,无需额外处理Testing
cargo check -p warp -p persistence通过cargo nextest run -p warp persistence:24/25 通过;唯一失败的cloud_object::model::persistence::tests::test_unshared_team_object为上游遗留问题(单独重跑确定性失败,断言的是云对象Space::Team/Shared共享语义,与本改动涉及的文件无交集)test_sqlite_round_trips_*)覆盖;尺寸共享逻辑复用既有ResizableData/ModalSizes机制,无新增分支逻辑Server API dependencies
无——仅为客户端本地 SQLite 迁移,不涉及服务端 API。
Agent Mode
Changelog Entries for Stable
CHANGELOG-IMPROVEMENT: CLI agent 浮窗现在会记住用户调整的尺寸,新建对话与重启应用后保持