Skip to content

Chat: honor Enter and IME in original Agent replies - #7301

Merged
loopx-agent merged 1 commit into
mainfrom
codex/attached-conversation-composer-20261025
Oct 25, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/attached-conversation-composer-20261025

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

Original Agent conversations had a separate reply textarea that never called the shared keyboard-intent owner. Enter inserted a line while ordinary Chat sent the message. Route this existing entry through composerKeyAction: Enter sends, Shift+Enter adds a line, IME confirmation stays local, and idle Command+Enter also sends.

The original binding, native admission and receipt route still decide every effect. Busy replies and unsupported active steering retain the draft with visible feedback. Source/update and shortcut definitions use shared accessible glyph help.

  • Outcome basis: a reproduced interaction defect; intended base: main.
  • Before → after: the same frozen packaged harness times out at the first Enter acceptance on af68b0ff180ca8309b5d63d7ee326c77848521bb, then passes on 03c638e4e00928abf29341f710fc35c9a7d1768e. Two keydowns in one browser task produce one native input.

Author Declaration

  • Written by: model agent — OpenAI GPT-6 family (Codex).
  • Specification and revision: docs/development/design.md at af68b0ff180ca8309b5d63d7ee326c77848521bb, especially explanations on demand and populated page review; companion docs/development/frontend-delivery.md and the existing composer-keyboard.ts intent contract.
Criterion Disposition Implementation / decisive evidence
Same accepted keyboard conventions at the original-reply entry implemented AttachedConversation reuses composerKeyAction; packaged Enter/Command+Enter positive cases and IME/newline negatives
Native effect ownership and recovery implemented Existing exact binding, pre-dispatch recovery storage and operation receipts; busy, storage failure, lost acknowledgement, reload and duplicate-key cases
Optional explanations available through semantic glyphs implemented Existing ContextHelp; pointer-to-panel continuity, focus/Escape, tap, Chinese/English and 390px captures
Conversation content, trust state and one input remain visible implemented Existing history/tool grouping retained; real source/reply restrictions and operation results remain in the page

Self-check: read the design/delivery/smoke contracts and inspected all changed source plus ten synthetic captures. The small reuse pass shares the existing intent/help owners and keeps the duplicate-submit latch local to this component. No new protocol field, backend, persistent setting or queue/steering authority is introduced.

Scope And Continuation

Complete within this original-reply entry and its packaged regression. Broader workbench refinement and actual native IME/dual-end qualification continue under existing owners. This is independently reversible without changing original conversations or their execution rules.

Validation

  • Tested revision: 03c638e4e00928abf29341f710fc35c9a7d1768e.
  • Run state: finished.
  • Input classes: synthetic, public_fixture, authorized_private_read_only.
Check kind Result Evidence / limitation
static passed Production Chat/TypeScript build, JS syntax, CSS custom properties, RFC bilingual diff and whitespace checks
unit passed Existing shared keyboard intent tests: two cases
real_backend passed 64 original-conversation tests; production HTTP/native-chat owner with disposable File/SQLite metadata and a synthetic host protocol peer
real_entrypoint passed Packaged attached-host-follow-up: 55.568s; original reply keyboard, composition guards, duplicate keydowns, recovery-storage refusal, busy and unknown receipts, two Sessions, long tool/history paging and language
regression_parity passed Frozen final harness/fixtures reject immutable base at ordinary Enter and pass restored head; composer-session-admission preserves ordinary managed/attached Chat behavior (2.980s)
static passed Premerge: four direct and eight selected commands; exact-scope change quality cqr_743d7a797e2f14e7b7e6
manual passed Ten public-safe PNGs read at desktop and 390px; metadata carries only standard PNG image chunks
manual not_run Actual macOS IME and live-account keyboard submission; synthetic composition events are not those qualifications

Premerge retains ten binary-image manual-review holds; the captures below supply their inspection evidence. Scoped public-text scanning is clean. Separate full registry diagnostics retain two pre-existing unrelated authority-state errors; no authority state is changed. CI is not queried under the current local-validation review contract.

The installed App was inspected read-only as the baseline; it had one original reply field and no shortcut help. No real message, model analysis, permission/configuration change or Session reset was performed. Post-change installed behavior is not claimed here. Disposable browser servers stop after the run, so there is no persistent preview URL.

