Repository navigation
refactor(product-split): 三产品共用全量主页 + 领域 feature 拆分与 UI 下沉 - #489
Merged
Merged
Conversation
- main/Cargo.toml 删除 6 个已无引用的 optional 领域依赖: db、ssh、sftp_view、known_hosts_view、port_forwarding、port_forwarding_view (builtin-duckdb 改由 db_view 转发) - 修 shell-only 构建下的 Redis 资源池 helper cfg、外观页误加的 cfg - 新增 script/check-product-deps.sh(本地依赖树守卫) - 新增两个 manifest 契约测试:独立产品只开自己领域 feature、 database/shell feature 互不包含对方领域依赖 - 文档补 §27(main 已无领域 use、cfg 161→57、验证与剩余项)
- main 默认 feature 追加 database/shell 后,同步 script/test-release-packaging.mjs 断言 - update/install.rs 已下沉到 crates/app_kit,修正契约脚本读取路径
- crates/core/key_storage.rs 的 keyring_services 只在 test/macOS/Windows 下引用钥匙串服务名常量,补上同样的 cfg,修 Linux 构建的 E0425 - app_kit 单实例 Windows 模块在迁移后丢了可见性:forward_attempt / create_pipe_instance / serve_forever 改 pub(super),补 ForwardAttempt import
Linux CI 用 -D warnings,keyring_services/keyring_service_for 在非 test/macOS/Windows 平台被 cfg 掉后 KeyringServices 的 installed/development 两个字段变成 never read,补 allow(dead_code)。
remote_desktop_window/mstsc_credentials_windows.rs 用 windows crate 的 Win32_Security_Credentials,迁移时漏了 Cargo 依赖,Windows CI 报 cannot find module or crate `windows`。按 main 原配置补到 shell_domain 的 windows target 依赖。
RDP probe 用 --locked 构建,lock 未记录 shell_domain → windows 0.62 这条边 会导致 cannot update the lock file because --locked was passed。
report_single_instance_failure 收 &str,app_kit 的 user_message() 返回 String,Windows CI 报 E0308 expected &str, found String。
把人工 cargo tree | grep 的验收固化成集成测试:navop-shell 的依赖树不能 出现 db_view/redis_view/mongodb_view,navop-data 不能出现 terminal_view/sftp_view/remote_desktop_view/known_hosts_view/ port_forwarding_view。feature 写漏时编译不会报错,只有依赖树能拦住。
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.
目标
把 navop 拆成三个可独立交付的产品(全量 / Shell / Data),同时保持「全量产品功能不缩水、独立产品该有的都有」:
domain_api::Product,调用navop_app::run_with(product, version)启动同一套 UI(主页、设置、标签页、凭据库、AI、Notes、Team、扩展、托盘、单实例、自动更新、Tab 恢复全部保留)。database/shell两个领域 feature,独立产品default-features = false只开自己的领域;连接类型、筛选、新建连接、设置页、已知主机/会话日志、本地终端、SFTP/RDP/端口转发等入口全部由domain_api注册表或ShellExtras/FileOpenHandler/ActiveResourceProvider契约驱动。shell_domain/data_domain承接了终端菜单、WSL、端口转发运行时、远程桌面窗口、录制文件打开、临时连接保存、侧栏配色、终端主题卡片、连接表单、设置页、领域初始化与关停等实现;main/src里已没有use 领域crate::…。验证(本地真实输出)
cargo build -p navop -p navop-shell -p navop-datacargo test -p main --libcargo test -p main --test i18n_locale_keys_contractcargo test -p app_kit -p domain_api -p shell_domain -p data_domainmainshell-only / data-onlycargo check(--no-default-features+ 单领域 feature)cargo tree -p navop-shell -e normaldb/db_view/redis_view/mongodb_viewcargo tree -p navop-data -e normalterminal_view/sftp_view/remote_desktop_view/known_hosts_view/port_forwarding_view同时新增了两条 manifest 契约测试(
native_driver_feature_contract_tests):独立产品必须只开自己的领域 feature、database/shellfeature 不许互相夹带对方依赖,随cargo test -p main --lib在 CI 里跑。已知限制
public_mcp_runtime(全量产品的 MCP 实现)仍用#[cfg(feature)]装配 data/shell 工具集,尚未并入mcp_host;这部分代码不随独立产品编译。ProductKind仍留在main/src/lib.rs(下一步移到apps/*)。workflowscope,本 PR 暂未改动.github/workflows/ci.yml;等价校验已落成上面的契约测试 +script/check-product-deps.sh。后续
合并后继续:合并两套 MCP 实现、把
ProductKind移到各 app、补 CI 依赖树 job 与安装器矩阵实跑。