Skip to content

Feat/config export import#41

Open
KanoCifer wants to merge 11 commits into
V-IOLE-T:mainfrom
KanoCifer:feat/config-export-import
Open

Feat/config export import#41
KanoCifer wants to merge 11 commits into
V-IOLE-T:mainfrom
KanoCifer:feat/config-export-import

Conversation

@KanoCifer

Copy link
Copy Markdown
Contributor

继承上一个分支同时

  • 新增导入导出配置文件
  • 可导出已保存标签页/快捷方式/偏好设置
  • 导入时覆盖已有配置

KanoCifer and others added 11 commits July 9, 2026 00:44
- 改为 chrome.runtime.sendMessage 广播,命中 dashboard 与 popup 两个
  runtime 监听。

- 测试:新增 background-notify.test.js 行为测试(广播通道、错误吞掉逻辑),
  并修正 ui-regression.test.js 对注释中残留旧 API 的假阳性断言。

- manifest.json: 版本号 1.1.1->1.1.2。
  背景广播无接收方错误消息匹配中英双语(/接收端不存在|Receiving end/i)
  真正异常添加去重保护避免刷屏(notifyTabHarborPages._lastWarn)
  ui-regression 断言收紧禁止任何形式 chrome.tabs.sendMessage
  (此前仅排除 await 前缀写法)
将 tab 变更通知从 content script 通道改为 chrome.runtime.sendMessage
广播,命中 dashboard 与 popup 的 runtime.onMessage 监听。

- 静默吞掉无接收方时的连接错误(兼容中英双语消息)
- 非连接类异常添加去重保护避免刷屏
- 新增 background-notify.test.js 行为测试
- 同步更新 ui-regression.test.js 断言,收紧 chrome.tabs.sendMessage 检查
- manifest.json 版本号 1.1.1 -> 1.1.2
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
groupMap.__landing_pages__ = undefined 在 groupMap 中残留一个
undefined 值,导致 Object.values 后 sort 比较器访问 a.domain
时抛出 TypeError。当用户打开了落地页域名根路径的标签页时触发,
表现为标签页变更后 dashboard 渲染失败。
chrome.runtime.sendMessage 在 dashboard 与 popup 都关闭时必定抛
"Receiving end does not exist",这是正常现象。原 catch 仍 console.warn
产生噪音日志。改为仅当错误非该连接错误时才告警。
新增 config-sync.js,将 themePreferences / quickShortcuts /
savedTabSessions 三类数据序列化为 JSON,支持从 JSON 文件恢复。
附带 9 个单端测试覆盖正常路径与非法输入校验。
在 Features 标签页新增 Export & import 区域,调用 config-sync
模块实现配置文件的下载与恢复。导入后自动刷新主题、快捷方式
及已保存标签页,无需重启页面。
Copilot AI review requested due to automatic review settings July 13, 2026 10:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants