Feat/config export import#41
Open
KanoCifer wants to merge 11 commits into
Open
Conversation
- 改为 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>
…change-notify-runtime-channel
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 模块实现配置文件的下载与恢复。导入后自动刷新主题、快捷方式 及已保存标签页,无需重启页面。
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.
继承上一个分支同时