feat(windows): verified tray theme switching with rollback - #292
Open
starsstreaming wants to merge 3 commits into
Open
feat(windows): verified tray theme switching with rollback#292starsstreaming wants to merge 3 commits into
starsstreaming wants to merge 3 commits into
Conversation
Support optional theme.json video fields, loopback media serving, menu/tray import, poster fallback, and renderer handoff on both platforms. Closes Fei-Away#240.
Write .theme-update-in-progress only around the final image/video/json/css commit so the watcher cannot load a mixed stamp, then clear it on success. Stale markers expire so a crashed writer cannot freeze theme loads forever.
Snapshot the active theme before image, video, or saved-theme tray switches; confirm on a real Codex window; restore the previous theme when verification fails. Move snapshot helpers into theme-windows and rename the serialized tray helper parameter to Operation so nested verified actions cannot recurse into themselves.
This was referenced Jul 27, 2026
Author
19 tasks
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.
Summary / 摘要
Stacked on the atomic-write PR (and transitively #290).
Windows tray image / video / saved-theme switches now run as snapshot → write → real-window verify → rollback on failure. Snapshot helpers live in
theme-windows.ps1(shared with community apply). The serialized tray helper parameter is renamed to$Operationso nested verified actions cannot recurse into themselves via$Actionshadowing.叠在原子写入 PR(及 #290)之上。托盘更换背景图、视频与已保存主题改为「快照 → 写入 → 真实窗口校验 → 失败回滚」;快照助手下沉到
theme-windows.ps1;序列化参数改为$Operation,避免嵌套 scriptblock 自调用。Depends on / 依赖: atomic-theme-writes PR + #290. Review base:
starsstreaming:feat/atomic-theme-writes.Type / 类型
Platform / 平台
Self-check / 自测
Windows
windows/tests/run-tests.ps1— exit 0node --test windows/tests/injector-bootstrap.test.mjs— passUser-facing
windows/CHANGELOG.mdunder## 未发布(no VERSION bump)Security / 安全
127.0.0.1)Notes / 补充
Behavior
Invoke-DreamSkinVerifiedThemeOperationwraps image, video, and saved-theme tray actions (3 call sites)VideoPath; restore re-entersSet-DreamSkinActiveThemevalidationInvoke-DreamSkinTrayThemeOperation -Operation(not-Action) — fixes nested scriptblock recursionChecks
windows/tests/run-tests.ps1exit 0 (includes video snapshot/restore + marker leftover checks)Stack
Environment
starsstreaming:feat/verified-theme-rollback@a090577