Frontend / Visual Evidence

  • UI impact: changed; source data: synthetic.
  • Before: af68b0ff180ca8309b5d63d7ee326c77848521bb. After: 03c638e4e00928abf29341f710fc35c9a7d1768e, production packaged assets with the isolated native owner above.
  • The default view keeps dialogue and one bottom composer prominent. The two small glyphs expose optional source and keyboard definitions. Reply restrictions, failed delivery, draft retention and source uncertainty remain visible. Requested long original dialogue stays readable in full; it is not classified as an interface explanation.
  • Expanded help uses body-size text and fits 390px in Chinese and English. Existing long-history composition is retained; this is not a whole-workbench design verdict.
View Before After
Desktop Before desktop After desktop
Narrow Before narrow After narrow

Keyboard help desktop

Keyboard help narrow Keyboard help English narrow

Busy refusal and retained draft

Long original content desktop Long original content narrow

Type / Area / Boundary

  • Bug fix and focused test update; presentation surface and original-host interaction.
  • Shared-authority RFC fixture impact: N/A; authority ownership, storage and routing are unchanged.
  • No paired RFC changed. All commits are DCO signed. Public/private source and image checks completed; no private state, raw traces, credentials or local operating paths are published.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max (latest host-recorded execution; active_turn_verified=true).

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机

从工作台进入原 Agent 会话并追加回复的用户,需要与普通聊天一致的发送、换行和输入法行为。 普通聊天中 Enter 会发送,但原 Agent 会话的同类输入框按 Enter 只换行,必须再找发送按钮;现在 Enter 进入原有投递路径,Shift+Enter 换行,输入法确认仍只提交候选词。 打包原会话页面已验证一次 Enter 仅产生一次原宿主输入;忙碌或回执未明时不投递并保留草稿,来源和快捷键说明通过小图标按需读取。 本次交付原会话回复的键盘一致性和说明入口,不增加原宿主排队、调整本轮、权限或自动重发能力。 真实 macOS 输入法和已安装版本的投递效果仍未验证;完整研究工作台、长工具记录阅读及双端消息交付继续沿原任务推进。

改动思路

现有 composerKeyAction 已定义发送、换行和输入法保护,原会话只缺少调用;复用它并保留各自宿主的准入和回执所有者,比复制快捷键规则或接入另一套队列更小。 本 PR 只把键盘意图接到既有原会话投递处理,并用共享帮助呈现可选说明;原绑定、宿主执行权和持久回执不变。 前端只解释键盘意图,真正能否接收由原宿主决定。这里没有借普通 Chat 的排队能力假装原会话也能排队:忙碌时的 Command+Enter 给出明确拒绝,草稿仍在。发送前继续先保存恢复记录,再调用原有投递;增加一个同步的组件内标记,避免同一浏览器任务的两个键事件在重新渲染前各创建一次操作。来源事实、原会话是否可回复、失败与回执继续直接可见,完整定义放在共享图标帮助中。

下表仅解释此head的实际分支,执行证据见后文:

输入 原会话以前 此head
空闲时 Enter 换行,需要再点发送 进入原有投递,一次输入
Shift+Enter / 输入法确认 本地文本操作 保持本地换行或候选词确认
空闲时 Command+Enter 没有专用快捷键 与显式发送相同
忙碌或状态未知时快捷键 不能经按钮投递 明确拒绝、保留草稿,不增加调整本轮或队列能力

具体改动

规范基准为 docs/development/design.md,版本 af68b0ff180ca8309b5d63d7ee326c77848521bb;任务路径同时遵循既有 docs/development/frontend-delivery.md。shared-composer-intent 已实现:实际原会话输入框复用已有键盘语义,组合输入、重复键与换行均有否定路径。explanations-on-demand 已实现:来源与快捷键使用语义不同的小图标,完整说明能悬浮、聚焦或点击读取。populated-page-review 已实现:检查默认、完整中英文帮助、长消息与工具混合记录、忙碌恢复的桌面和390px视图。task-first-recovery 已实现:原绑定输入、拒绝、回执及原消息回读经既有所有者验证。没有修改规范或后端规则来迁就实现。

