Skip to content

Commit 571c861

Browse files
release v0.1.1 with background fix
1 parent f562240 commit 571c861

7 files changed

Lines changed: 30 additions & 22 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ beautiCode 可以让你:
7373
> 不是逃离工作,而是给漫长的工作过程,留一点属于自己的空间。
7474
<img width="1920" height="1240" alt="QQ20260729-212506-HD" src="https://github.com/user-attachments/assets/ca0ef07f-2aec-46b0-b996-1db9913efa6d" />
7575
76-
### v0.1 安装包
76+
### v0.1.1 安装包
7777

78-
想直接使用 beautiCode,可以下载 [Windows 安装包](https://github.com/starsstreaming/beautiCode/releases/tag/v0.1)
78+
想直接使用 beautiCode,可以下载 [Windows 安装包](https://github.com/starsstreaming/beautiCode/releases/tag/v0.1.1)
7979
安装包自带运行时,不需要另外安装 Node.js 或 npm;使用前请先安装 Codex Desktop。
8080

8181

@@ -163,7 +163,7 @@ Ctrl + Shift + Space
163163
运行:
164164

165165
```text
166-
beautiCode-Setup-0.1.0-win-x64.exe
166+
beautiCode-Setup-0.1.1-win-x64.exe
167167
```
168168

169169
安装包自带 Node.js 运行时。使用者不需要安装 Node.js、npm,也不需要保留

installer/windows/beauticode.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define MyAppPublisher "beautiCode"
55

66
#ifndef MyAppVersion
7-
#define MyAppVersion "0.1.0"
7+
#define MyAppVersion "0.1.1"
88
#endif
99

1010
#ifndef StageDir

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "beauticode",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"private": true,
55
"type": "module",
66
"description": "Local image/video backgrounds for supported coding hosts. Unofficial.",

packages/adapter-codex/src/renderer/background-runtime.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,23 +372,23 @@
372372
'[data-testid*="conversation"]',
373373
'[data-testid*="thread"]',
374374
'[data-testid*="turn"]',
375-
'main.main-surface [data-message-id]',
375+
'body > #root main [data-message-id]',
376376
].join(", "),
377377
);
378378
if (thread && isVisibleEl(thread)) return true;
379379

