Skip to content

Commit 9130eb1

Browse files
committed
fix(windows): harden task-page text and lighten message wash
Force theme text over native text-token purple on task routes, add light message panels for contrast, and soften task immersive edge/mid/far so the wallpaper stays visible without fogging body copy.
1 parent 4829509 commit 9130eb1

3 files changed

Lines changed: 79 additions & 11 deletions

File tree

windows/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### 修复
66

77
- Windows 渲染层现在会读取并应用主题 `colors` 色板(与 macOS 一致),不再只认 `palette.accent`;Gothic 等显式色板预设不会在浅色壳下退回默认灰白结构色。
8+
- 任务页强制主题字色压过原生 `text-token` 紫字,消息气泡补半透明面板,并减轻任务区横向遮罩,避免「背后清晰、正文雾紫不可读」。
89
- 收起或重建左侧栏时不再因找不到 `aside.app-shell-left-panel` 而整页卸掉皮肤;只要主内容壳层仍在就继续应用当前主题,避免闪回 Codex 原生配色。透明辅助窗口仍会清理残留样式。
910
- 托盘「暂停皮肤」现在与 macOS 一致:写入暂停标记后立刻通过 CDP 执行 `injector --remove` 卸下当前窗口皮肤,不再只等 watcher 轮询;「继续显示皮肤」会清除暂停并重新应用。
1011
- Windows 注入器补齐与 macOS 相同的窗口内操作浮层(loading / 成功 / 失败);暂停、继续与重新应用时在 Codex 主区显示「正在暂停皮肤…」「正在应用皮肤…」等进度,不再只有托盘气泡。

windows/assets/dream-skin.css

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
--dream-task-immersive-sidebar: color-mix(in oklab, var(--dream-sidebar) 72%, transparent);
2424
--dream-immersive-composer: color-mix(in oklab, var(--dream-surface-raised) 76%, var(--dream-accent) 4%);
2525
--dream-immersive-line: color-mix(in oklab, var(--dream-line) 76%, transparent);
26-
--dream-task-immersive-edge: color-mix(in oklab, var(--dream-surface) 86%, transparent);
27-
--dream-task-immersive-mid: color-mix(in oklab, var(--dream-surface) 78%, transparent);
28-
--dream-task-immersive-far: color-mix(in oklab, var(--dream-surface) 66%, transparent);
26+
/* Lighter task wash so the wallpaper stays visible and text is not under a heavy fog. */
27+
--dream-task-immersive-edge: color-mix(in oklab, var(--dream-surface) 62%, transparent);
28+
--dream-task-immersive-mid: color-mix(in oklab, var(--dream-surface) 40%, transparent);
29+
--dream-task-immersive-far: color-mix(in oklab, var(--dream-surface) 22%, transparent);
2930
}
3031

3132
:root.codex-dream-skin.dream-theme-dark {
@@ -50,9 +51,9 @@
5051
--dream-task-immersive-sidebar: color-mix(in oklab, var(--dream-sidebar) 70%, transparent);
5152
--dream-immersive-composer: color-mix(in oklab, var(--dream-surface-raised) 88%, var(--dream-accent) 5%);
5253
--dream-immersive-line: color-mix(in oklab, var(--dream-line) 82%, transparent);
53-
--dream-task-immersive-edge: color-mix(in oklab, var(--dream-surface) 82%, transparent);
54-
--dream-task-immersive-mid: color-mix(in oklab, var(--dream-surface) 74%, transparent);
55-
--dream-task-immersive-far: color-mix(in oklab, var(--dream-surface) 60%, transparent);
54+
--dream-task-immersive-edge: color-mix(in oklab, var(--dream-surface) 58%, transparent);
55+
--dream-task-immersive-mid: color-mix(in oklab, var(--dream-surface) 36%, transparent);
56+
--dream-task-immersive-far: color-mix(in oklab, var(--dream-surface) 18%, transparent);
5657
}
5758

5859
html.codex-dream-skin body {
@@ -134,7 +135,7 @@ html.codex-dream-skin.dream-theme-dark [class~="group/application-menu-top-bar"]
134135
}
135136

136137
html.codex-dream-skin [role="main"] {
137-
color: var(--dream-text);
138+
color: var(--dream-text) !important;
138139
}
139140

140141
/* Task routes use the art as a quiet atmospheric layer. Wide banners are shown
@@ -143,6 +144,7 @@ html.codex-dream-skin .dream-task {
143144
position: relative;
144145
isolation: isolate;
145146
min-height: 100%;
147+
color: var(--dream-text) !important;
146148
background: var(--dream-surface) !important;
147149
}
148150

@@ -187,9 +189,70 @@ html.codex-dream-skin .dream-task > * {
187189
z-index: 1;
188190
}
189191

192+
/* Task message readability — force theme text over native purple/light tokens
193+
and give bubbles a light panel so copy is not painted directly on the wash. */
190194
html.codex-dream-skin .dream-task article,
191-
html.codex-dream-skin .dream-task [data-message-author-role] {
192-
color: var(--dream-text);
195+
html.codex-dream-skin .dream-task [data-message-author-role],
196+
html.codex-dream-skin [data-message-author-role],
197+
html.codex-dream-skin article {
198+
color: var(--dream-text) !important;
199+
}
200+
201+
html.codex-dream-skin .dream-task article,
202+
html.codex-dream-skin .dream-task [data-message-author-role],
203+
html.codex-dream-skin.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
204+
main.main-surface:not(.dream-home-shell) article,
205+
html.codex-dream-skin.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
206+
main.main-surface:not(.dream-home-shell) [data-message-author-role] {
207+
border: 1px solid color-mix(in oklab, var(--dream-line) 42%, transparent);
208+
border-radius: 16px;
209+
background: color-mix(in oklab, var(--dream-surface) 54%, transparent) !important;
210+
box-shadow: 0 8px 24px color-mix(in oklab, var(--dream-canvas) 12%, transparent);
211+
backdrop-filter: blur(8px) saturate(1.04);
212+
}
213+
214+
html.codex-dream-skin.dream-theme-light .dream-task article,
215+
html.codex-dream-skin.dream-theme-light .dream-task [data-message-author-role],
216+
html.codex-dream-skin.dream-theme-light.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
217+
main.main-surface:not(.dream-home-shell) article,
218+
html.codex-dream-skin.dream-theme-light.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
219+
main.main-surface:not(.dream-home-shell) [data-message-author-role] {
220+
background: color-mix(in oklab, var(--dream-surface) 78%, transparent) !important;
221+
}
222+
223+
html.codex-dream-skin .dream-task [class*="text-token"],
224+
html.codex-dream-skin.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
225+
main.main-surface:not(.dream-home-shell) [class*="text-token"],
226+
html.codex-dream-skin.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
227+
main.main-surface:not(.dream-home-shell) [class*="_markdown"] {
228+
color: inherit !important;
229+
}
230+
231+
html.codex-dream-skin .dream-task [class*="text-token-text-secondary"],
232+
html.codex-dream-skin .dream-task [class*="text-token-text-tertiary"],
233+
html.codex-dream-skin .dream-task [class*="text-token-text-secondary"] *,
234+
html.codex-dream-skin .dream-task [class*="text-token-text-tertiary"] *,
235+
html.codex-dream-skin.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
236+
main.main-surface:not(.dream-home-shell) [class*="text-token-text-secondary"],
237+
html.codex-dream-skin.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
238+
main.main-surface:not(.dream-home-shell) [class*="text-token-text-tertiary"] {
239+
color: var(--dream-text-muted) !important;
240+
}
241+
242+
html.codex-dream-skin.dream-theme-dark.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
243+
main.main-surface:not(.dream-home-shell) [role="main"],
244+
html.codex-dream-skin.dream-theme-dark.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
245+
main.main-surface:not(.dream-home-shell) [class*="_markdown"] {
246+
text-shadow:
247+
0 1px 2px color-mix(in oklab, var(--dream-canvas) 70%, transparent),
248+
0 0 10px color-mix(in oklab, var(--dream-canvas) 40%, transparent);
249+
}
250+
251+
html.codex-dream-skin.dream-theme-light.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
252+
main.main-surface:not(.dream-home-shell) [role="main"],
253+
html.codex-dream-skin.dream-theme-light.dream-art-wide:is(.dream-task-ambient, .dream-task-banner)
254+
main.main-surface:not(.dream-home-shell) [class*="_markdown"] {
255+
text-shadow: none;
193256
}
194257

195258
/* The home route keeps the source image expressive, with a semantic safe-area
@@ -387,7 +450,7 @@ html.codex-dream-skin button[class~="bg-token-foreground"] {
387450

388451
html.codex-dream-skin [data-message-author-role],
389452
html.codex-dream-skin article {
390-
color: var(--dream-text);
453+
color: var(--dream-text) !important;
391454
}
392455

393456
/* A 16:9 or wider image is painted once on the native window. The sidebar,
@@ -471,6 +534,7 @@ html.codex-dream-skin.dream-art-wide main.main-surface > header.app-header-tint
471534

472535
html.codex-dream-skin.dream-art-wide main.main-surface [role="main"] {
473536
background: transparent !important;
537+
color: var(--dream-text) !important;
474538
}
475539

476540
html.codex-dream-skin.dream-art-wide main.main-surface.dream-home-shell

windows/tests/run-tests.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,10 @@ try {
756756
'background-position: var(--dream-art-position)',
757757
'.dream-home-utility',
758758
':has(.dream-home-utility) .composer-surface-chrome',
759-
':is(.dream-task-ambient, .dream-task-banner):has(main.main-surface:not(.dream-home-shell))'
759+
':is(.dream-task-ambient, .dream-task-banner):has(main.main-surface:not(.dream-home-shell))',
760+
'color: var(--dream-text) !important',
761+
'[class*="text-token"]',
762+
'background: color-mix(in oklab, var(--dream-surface) 54%, transparent) !important'
760763
)) {
761764
if (-not $css.Contains($requiredCss)) { throw "Windows immersive CSS is missing: $requiredCss" }
762765
}

0 commit comments

Comments
 (0)