merge from upstream - #1
Closed
htmambo wants to merge 2 commits into
Closed
Conversation
- 修改节点激活判断,Database 节点需已加载子节点 - Table、TablesFolder 等非 Database 节点只需连接激活即可 - 优化条件判断逻辑,使菜单展示更准确 - 更新注释完善说明节点状态判断标准
- 删除了“compress-query”按钮及其相关事件处理 - 简化了查询编辑器界面布局 - 清理了不再使用的压缩查询功能代码 - 改善了按钮区域的代码结构和可维护性
There was a problem hiding this comment.
Pull request overview
This PR updates the db_view UI by removing the SQL editor “compress query” toolbar action and adjusting DB tree context-menu enablement rules to be less restrictive for non-Database nodes.
Changes:
- Remove the “compress query” button from the SQL editor toolbar.
- Change context-menu “active” gating so only
Databasenodes requirechildren_loaded; other node types only require an active connection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
crates/db_view/src/sql_editor_view.rs |
Removes the toolbar entry point for query compression. |
crates/db_view/src/db_tree_view.rs |
Updates is_active computation for context menu items based on node type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
1127
to
1131
| .ghost() | ||
| .label(t!("Query.save")) | ||
| .icon(IconName::Plus) | ||
| .on_click(cx.listener(Self::handle_save_query)), | ||
| ) |
Comment on lines
2488
to
2492
| // 判断节点是否处于可操作状态: | ||
| // - 连接必须激活 | ||
| // - 非 Connection 节点还需要 children_loaded(即节点已展开加载过) | ||
| // - Database 节点还需要 children_loaded(即节点已展开加载过) | ||
| // - 其余节点(Table、TablesFolder 等)只需连接激活即可 | ||
| let conn_active = node |
htmambo
added a commit
that referenced
this pull request
Jun 8, 2026
详细说明: - P2 任务 A:在 crates/core/src/popup_window.rs 抽离 ROUNDED_POPUP_RADIUS_PX = 8.0 + 编译期断言 + popup_radius_gpui() 工具函数 + 2 单元测试守护 - P2 任务 B:script/bundle-macos.sh 末尾追加 6 行 if/else 守护的 ad-hoc codesign 解决 macOS 15+/26 Local Network Privacy 拦截局域网(AGENTS.md:337 经验 → 机制化) - P2 任务 A 主动降级:原计划"封装 helper + 迁移调用点"价值低于预期 (popup 壳层已自带圆角),改为抽常量 + 测试守护 - Codex 顾问:Phase 1 APPROVED_WITH_CHANGES(采纳 6 项)、Phase 4 REJECTED → 已修复 主题半径回归风险(setting_tab.rs:1233 可改写 theme.radius_lg) 测试状态: - [x] cargo check -p one-ui -p one-core -p main 0 error - [x] cargo test -p one-core --lib popup_window 5/5 passed(3 既有 + 2 新增) - [x] bash -n script/bundle-macos.sh syntax ok - [x] Codex Phase 4 REJECTED 风险 #1+#2 已修复(恢复 cx.theme().radius_lg 运行时调用) > OMC trailers: > Constraint: fullauto v2.1 — 零询问端到端 > Rejected: 自动 git commit | 理由:AGENTS.md 个人硬门禁 > Confidence: high > Scope-risk: narrow(仅常量+测试+6 行 shell) > Not-tested: codesign 在真实 macOS 上的实际效果(待用户实测) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
htmambo
added a commit
that referenced
this pull request
Jul 4, 2026
从 dev 同步提交 c5dbbc8 的 rename 部分(补完第四批跳过的 rename)。 详细说明: - 文件菜单加 Rename 项(Edit icon)→ rename_item 对话框(Input + 确认/取消) - on_ok:校验非空 + is_valid_entry_name(非法→invalid_name 通知);sftp_client.rename(old, new) + refresh_dir;失败→rename_failed 通知(含 error) - build_rename_target_path:remote_path_parent + join_remote_path(HEAD join_remote_path 处理根目录,无 // 双斜杠) - on_ok 返回 false 保持对话框,spawn 成功后 close_dialog(失败保持打开供重试) 文件变更: - 修改: crates/terminal_view/src/sidebar/file_manager_panel.rs(build_rename_target_path helper + rename_item 方法 + 菜单项 + clones + 1 测试) 测试状态: - [x] cargo test -p terminal_view --lib file_manager_panel::tests: 14 passed(含新增 build_rename_target_path_keeps_parent_directory) - [x] cargo build -p terminal_view 通过 - [x] External Review(coding-bridge 32547a61)无阻塞:#3 root // 误报(HEAD join_remote_path 处理根目录);feigeCode#4 error 已含;#1/#2 dev 原设计(无 active_rename 锁/None 静默,忠实移植) > OMC trailers: > Constraint: 仅 file_manager_panel.rs;rename 部分(补完 c5dbbc8) > Rejected: 加 active_rename 锁 | dev 原设计无锁,忠实移植;失败保持对话框可重试 > Directive: 用户要求第五批继续推进,每步 External Review > Confidence: 高 | 14 测试通过 + 编译 + review 无阻塞 + 逻辑为 dev 已测功能忠实移植 > Scope-risk: terminal 侧栏文件管理器远程重命名;无重入锁(dev 设计) > Not-tested: 运行时真实 SFTP 重命名(需远程环境手测);并发重入场景 Co-Authored-By: Claude <noreply@anthropic.com>
htmambo
added a commit
that referenced
this pull request
Jul 4, 2026
从 dev 同步提交 c9c56ce 的 terminal clear 部分(connection LRU 部分因 HEAD repository.rs schema 分叉 deferred)。 详细说明: - SSH 终端清屏后远程 shell prompt 不重绘,发送 \x0c(form-feed/Ctrl-L)触发远程重绘 - 新增 SSH_CLEAR_SCREEN_REDRAW_BYTES 常量 + clear_screen_remote_redraw_bytes 纯函数(SSH→Some,Local/Serial→None) - clear_screen 方法:grid reset + drop(term) 后,若 SSH 则 write(\x0c),再 emit Wakeup - Local/Serial 不发送(本地 grid reset 足够) 文件变更: - 修改: crates/terminal/src/terminal.rs(const + fn + clear_screen 调用 + 1 测试) deferred: connection LRU(repository.rs +119 + migration + 8 文件)——HEAD repository.rs schema 分叉(有 sort_order 列、无 team_id),需适配列结构 + DB 迁移,风险高 测试状态: - [x] cargo test -p terminal --lib clear_screen_requests_remote_prompt_redraw: 1 passed - [x] cargo build -p terminal 通过 - [x] External Review(coding-bridge 828491c7)无阻塞:#1 write 错误处理误报(编译无 unused Result 警告,dev 设计);#2 顺序 dev 已测设计 > OMC trailers: > Constraint: 仅 terminal.rs 的 terminal clear 部分;connection LRU deferred > Rejected: 移动 write 顺序 | dev 已测顺序(grid reset→drop→write→Wakeup) > Directive: 用户要求第五批继续推进,每步 External Review > Confidence: 高 | 1 测试通过 + 编译 + review 无阻塞 > Scope-risk: SSH 终端清屏行为(发送 \x0c);Local/Serial 无变化 > Not-tested: 运行时 SSH 清屏后 prompt 实际重绘(需 SSH 环境手测) Co-Authored-By: Claude <noreply@anthropic.com>
htmambo
added a commit
that referenced
this pull request
Jul 4, 2026
从 dev 同步提交 df30aba(基础设施部分;action handlers 在 d15ecfc)。 详细说明: - 新增 search_shortcut.rs 模块:FocusSearchInput/OpenSelectedTableQuery actions + keybindings(cmd-f 聚焦搜索,cmd-shift-enter 打开表查询) - keybindings.rs 加 DB_FOCUS_SEARCH/DB_OPEN_TABLE_QUERY action IDs - onetcli_app init 调 search_shortcut::init(绑定快捷键) - db_view.yml 加 query_table/search_placeholder locale 注意:本提交仅含 keybinding 基础设施。action 的 on_action handlers(on_action_focus_search/on_action_open_selected_table_query)在 dev 的 d15ecfc 添加(下一功能)。handlers 移植前,快捷键绑定但无响应。 deferred:setting_tab DATABASE_SHORTCUTS UI(HEAD 无 ShortcutEntry 结构)+ onetcli_app refresh_keybindings 调用(HEAD 无顶层 refresh fn)+ main.yml database_focus_search locale(仅 setting_tab UI 用) 文件变更: - 新增: crates/db_view/src/search_shortcut.rs(actions+keybindings+3 测试) - 修改: crates/core/src/keybindings.rs(DB_FOCUS_SEARCH/DB_OPEN_TABLE_QUERY action IDs) - 修改: crates/db_view/src/lib.rs(pub mod search_shortcut) - 修改: main/src/onetcli_app/mod.rs(init 调用) - 修改: crates/db_view/locales/db_view.yml(query_table/search_placeholder) 测试状态: - [x] cargo test -p db_view --lib search_shortcut: 3 passed - [x] cargo build -p main 通过 - [x] External Review(coding-bridge e9eef232):#1 OpenSelectedTableQuery 无 handler——确认 handlers 在 d15ecfc(下一功能),本提交为基础设施;#2-feigeCode#8 改进建议非阻塞 > OMC trailers: > Constraint: 仅 keybinding 基础设施;handlers 在 d15ecfc > Rejected: setting_tab DATABASE_SHORTCUTS UI | HEAD 无 ShortcutEntry 结构 > Rejected: onetcli_app refresh_keybindings 调用 | HEAD 无顶层 refresh fn > Directive: 用户要求第五批继续推进,每步 External Review > Confidence: 中 | 3 测试通过 + 编译,但 handlers 待 d15ecfc(快捷键暂无响应) > Scope-risk: db 快捷键基础设施(action IDs+keybindings+init) > Not-tested: 快捷键实际响应(待 d15ecfc handlers) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #[issue number]
Description
Describe in English for the changes made in this pull request and the problem it solves.
Please keep 1 PR to solve 1 problem, and keep Small improvements should be small modifications to make PR easier to review and to merge.
Screenshot
Break Changes
Describe any breaking changes introduced by this pull request. If none, remove this section.
How to Test
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist
cargo runfor story tests related to the changes.