Skip to content

feat(tabs): add Ctrl+Tab / Ctrl+Shift+Tab to cycle conversation tabs - #246

Merged
xintaofei merged 1 commit into
xintaofei:mainfrom
mvanhorn:feat/217-tab-cycle-shortcuts
Jun 4, 2026
Merged

feat(tabs): add Ctrl+Tab / Ctrl+Shift+Tab to cycle conversation tabs#246
xintaofei merged 1 commit into
xintaofei:mainfrom
mvanhorn:feat/217-tab-cycle-shortcuts

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Ctrl+Tab cycles to the next conversation/file tab and Ctrl+Shift+Tab to the previous one, with wrap-around at both ends. Both bindings are registered in the existing shortcut registry, so they show up in Settings -> Shortcuts and can be remapped like every other action.

Why this matters

#217 asks for keyboard-only tab switching, and you replied "可以的". This implements the core left-to-right cycling; the MRU-ordering idea floated in the issue is left as a possible follow-up so this stays small.

The implementation follows the existing patterns end to end:

  • next_tab / prev_tab action ids in src/lib/keyboard-shortcuts.ts with defaults mod+tab / mod+shift+tab (Ctrl on Windows/Linux, ⌘ or Ctrl on macOS, same as the other mod bindings)
  • the existing keydown effect in src/components/tabs/tab-bar.tsx (the one that already handles close_current_tab) computes the active index and calls switchTab on the neighbor, wrapping with modular arithmetic
  • with zero or one tab, or when the active pane is not the conversation pane, the handler is a no-op
  • ShortcutSettings.actions labels added to all 10 locale catalogs to keep the messages.test.ts key-parity check green

Testing

  • New src/lib/keyboard-shortcuts.test.ts covers registration + defaults, Ctrl+Tab matching mod+tab, Ctrl+Shift+Tab matching mod+shift+tab, and that the two bindings never match each other's events
  • pnpm test: 469 passed; the single failure (workspace-context.test.tsx localStorage setItem) fails identically on clean main and is unrelated
  • pnpm eslint clean on the touched files

Closes #217

@xintaofei

Copy link
Copy Markdown
Owner

Thank you for your PR.

@xintaofei
xintaofei merged commit aae81e1 into xintaofei:main Jun 4, 2026
7 checks passed
xintaofei added a commit that referenced this pull request Jun 4, 2026
- feat(server): Server and Docker deployments can now upgrade themselves in-place — no manual file replacement needed. The supervisor automatically validates the new version and rolls back if the trial run fails.
- feat(server): A manual rollback action is now available in Server Update settings, letting you revert to the previous version at any time.
- feat(delegation): Sub-agent sessions now open in a centered dialog, making it easier to follow a delegated task's progress alongside your main conversation.
- feat(delegation): Batch-polling delegation status is now supported — query multiple task IDs in a single call for lower overhead in multi-agent workflows.
- feat(tabs): Press Ctrl+Tab / Ctrl+Shift+Tab to cycle forward and backward through open conversation tabs — thanks to @mvanhorn (#246).
- fix(server): The access token no longer regenerates on restart, so existing clients stay connected after a server reboot.
- fix(delegation): Token usage is now correctly backfilled on the child sub-session reply, so cost tracking stays accurate.
- fix(model-provider): API keys containing non-ASCII characters no longer cause a panic when the key is masked for display.
- fix(update): The server upgrade process is now crash-safe: the web bundle swaps atomically, disk writes are verified, and a bad upgrade is self-healed on the next boot.
- fix(plan): The plan overlay now expands correctly, and stale plans are no longer shown where they should be hidden.
- chore(registry): Bundled Claude Code updated to 0.41.0 and Gemini CLI to 0.45.0.

-----------------------------

# 发布版本 0.14.12

- 功能(服务器):服务器与 Docker 部署现在支持原地自升级,无需手动替换文件。监督进程会自动验证新版本,若试运行失败则自动回滚。
- 功能(服务器):服务器升级设置中新增手动回滚操作,随时可将版本恢复到上一个稳定版本。
- 功能(委派):子代理会话现在在居中弹窗中打开,让你在主对话旁边更方便地跟进委派任务的进度。
- 功能(委派):支持批量查询委派状态,一次调用即可获取多个任务 ID 的结果,降低多代理工作流的轮询开销。
- 功能(标签页):按 Ctrl+Tab / Ctrl+Shift+Tab 可在已打开的会话标签页间前后切换——感谢 @mvanhorn (#246)。
- 修复(服务器):访问令牌在服务器重启后不再重新生成,已接入的客户端无需重新配置。
- 修复(委派):子会话回复中的 Token 用量现在能正确回填,费用追踪数据更准确。
- 修复(模型提供商):包含非 ASCII 字符的 API 密钥在遮码显示时不再触发 panic。
- 修复(升级):服务器升级流程现已具备崩溃安全性:网页包原子替换、磁盘写入可验证,异常升级在下次启动时自动修复。
- 修复(计划):计划浮层现在能正确展开,不该显示的旧计划不再错误出现。
- 更新(注册表):内置 Claude Code 更新至 0.41.0,Gemini CLI 更新至 0.45.0。
@mvanhorn

mvanhorn commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the merge @xintaofei! Ctrl+Tab conversation cycling should feel right at home.

@mvanhorn

Copy link
Copy Markdown
Contributor Author

Much appreciated @xintaofei - Ctrl+Tab cycling between conversation tabs was a small thing that bugged me daily. Thanks for the merge.

@xintaofei

Copy link
Copy Markdown
Owner

Much appreciated @xintaofei - Ctrl+Tab cycling between conversation tabs was a small thing that bugged me daily. Thanks for the merge.

Thank you for your pull request; the feature is indeed helpful.

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.

[FR] Ctrl (Shift) Tab 切换标签页

2 participants