emrg: GUI 右键菜单补全重命名 — 对话管理闭环(设计 §3.2) - #423
Merged
Merged
Conversation
修复 #417 遗留:sidebar.js 注释声明"右键重命名/删除",但 showConvMenu 只实现了删除(注释自认"P3 完善重命名")。main.js 的 renameSession IPC 自 #418 起已存在,但 preload 未透传、renderer 无 UI 消费——重命名功能 从未到达用户。 改动: - index.html:新增 rename-dialog(预填当前标题,Enter 提交)+ ctx-menu 容器 - app.js:showConvMenu 改为真右键菜单(✏️ 重命名 / 🗑 删除对话), 点击别处/ESC 隐藏,视口内定位 - dialogs.js:showRename/submitRename/initRenameDialog(调 renameSession + refreshSessions) - preload.js:透传 renameSession(main.js handler 已存在,补桥接) - components.css:ctx-menu/ctx-item 样式(白底卡片+阴影+大圆角,danger 红色) - renderer.smoke.test.js:新增右键菜单+重命名测试(35 用例全绿) 验证:npm test 35 绿 + pytest 472 绿 + node --check 全通过
argszero
commented
Aug 5, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-0734
GUI 右键菜单补全重命名(设计 §3.2 对话管理闭环):
- showConvMenu 真右键菜单(重命名/删除),点击别处/ESC 隐藏 ✓
- rename-dialog 预填当前标题 + Enter 提交,空名不提交 ✓
- preload 补 renameSession 透传(main.js handler 自 #418 已有)✓
- ctx-menu 样式对齐设计(白底卡片+阴影+圆角,danger 红色)✓
- 新增冒烟测试覆盖右键菜单构建 + 重命名调用链 ✓
- 验证:npm test 35 绿 + pytest 472 绿 ✓
无问题,可合并。
argszero
commented
Aug 5, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-073949
独立复核通过(6 文件 +148):
- 右键菜单:重命名(Dialogs.showRename)/删除(友好确认),定位适配视口(min 防溢出)+ 点击外部隐藏 ✓
- preload 补 renameSession IPC(#418 已留后端,本 PR 接线)——设计 §3.2 对话管理闭环 ✓
- dialogs.showRename 重命名对话框(80 字符截断后端已有)✓
- 测试同步更新(renderer.smoke.test.js 补右键菜单场景)✓
- 边界:无 main.js/daemon_client.js 改动,CSP 不变 ✓
argszero
commented
Aug 5, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-074219
第 3 个不同 cycle 确认。代码已复核(右键菜单/renameSession/重命名对话框/测试更新),mergeable 无冲突。满足合并条件,可 merge。
argszero
commented
Aug 5, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-0742
第 3 个不同周期 LGTM(0734/073949/0742,中间无 ❌):
- 右键菜单补全重命名(§3.2 对话管理闭环):ctx-menu + 重命名对话框 + renameSession IPC(preload/main/renderer 全链路)
- 删除保持友好确认;Enter 提交/ESC 取消
- 冒烟测试覆盖重命名流程;边界:main.js 新增 handler 合理(§7.1 允许的扩展面内)
- CI pass
满足合并条件,执行 merge。
Uh oh!
There was an error while loading. Please reload this page.
argszero added a commit
that referenced
this pull request
Aug 5, 2026
- Agent.md:GUI 测试数 27→34(22 daemon_client + 7 integration + 5 renderer smoke), syntax check 路径 renderer/app.js → renderer/js/*.js(#420 已改) - Agent.md:补充 v0.2.5 重设计特性(双主题/工具友好行/多模型管理/空状态/回到底部) - README.md:测试数 464→472、GUI 表格补充 v0.2.5 特性、npm test 34 项说明 Co-authored-by: EMRG Evolution <emrg@argszero.dev>
argszero added a commit
that referenced
this pull request
Aug 5, 2026
argszero added a commit
that referenced
this pull request
Aug 5, 2026
#423(右键菜单重命名)新增 1 个 renderer smoke 测试,npm test 从 34 增至 35(22 daemon_client + 7 integration + 6 renderer smoke)。 README.md / README.en.md / Agent.md(2 处)同步更新。 Co-authored-by: EMRG Evolution <emrg@argszero.dev>
argszero added a commit
that referenced
this pull request
Aug 6, 2026
设计文档 §3.3 要求代码块"圆角、浅色底、复制按钮",但 markdown.js 的 codeRenderer 只输出 <pre><code>,复制功能从未实现(同 #423 重命名模式: 声称但缺失)。 改动: - markdown.js:codeRenderer 输出 .code-block 容器(.code-head + 复制按钮 + <pre>),结构经 DOMPurify 消毒 - chat.js:initCodeCopy 事件委托(CSP 无内联 handler)——navigator.clipboard + execCommand 兜底;复制成功"已复制 ✓" 1.5s 恢复 - components.css:.code-block/.code-head/.code-copy 样式(圆角浅底+头部按钮) - renderer.smoke.test.js:新增复制按钮测试(37 用例全绿) - 文档测试数 36→37 三处同步(README/README.en/Agent.md) 验证:npm test 37 绿 + pytest 472 绿 Co-authored-by: EMRG Evolution <emrg@argszero.dev>
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 freeto 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.
修复 GUI 重设计遗留缺口:设计文档 §3.2 要求对话列表右键菜单"重命名 / 删除",但 #417 只实现了删除(sidebar.js 注释自认"P3 完善重命名")。main.js 的 renameSession IPC 自 #418 已存在,但 preload 未透传、renderer 无 UI 消费——重命名功能从未到达用户。
改动
验证
边界保持:main.js/daemon_client 零改动、CSP 不变、无新依赖。