Skip to content

chore(release): 发布 v0.18.6(数据库对象全选拖选 + PostgreSQL 外部表/物化视图等 6 项改动) - #270

Merged
feigeCode merged 6 commits into
mainfrom
dev
Sep 21, 2026
Merged

feigeCode merged 6 commits into
mainfrom
dev

Conversation

@feigeCode

Copy link
Copy Markdown
Owner

Refs #262
Refs #265

Description

This is the v0.18.6 release pull request. It merges origin/main back into dev and adds the bilingual CHANGELOG.md entry plus the version bump, so the two changes that landed on dev and the four that landed on main ship together.

Release contents:

The two Refs above point to issues whose fixes ship in this release but are still waiting for the reporters to confirm on their machines, so they are intentionally not closed by this PR.

Beyond the release metadata, the diff carries the in-flight changes that dev accumulated; those were reviewed in their own pull requests, linked above.

Screenshot

Not applicable — release metadata only. The functional changes were reviewed with their own screenshots in the pull requests above.

How to Test

  • python3 script/changelog.py validate --tag v0.18.6 --changelog CHANGELOG.md passes, and script/changelog.py extract --tag v0.18.6 renders both language sections plus the CNB mirror line, which is what release.yml consumes for the GitHub Release body.
  • cargo metadata --locked resolves the bumped version (main -> 0.18.6) with an unchanged dependency graph.
  • The full CI matrix runs on this PR rather than the release fast path, because the diff also contains the functional changes carried by dev.

AI Assistance

The bilingual CHANGELOG.md entry and the version bump in this pull request were drafted by an AI assistant and reviewed by a maintainer. No functional code was generated in this pull request; the code carried along by dev was written and reviewed in the individual pull requests linked above.

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

feigeCode and others added 6 commits September 21, 2026 16:24
PG 连接的表目录写死 `c.relkind = 'r'`,外部表('f')和分区表('p')根本列不出来,
物化视图也找不到入口(视图走 `information_schema.views`,它不含物化视图)——与
Navicat 的行为不一致,用户已经建好的外部表在 Navop 里等于不存在。

- 列表:`list_tables` / `list_tables_view` 放开 relkind 到 `'r','p','f'`,按 relkind
  映射对象类型('f' → ForeignTable,'p'/'r' → Table),对象列表「类型」列分别显示
  Table / Partitioned Table / Foreign Table;新增 `list_materialized_views`(走
  `pg_class` relkind='m' + `pg_get_viewdef`),物化视图从普通视图里彻底分离。
- 树:新增 `DbNodeType::{ForeignTable, MaterializedViewsFolder, MaterializedView}`,
  外部表与普通表/分区表同处「表」目录(对齐 Navicat),物化视图单独一个目录;目录由
  `supports_materialized_views` 能力位控制,MySQL 等其它驱动不受影响。
- 动作:外部表与物化视图按 node_type 各自 scope 出菜单(Open / Rename / Truncate /
  Drop / Dump / Import / Export 等),删除与重命名按类型分派到 `drop_foreign_table`
  / `rename_foreign_table` / `drop_materialized_view`——不能把 `DROP TABLE` 打到外部表
  上。设计表 / 复制表 / 结构转储等尚无实现的动作不注册,因此不会出现点了没反应的项。
- 结构比较与结构转储:新增 `TableObjectType::ForeignTable`,`is_ddl_comparable()` 只让
  普通表参与,外部表自动从结构比较、数据比较、ER 图、整库 DDL 转储中排除(数据转储
  仍可用);`resolve_sql_dump_target` 补上新类型的映射,避免 Dump 静默报错。
- schema 限定:`rename_foreign_table` / `drop_materialized_view` 接受 schema 并生成
  schema 限定名——执行会话不会切 search_path,非 public schema 下的 DDL 原先会打错
  对象(或直接报错)。

验证:

- `cargo test -p db --lib` 1305 passed / 0 failed;`cargo test -p db_view --lib`
  703 passed / 0 failed / 1 ignored;`cargo check --workspace --all-targets` 无
  error/warning;对新增行做 clippy 比对,无新增告警。
- 新增真实库集成测试 `crates/db/tests/real_databases/postgres/foreign_matview.rs`
  (设置 `ONETCLI_TEST_POSTGRES_PASSWORD` 后才运行):在非 public schema 下真建外部表
  (postgres_fdw)、分区表与物化视图,断言列表类型、对象面板类型与树的归属,并真实
  执行 rename / drop 外部表和 drop 物化视图,最后校验 `list_views` 不混入物化视图。
  `cargo test -p db --test real_postgres` 5 passed;测试自带清理,不在库里留 schema、
  外部服务器或扩展。
- 未验证:GUI 端到端(右键菜单实际点击路径)没有真机回归,只覆盖到事件与 SQL 生成层。
feat(db): PostgreSQL 外部表与物化视图纳入树、动作与转储
issue #262:Intel Touch Bar 机型(MacBookPro16,1)上关闭内置文件编辑器弹窗
必现 SIGILL。用户崩溃报告显示致命点在 AppKit:NSWindow 销毁后
-_NSTouchBarFinderObservation invalidate 在 NSDisplayCycleFlush 里注销 KVO
观察时抛出未捕获 NSException,-[NSApplication _crashOnException:] 以 ud2
终止进程。与 Rust panic 无关(release 为 panic=abort),Apple Silicon 无
Touch Bar 故不可复现。

修复:macOS 上关闭不再销毁原生窗口,改为 orderOut: 隐藏 + 复用:
- prepare_window_close 统一收口全部关闭路径(红按钮/⌘W/保存后关闭/
  末标签关闭),隐藏成功即保留 GPUI 窗口与注册表,下次打开复用
- editor_window_visibility::hide_for_reuse 仅 macOS 实现,其余平台/失败
  回退原 remove_window 行为
- client 下沉到每个 tab(修跨会话复用会走错连接的问题);同一窗口按
  (remote_path, Arc::ptr_eq) 匹配标签
- PendingCloseAction::Tab 改用稳定 tab id;prompt 引入代际计数,旧确认
  不得作用于复用后的新会话;隐藏时 next_tab_id 不回退,杜绝旧 I/O 落到
  新标签
- apply_load/save_error 返回是否命中标签,未命中的迟到错误不再弹通知

验证:cargo test -p remote_file_editor 70 passed(新增 5 个状态级复用/
代际/跨连接用例 + 3 个源码契约测试);原生隐藏/复用仍需 Touch Bar 真机
回归(报障人协助)。
fix(editor): 关闭内置远程编辑器改为隐藏复用,规避 macOS Touch Bar 崩溃 (#262)
- CHANGELOG.md 增加 v0.18.6 双语发布说明,覆盖本版全部改动:
  - 新功能:数据库对象列表全选与拖选、PostgreSQL 外部表与物化视图
  - 修复:SQL 页签并发执行、MySQL 未知字符集兜底解码、
    SSH 目录上传受限并发、macOS 关闭内置远程编辑器不再崩溃
- main/Cargo.toml 与 Cargo.lock 的主包版本 0.18.5 -> 0.18.6
- 一并把 origin/main 合入 dev,使发布 PR 收口 v0.18.5 之后的全部改动
@feigeCode
feigeCode merged commit c6a3650 into main Sep 21, 2026
8 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.

1 participant