380380
// Open task header: folder glyph + title in the main app header
381381
// (matches the project task chrome in Codex Desktop).
382382
const header = document.querySelector(
383-
"main.main-surface header.app-header-tint, main.main-surface header",
383+
"body > #root main header.app-header-tint, body > #root main header",
384384
);
385385
if (header && isVisibleEl(header)) {
386386
const headerText = (header.textContent || "").replace(/\s+/g, " ").trim();
387387
// Home header is short / generic; task headers carry the task title.
388388
if (headerText.length >= 2 && !/^(codex|chatgpt|home|)?$/i.test(headerText)) {
389389
// Require composer or main role so empty shells do not false-dim.
390390
const workSurface = document.querySelector(
391-
"main.main-surface .composer-surface-chrome, main.main-surface [role='main'], main.main-surface .thread-scroll-container",
391+
"body > #root main .composer-surface-chrome, body > #root main [role='main'], body > #root main .thread-scroll-container",
392392
);
393393
if (workSurface && isVisibleEl(workSurface)) return true;
394394
}

packages/adapter-codex/src/renderer/background.css

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ html[data-bc-active="true"][data-bc-media="video-pending"]
197197
- Video keeps playing under both columns.
198198
Implementation: do NOT retouch #beauticode-bg-stage::before or media
199199
filters on working — those are full-window and would shift the left.
200-
Dim only via main.main-surface wash. */
200+
Dim only via the primary main surface wash. */
201201

202202
/* ---- Left sidebar: translucent so art shows ---- */
203203
html[data-bc-active="true"] aside.app-shell-left-panel {
@@ -221,8 +221,9 @@ html[data-bc-active="true"] aside.app-shell-left-panel nav {
221221
}
222222

223223
/* ---- Main surface ---- */
224-
html[data-bc-active="true"] main.main-surface {
224+
html[data-bc-active="true"] body > #root main {
225225
position: relative !important;
226+
background-color: transparent !important;
226227
background: linear-gradient(
227228
90deg,
228229
var(--bc-main-edge),
@@ -236,43 +237,43 @@ html[data-bc-active="true"] main.main-surface {
236237

237238
/* Task page: ONLY the right column. Stage veil + left aside stay as home
238239
so home ↔ project transition is seamless on the sidebar. */
239-
html[data-bc-active="true"][data-bc-working="true"] main.main-surface {
240+
html[data-bc-active="true"][data-bc-working="true"] body > #root main {
240241
/* Tiny step darker — keep translucent so thread text stays readable. */
241242
background: var(--bc-working-main) !important;
242243
transition: background 240ms ease;
243244
}
244245

245246
/* No secondary art painted on main — stage owns the picture. */
246-
html[data-bc-active="true"] main.main-surface::before,
247-
html[data-bc-active="true"] main.main-surface::after {
247+
html[data-bc-active="true"] body > #root main::before,
248+
html[data-bc-active="true"] body > #root main::after {
248249
content: none !important;
249250
background-image: none !important;
250251
background: transparent !important;
251252
}
252253

253-
html[data-bc-active="true"] main.main-surface > header.app-header-tint {
254+
html[data-bc-active="true"] body > #root main > header.app-header-tint {
254255
background: transparent !important;
255256
border-bottom: 0 !important;
256257
box-shadow: none !important;
257258
backdrop-filter: none !important;
258259
}
259260

260261
/* Main content frame / scroll fades that paint opaque tokens. */
261-
html[data-bc-active="true"] main.main-surface .app-shell-main-content-frame,
262-
html[data-bc-active="true"] main.main-surface .app-shell-main-content-top-fade {
262+
html[data-bc-active="true"] body > #root main .app-shell-main-content-frame,
263+
html[data-bc-active="true"] body > #root main .app-shell-main-content-top-fade {
263264
background: transparent !important;
264265
background-image: none !important;
265266
}
266267

267-
html[data-bc-active="true"] main.main-surface
268+
html[data-bc-active="true"] body > #root main
268269
.thread-scroll-container
269270
.bg-gradient-to-t.from-token-main-surface-primary {
270271
background-image: none !important;
271272
background: transparent !important;
272273
}
273274

274275
/* Home hero card chrome — keep interactive, drop solid fill. */
275-
html[data-bc-active="true"] main.main-surface
276+
html[data-bc-active="true"] body > #root main
276277
[role="main"]:has([data-testid="home-icon"])
277278
> div:first-child
278279
> div:first-child
@@ -284,7 +285,7 @@ html[data-bc-active="true"] main.main-surface
284285
box-shadow: none !important;
285286
}
286287

287-
html[data-bc-active="true"] main.main-surface
288+
html[data-bc-active="true"] body > #root main
288289
[role="main"]:has([data-testid="home-icon"])
289290
> div:first-child
290291
> div:first-child
@@ -293,7 +294,7 @@ html[data-bc-active="true"] main.main-surface
293294
}
294295

295296
/* role=main region itself */
296-
html[data-bc-active="true"] main.main-surface [role="main"] {
297+
html[data-bc-active="true"] body > #root main [role="main"] {
297298
background: transparent !important;
298299
}
299300

packages/adapter-codex/test/adapter.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,13 @@ test("fish mode CSS and runtime expose data-bc-fish helpers", async () => {
725725
assert.match(runtime, /applyMutePreference/);
726726
assert.match(css, /data-bc-tone/);
727727
assert.match(css, /prefers-color-scheme: light/);
728+
// Codex's main-surface class is CSS-module hashed and changes between builds.
729+
assert.match(css, /body > #root main/);
730+
assert.match(
731+
css,
732+
/body > #root main \{\s*position:\s*relative !important;\s*background-color:\s*transparent !important;/,
733+
);
734+
assert.doesNotMatch(css, /main\.main-surface/);
728735
assert.match(runtime, /setBackgroundTone/);
729736
assert.match(runtime, /data-bc-tone/);
730737
assert.match(runtime, /getPlaybackPosition/);

0 commit comments

Comments
 (0)