关键代码讲解

  1. apps/presentation/dashboard/src/features/personal-workspace/attached-agent-conversations.tsx:86 的 AttachedConversation 仍由原 Goal→Agent 页面按确切会话绑定挂载。useId 让输入框与可访问标签明确对应,帮助按钮放在标签外。来源文案完整从原生 title 移到共享帮助,来源事实和回复条件留在页面。键盘事件经过既有意图函数,再检查原会话是否空闲、可回复及恢复状态;输入框仍只有一个。
  2. apps/presentation/dashboard/src/features/personal-workspace/attached-agent-conversations.tsx:349 的 send 是按钮和快捷键共同的效果入口。同步标记在写入待确认恢复记录前置位,阻止同一任务里的第二次进入;保存失败时立即释放并保持零POST,最终分支也释放。原来的操作标识、确切绑定、服务端明确未投递证明以及只读回执恢复保持。未知投递不会因重读或刷新重放。
  3. apps/presentation/dashboard/src/features/personal-workspace/composer-keyboard.ts:2 的 composerKeyAction 实现未改动。组件组合状态、事件组合状态、WebKit229、重复键或Shift都会返回无发送意图;Command只返回已有局部意图,不能授予原宿主执行权。普通Chat在 apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-page.tsx:3073 的原调用不变,它的排队/调整本轮准入继续由自身提供方管理。
  4. examples/personal-workspace-browser/codex-attached.mjs:30 的 runConversation 扩展原有集成场景,而非另建只测模拟按钮的页面。编译Chat经真实原会话HTTP所有者连接可丢弃的原宿主协议peer,核对输入计数、三种IME保护、同任务重复事件、存储失败、忙碌竞争、未知回执与完整帮助。原有多会话选择、迟到结果、分页历史、重绑定及原始记录覆盖仍完整运行。十张公开安全的合成截图直接嵌入PR描述。

对主干的风险

最严重的风险是中文候选词确认被当成发送、同一任务重复创建原生操作,或快捷键绕过忙碌与未确认回执。既有共享函数的单元测试之前已经通过,却不能证明另一处实际输入框接入了它;旧的按钮路径测试也不会发现这个缺口。最终将不可变主干的两个产品文件放入完全相同的冻结场景,Enter始终等不到原宿主接纳,退出1;恢复此head后完整场景55.568秒通过,三个测试/peer来源指纹未变,产品文件回到确切提交。

原会话所有者64项测试通过,普通Chat的managed/attached准入场景及共享键盘测试通过。IME否定事件、Shift换行、同任务重复、恢复存储拒绝、忙碌和未知回执均通过实际编译页面到原HTTP所有者检查;实际宿主效果由合成peer承接。构建、JS语法、31份CSS检查通过。标准premerge的4项直接检查与8项选择检查执行通过,确切范围CQR有效;原始结果仍因十张PNG而是manual_review_required,已逐张查看像素和元数据,不把它改写成自动全绿。三个变更文本路径公开边界干净;全局registry另有两条无关既有权威错误,保留为诊断。当前策略不查询或等待CI。无格式迁移,回滚本提交可恢复旧键盘行为。

我的整体评价

结论为 justified_increment:这一实际输入入口有完整的发送、拒绝和恢复证据,可独立交付;更大的工作台体验仍在既有任务中。long_horizon 为 preserved,不声称已测得token或长程效率收益;user_experience 在本次键盘和帮助范围为 improved。默认桌面和390px页面仍以原对话及一个底部输入框为主,只有来源和键盘两个小图标;展开中英文完整帮助保持正文字号,忙碌拒绝与草稿继续可见。 合成原宿主协议覆盖编译页面与真实HTTP所有者,不等同真实账号发送、macOS输入法或安装后投递验收;长记录沿用现有阅读结构,本次不宣告整个研究页面已重设计。 本次复用既有意图词汇,新增状态只在组件内存在,不构造第二个权限、队列或持久回执所有者。

English verdict: APPROVE at 03c638e4e00928abf29341f710fc35c9a7d1768e. The actual original-Agent reply field now reuses existing Enter/IME intent and native admission, with exactly-once local entry and unchanged receipt-only recovery. Frozen base/head, complete packaged original-owner integration, main Chat parity,64native tests and declared local checks support this bounded slice. Real macOS IME, live-account effects and post-install adoption remain separately unverified.

@loopx-agent
loopx-agent merged commit d8de1cf into main Oct 25, 2026
25 of 31 checks passed
@loopx-agent
loopx-agent deleted the codex/attached-conversation-composer-20261025 branch October 25, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant