Repository navigation
feat(peer): 保存并切换多个命名连接 - #167
Merged
Merged
Conversation
This was referenced Oct 25, 2026
- 持久化连接列表与当前选择,切换时保留各连接身份 - 更新完整备份和连接相关状态清理 - 验证重载、失败不覆盖及扩展跨页面同步
xiaoland
marked this pull request as ready for review
October 26, 2026 06:18
xiaoland
force-pushed
the
feat/peer-saved-connections
branch
from
October 26, 2026 06:19
53eb041 to
e3de182
Compare
This branch was successfully deployed
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.
目的与范围
Web 与浏览器扩展原先只保留一组连接配置,切换信息库需要覆盖地址和凭据。本次增加本地命名连接列表与当前选择,重新打开后恢复上次使用的连接。
验证证据
e4f75a6的独立工作树完成pnpm install --frozen-lockfile与完整pnpm check,格式、lint、类型、构建及包合同均通过。node --test scripts/tests/saved-connections.test.mjs:1 项通过,覆盖 A/B/A 身份保持、重新加载、连接/保存失败不提交,以及导入恢复。使用内存存储和隔离候选运行时,证明持久化边界,不代替数据库端到端。pnpm exec playwright test --project browser-extension:2 项通过,包括真实 Chromium 扩展内的旧地址保留、多连接保存、重新打开及跨选项页切换。0daff89,无冲突;pnpm check和连接持久化行为检查再次通过。当前 heade3de182的 Workspace contract、真实数据库 client-web E2E、client-webext E2E 及预览均通过。此前已用 built Web preview 和本机合成 PostgREST fixture 实测添加两项、A/B/A、刷新恢复、失败保留当前选择及完整列表导入/导出。该证据不代表真实多库验收;真实数据库 Web E2E 由 PR CI 执行,本地本轮未重跑。
交付影响
为
@inkcre/core、@inkcre/client-web、@inkcre/client-webext记录 patch changeset。合并会触发现有 main 的 Web Pages 交付与发布计划核对;软件包版本仍由既有 release 流程管理。本次没有数据库迁移或凭据轮换。同一用户需求的 Mac 实现在既有 draft PR:InKCre/impl-swift#2。两端独立保存,不存在跨仓合并顺序依赖。
配套 用户手册与产品约定 docs#43 说明 Web、Mac、扩展和 CLI 的保存/切换操作及备份、任务目标边界。多连接推荐按运行形态提供,通常适用于直接与用户交互的 Peer;固定服务一个信息库的 impl-py 服务器可继续使用单一部署配置。手册操作页随对应功能交付,不提前发布。
依赖关系
风险与回退
主要风险是切换后状态或身份仍属于旧连接,以及备份内容误被当作不含凭据的普通文件。连接身份、列表与选择一起持久化;失败保留已保存选择,备份继续按敏感配置管理。
可以回退此提交恢复原单连接界面;存储中的扁平活动配置保留供旧版本读取。回退前应导出多连接备份,避免旧版重新保存配置时丢失其他条目。浏览器扩展的旧
inkcreApi值仍保留,但回退前需记录当前选中地址并在旧版重新配置。