Skip to content

Commit 454013a

Browse files
authored
Fix v1.5.7 installer and theme verification issues
Fixes #306, #307, #309, #312, #313, and #314.
1 parent 611c101 commit 454013a

22 files changed

Lines changed: 146 additions & 24 deletions

macos/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### 修复
6+
7+
- 修复 Codex Desktop 26.721.x 首页在 `home-icon` 延迟渲染时被误判为注入校验失败的问题(#306)。校验现在复用已由首页内容信号解析出的 `[role="main"]` 容器;严格的 `home-icon` 路径仍优先,旧版行为不变。
8+
- 修复显式浅色、宽幅 artwork 的 `taskMode: "full"` 任务页 Markdown 继承原生深色壳白色前景的问题(#309)。完整模式现与 ambient/banner 一样强制使用主题文本色,并保留浅色壳对比阴影。
9+
- 修复社区主题 ZIP 导入拒绝 `backdrop-filter: blur(var(--ds-theme-surface-blur))` 的问题(#312)。Safe CSS 仍只允许 `none`、0-20px blur 或注册的主题 blur 变量,不放宽到任意 filter 函数。
10+
311
## 1.5.6 — 2026-07-26
412

513
### 安全

macos/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.6
1+
1.5.7

macos/assets/dream-skin.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,15 +444,15 @@ html[data-dream-skin="active"]:is([data-dream-task-mode="ambient"], [data-dream-
444444
backdrop-filter: none !important;
445445
}
446446

447-
html[data-dream-skin="active"]:is([data-dream-task-mode="ambient"], [data-dream-art-task-mode="ambient"], [data-dream-task-mode="banner"], [data-dream-art-task-mode="banner"])[data-dream-art-wide="true"]
447+
html[data-dream-skin="active"]:is([data-dream-task-mode="ambient"], [data-dream-art-task-mode="ambient"], [data-dream-task-mode="banner"], [data-dream-art-task-mode="banner"], [data-dream-task-mode="full"], [data-dream-art-task-mode="full"])[data-dream-art-wide="true"]
448448
main.main-surface:not(:has([role="main"])) [class*="_markdown"] {
449449
color: var(--ds-text) !important;
450450
text-shadow:
451451
0 1px 2px rgb(var(--ds-bg-rgb) / .82),
452452
0 0 10px rgb(var(--ds-bg-rgb) / .58);
453453
}
454454

455-
html[data-dream-skin="active"][data-dream-shell="light"]:is([data-dream-task-mode="ambient"], [data-dream-art-task-mode="ambient"], [data-dream-task-mode="banner"], [data-dream-art-task-mode="banner"])[data-dream-art-wide="true"]
455+
html[data-dream-skin="active"][data-dream-shell="light"]:is([data-dream-task-mode="ambient"], [data-dream-art-task-mode="ambient"], [data-dream-task-mode="banner"], [data-dream-art-task-mode="banner"], [data-dream-task-mode="full"], [data-dream-art-task-mode="full"])[data-dream-art-wide="true"]
456456
main.main-surface:not(:has([role="main"])) [class*="_markdown"] {
457457
text-shadow:
458458
0 1px 2px rgb(var(--ds-panel-rgb) / .92),

macos/assets/safe-css-validator.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function validatePropertyValue(property, value) {
278278
}
279279
if (property === "backdrop-filter") {
280280
if (value.toLowerCase() === "none") return true;
281-
const match = value.match(/^blur\(\s*([^\s)]+)\s*\)$/i);
281+
const match = value.match(/^blur\(\s*(.+?)\s*\)$/i);
282282
return Boolean(match && (
283283
registeredVar(match[1], new Set(["--ds-theme-surface-blur"]))
284284
|| zeroOrPx(match[1], 0, 20)

macos/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codex-dream-skin-studio",
3-
"version": "1.5.6",
3+
"version": "1.5.7",
44
"private": true,
55
"type": "module",
66
"scripts": {

macos/scripts/common-macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CODEX_APP_JOB_LABEL="com.openai.codex-dream-skin-studio.app"
2929
INJECTOR_JOB_LABEL="com.openai.codex-dream-skin-studio.injector"
3030
EXPECTED_CODEX_TEAM_ID="2DC432GLL2"
3131
EXPECTED_CODEX_REQUIREMENT="anchor apple generic and certificate leaf[subject.OU] = \"$EXPECTED_CODEX_TEAM_ID\""
32-
SKIN_VERSION="1.5.6"
32+
SKIN_VERSION="1.5.7"
3333
DREAM_SKIN_VALIDATED_RUNTIME_PID=""
3434
DREAM_SKIN_VALIDATED_RUNTIME_BUNDLE=""
3535
DREAM_SKIN_VALIDATED_RUNTIME_EXE=""

macos/scripts/injector.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const stableTestidLiteral = (testid) => {
4343
}
4444
return JSON.stringify(`[data-testid="${testid}"]`);
4545
};
46-
const SKIN_VERSION = "1.5.6";
46+
const SKIN_VERSION = "1.5.7";
4747
const LOOPBACK_HOSTS = new Set(["127.0.0.1", "localhost", "[::1]"]);
4848
const CDP_ID_PATTERN = /^[A-Za-z0-9._-]{1,200}$/;
4949
const MAX_ART_BYTES = 10 * 1024 * 1024;
@@ -1086,7 +1086,10 @@ async function verifySession(session, expectedThemeId = null, expectedRevision =
10861086
const homeSignal = homeIndicator ?? document.querySelector(${selectorLiteral("game-source")}) ??
10871087
document.querySelector(${selectorLiteral("home-suggestions")});
10881088
const homeRoute = homeSignal?.closest('[role="main"]') ?? null;
1089-
const home = document.querySelector(${selectorLiteral("home-route")});
1089+
// Codex 26.721.x can render the home content before home-icon. Reuse the
1090+
// already-resolved semantic home container so a healthy home session is
1091+
// not rejected solely because the stricter home-icon selector is late.
1092+
const home = document.querySelector(${selectorLiteral("home-route")}) ?? homeRoute;
10901093
const suggestions = home?.querySelector(${selectorLiteral("home-suggestions")}) ?? null;
10911094
const cardButtons = suggestions ? [...suggestions.querySelectorAll('button')] : [];
10921095
const cardBoxes = cardButtons.map(box);

macos/tests/run-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ UPDATE_JSON="$({
8686
})"
8787
"$NODE" -e '
8888
const value = JSON.parse(process.argv[1]);
89-
if (value.currentVersion !== "v1.5.6" || value.latestVersion !== "v9.8.7") process.exit(1);
89+
if (value.currentVersion !== "v1.5.7" || value.latestVersion !== "v9.8.7") process.exit(1);
9090
if (!value.updateAvailable) process.exit(1);
9191
if (value.releaseUrl !== "https://github.com/Fei-Away/Codex-Dream-Skin/releases/latest") process.exit(1);
9292
' "$UPDATE_JSON"
@@ -1071,7 +1071,7 @@ CRLF_BACKUP="$TMP/config-crlf-backup.json"
10711071
"$NODE" "$ROOT/scripts/theme-config.mjs" restore "$CRLF_CONFIG" "$CRLF_BACKUP" >/dev/null
10721072
/usr/bin/cmp -s "$CRLF_CONFIG" "$TMP/original-crlf.toml"
10731073

1074-
/usr/bin/env -u HOME /bin/bash -c '. "$1/scripts/common-macos.sh"; [ -n "$HOME" ] && [ "$SKIN_VERSION" = "1.5.6" ]' _ "$ROOT"
1074+
/usr/bin/env -u HOME /bin/bash -c '. "$1/scripts/common-macos.sh"; [ -n "$HOME" ] && [ "$SKIN_VERSION" = "1.5.7" ]' _ "$ROOT"
10751075
if [ "${CODEX_DREAM_SKIN_SKIP_DOCTOR:-0}" = "1" ]; then
10761076
printf 'SKIP: Doctor requires an installed, signed Codex app.\n'
10771077
DOCTOR_RESULT="skipped"

macos/tests/runtime-css-nested-has.test.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,18 @@ for (const file of files) {
4545
const findings = findNestedHas(css);
4646
assert.deepEqual(findings, [], `nested :has() found in ${file}`);
4747
});
48+
49+
test(`wide full-mode Markdown retains themed light text in ${file}`, () => {
50+
const css = readFileSync(join(root, file), "utf8");
51+
const selectorToken = file.startsWith("runtime/")
52+
? "__DREAM_SELECTOR_SHELL_MAIN__:not\\(:has\\(__DREAM_SELECTOR_HOME_ROUTE_CSS__\\)\\) __DREAM_SELECTOR_MARKDOWN__"
53+
: "main\\.main-surface:not\\(:has\\(\\[role=\"main\"\\]\\)\\) \\[class\\*=\"_markdown\"\\]";
54+
const fullMode = ':is\\([^)]*\\[data-dream-task-mode="full"\\][^)]*\\[data-dream-art-task-mode="full"\\][^)]*\\)\\[data-dream-art-wide="true"\\]';
55+
const markdownRule = new RegExp(`${fullMode}\\s*\\n?\\s*${selectorToken}\\s*\\{\\s*\\n?\\s*color:\\s*var\\(--ds-text\\)\\s*!important;`);
56+
const lightShadowRule = new RegExp(`\\[data-dream-shell="light"\\]${fullMode}\\s*\\n?\\s*${selectorToken}\\s*\\{\\s*\\n?\\s*text-shadow:`);
57+
assert.match(css, markdownRule,
58+
"Full task mode must override native dark-shell Markdown foreground (#309).");
59+
assert.match(css, lightShadowRule,
60+
"Full task mode must retain the light-shell Markdown contrast shadow (#309).");
61+
});
4862
}

macos/tests/safe-css-validator.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test("accepts only the bounded public part/property/value contract", () => {
5050
border-style: solid;
5151
border-radius: 12px;
5252
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
53-
backdrop-filter: blur(18px);
53+
backdrop-filter: blur(var(--ds-theme-surface-blur));
5454
transition-property: background-color, border-color, box-shadow;
5555
transition-duration: 180ms;
5656
}

0 commit comments

Comments
 (0)