feat: 会话列表与文件浏览器之间支持拖拽调整分隔比例 - #522
Conversation
- 在侧边栏的会话列表与文件浏览器之间新增可拖拽分隔条, 拖拽时分隔线跟随指针移动(支持触摸) - 分隔比例持久化到 localStorage(pi-sidebar-explorer-ratio), 默认 50%,范围 20%–75% - 键盘可访问:↑/↓ 微调、Shift+↑/↓ 大步调整、Home/End 到边界、 Enter 或双击恢复默认 - 为分隔条补充 aria-label 与 i18n(en / zh-CN)
会话列表与文件浏览器之间的分隔条改为纯指针交互, 不再提供键盘焦点与快捷键操作: - 删除 handleExplorerSplitKeyDown 处理器及其全部按键逻辑 (↑/↓ 微调比例、Shift+↑/↓ 大步调整、Home/End 直达边界、 Enter 恢复默认比例) - 分隔条元素不再可聚焦:移除 tabIndex 与 onKeyDown 绑定, 避免形成无法操作的焦点陷阱 - tooltip 文案改为仅提示拖拽调整,不再提及 Enter 快捷键 保留原有交互能力: - 鼠标/触摸拖拽时分隔线跟随指针移动(方向已修正) - 双击分隔条恢复默认 50% 比例 - 分隔比例仍持久化到 localStorage(pi-sidebar-explorer-ratio)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59573946b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {/* Drag handle between the conversation manager and the file browser */} | ||
| {(selectedCwdProp || selectedCwd) && explorerOpen && ( | ||
| <div | ||
| role="separator" |
There was a problem hiding this comment.
Make the adjustable separator keyboard operable
The separator exposes aria-valuemin, aria-valuemax, and aria-valuenow as an adjustable control, but the <div> has neither tabIndex nor an onKeyDown handler. Keyboard and switch-device users therefore cannot focus it, change the split, or invoke the reset action; add focusability and Arrow/Home/End/Enter handling like the existing panel resize separators.
Useful? React with 👍 / 👎.
- 接入系统 shell(node-pty + xterm.js),在聊天面板下方展示 - 工作目录不存在时自动回退到用户主目录 - 支持多开终端标签,顶部拖拽调节高度(双击重置,localStorage 持久化) - Ctrl+` / Ctrl+~ 快捷键呼出、隐藏终端,打开时自动聚焦 - 隐藏面板保留会话与回滚缓冲,刷新页面后自动重连并恢复标签 - SSE 断开 30 秒无人重连自动回收,防止孤儿 shell 进程 - 终端配色跟随应用亮暗主题实时切换 - node-pty 设为 serverExternalPackages,随依赖安装编译
在侧边栏的会话列表与文件浏览器之间新增可拖拽分隔条, 拖拽时分隔线跟随指针移动(支持触摸) 分隔比例持久化到 localStorage(pi-sidebar-explorer-ratio), 默认 50%,范围 20%–75% 为分隔条补充 aria-label 与 i18n(en / zh-CN)