b0cb99f2bc2de8263d9066605683e3de120c6545
gpui-component 的 ContextMenu 在 request_layout 里就把焦点抢给弹出菜单, 而树行是 uniform_list 在 prepaint 阶段才渲染布局的,于是焦点在一帧的中途 易主:树容器(被右键点击聚焦,且带无障碍角色)在这一帧更早的 prepaint 里 已经报告过自己是焦点节点,弹出菜单再报告一次就撞上 gpui 的断言 「set_focus called more than once in a single frame」。只在开了辅助功能的 调试构建里 panic,release 构建打警告。 把 .context_menu(..) 从每行挪到 #session-tree 容器上,容器走正常布局阶段, 焦点在 prepaint 开始前就定下来了。指针下的节点用 Rc<Cell<Option<SessionNode>>> 传递:容器在捕获阶段先清空,被命中的行在冒泡阶段写回自己——所有捕获处理器 都先于任何冒泡处理器,顺序有保证。gpui-kit 自带的 Table 也是这么挂的,所以 SFTP 文件列表一直没崩。 顺带:在行下方的空白处右键现在会出根菜单,以前没反应。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TChp1yPThAzy3UcdXZcZA9
Description
High-performance native SSH client in Rust, GPU-rendered with GPUI: host manager, terminal, WinSCP-style SFTP and port forwarding. Rust 编写、GPU 渲染的原生 SSH 客户端。
https://shellrs.com
14 MiB
0 Stars
1 Watchers
0 Forks