Skip to content

修复(前端):统一任务确认弹窗键盘导航 - #1013

Merged
xiaomakuaiz merged 5 commits into
chaitin:mainfrom
2379278408:260806-fix-task-dialog-keyboard
Aug 7, 2026
Merged

修复(前端):统一任务确认弹窗键盘导航#1013
xiaomakuaiz merged 5 commits into
chaitin:mainfrom
2379278408:260806-fix-task-dialog-keyboard

Conversation

@2379278408

@2379278408 2379278408 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

变更说明

  • 提取可显式启用的弹窗左右方向键导航 Hook
  • 覆盖任务域 13 个 AlertDialog 确认弹窗和发布网站 Dialog
  • 支持任务终止与删除、模型切换、上下文重置、Agent 重启、Slash 命令、长内容转换、文件删除、终端关闭和白板清空
  • 保留 Enter 原生行为、Radix 焦点管理、输入框方向键、禁用状态和异步关闭逻辑

键盘行为

  • ArrowLeft:聚焦取消按钮
  • ArrowRight:聚焦确认按钮
  • Enter:执行当前聚焦按钮
  • TabShift+TabEscape:继续由 Radix 处理

验证

  • node --test test/task-restart-dialog-keyboard.test.mjs
  • pnpm exec tsx --test test/console-tasks-i18n.test.ts test/project-overview-i18n.test.ts test/console-nav-project-i18n.test.ts test/task-long-content-dialog.test.ts test/task-long-content-integration.test.ts test/task-detail-i18n.test.ts test/task-detail-preview-publish.test.ts
  • 对全部改动文件执行定向 ESLint
  • pnpm exec tsc -b
  • pnpm run build:online
  • git diff --check

@2379278408 2379278408 changed the title fix(frontend): reuse dialog keyboard navigation 修复(前端):统一任务确认弹窗键盘导航 Aug 7, 2026
@xiaomakuaiz
xiaomakuaiz merged commit 6bc803d into chaitin:main Aug 7, 2026
2 checks passed
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.

2 participants