feat(web): include appearance in data bundles#75
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86501003a2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| localStorage.setItem(GTD_ENABLED_STORAGE_KEY, String(v)) | ||
| if (typeof window !== 'undefined') { | ||
| window.dispatchEvent(new CustomEvent(GTD_ENABLED_CHANGED_EVENT, { detail: v })) |
There was a problem hiding this comment.
Emit GTD change event even when storage write fails
When localStorage.setItem throws (e.g., quota exceeded or storage temporarily unavailable), writeGtdEnabled now swallows the error and skips dispatching arkloop:gtd-enabled-changed. In that case, components relying on subscribeGtdEnabled (like Sidebar) do not observe the toggle even though the settings UI already updated its local state, so grouping becomes inconsistent within the same tab. Previously this path still broadcasted the change from the click handler.
Useful? React with 👍 / 👎.
qqqqqf-q
left a comment
There was a problem hiding this comment.
LGTM. normalizeThemeBackgroundImage 校验逻辑严谨,导入原子性正确(校验失败不写入部分状态)。subscribeGtdEnabled 集中化是合理改进。
Split from #63.
内容:
说明:
验证: