Skip to content

Commit 9c44807

Browse files
authored
Fix current DMG optional core patch drift (#985)
Retarget optional core patch descriptors to the current upstream webview chunk split and update coverage for the latest CODEX.DMG.
1 parent 29c76a5 commit 9c44807

5 files changed

Lines changed: 40 additions & 5 deletions

File tree

scripts/patch-linux-window-ui.test.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,41 @@ test("window controls safe-area descriptor matches current app shell chunks", ()
11151115
);
11161116
});
11171117

1118+
test("optional webview descriptors follow the current upstream chunk split", () => {
1119+
const descriptors = corePatchDescriptors();
1120+
const automationUpdate = descriptors.find(
1121+
(descriptor) => descriptor.id === "automation-update-eager-tool",
1122+
);
1123+
const tooltipCollision = descriptors.find(
1124+
(descriptor) => descriptor.id === "linux-tooltip-window-controls-collision",
1125+
);
1126+
1127+
assert.ok(automationUpdate);
1128+
assert.equal(
1129+
automationUpdate.pattern.test("app-initial~app-main~onboarding-page-CIkoyvFz.js"),
1130+
true,
1131+
);
1132+
assert.equal(
1133+
automationUpdate.pattern.test(
1134+
"app-initial~app-main~onboarding-page~hotkey-window-thread-page~quick-chat-window-page~chatg~legacy.js",
1135+
),
1136+
false,
1137+
);
1138+
assert.ok(tooltipCollision);
1139+
assert.equal(
1140+
tooltipCollision.pattern.test(
1141+
"app-initial~app-main~hotkey-window-new-thread-page~hotkey-window-home-page~composer-utility-bar-D9zyQF1n.js",
1142+
),
1143+
true,
1144+
);
1145+
assert.equal(
1146+
tooltipCollision.pattern.test(
1147+
"app-initial~app-main~onboarding-page~hotkey-window-thread-page~quick-chat-window-page~chatg~legacy.js",
1148+
),
1149+
false,
1150+
);
1151+
});
1152+
11181153
test("patch descriptors reject unsupported ciPolicy values", () => {
11191154
assert.throws(
11201155
() =>

scripts/patches/core/all-linux/extracted-app/workspace-root-open-targets/patch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ function patchWorkspaceRootOpenTargets(extractedDir) {
303303
let changed = 0;
304304

305305
for (const name of fs.readdirSync(assetsDir)) {
306-
if (!/^app-initial~app-main~projects-index-page~remote-conversation-page-[^.]+\.js$/u.test(name)) {
306+
if (!/^app-initial~app-main~page-[^.]+\.js$/u.test(name)) {
307307
continue;
308308
}
309309
const filePath = path.join(assetsDir, name);

scripts/patches/core/all-linux/webview/automation-update-eager-tool/patch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = [
1313
phase: "webview-asset",
1414
order: 1045,
1515
ciPolicy: "optional",
16-
pattern: /^app-initial~app-main~onboarding-page~hotkey-window-thread-page~quick-chat-window-page~chatg~[^.]+\.js$/,
16+
pattern: /^app-initial~app-main~onboarding-page-[^.]+\.js$/,
1717
missingDescription: "dynamic Codex app tools bundle",
1818
skipDescription: "automation_update eager dynamic tool patch",
1919
apply: applyAutomationUpdateEagerToolPatch,

scripts/patches/core/all-linux/webview/theme-and-sunset/patch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = [
5757
phase: "webview-asset",
5858
order: 1050,
5959
ciPolicy: "optional",
60-
pattern: /^app-initial~app-main~onboarding-page~hotkey-window-thread-page~quick-chat-window-page~chatg~[^.]+\.js$/,
60+
pattern: /^app-initial~app-main~hotkey-window-new-thread-page~hotkey-window-home-page~composer-utility-bar-[^.]+\.js$/,
6161
missingDescription: "tooltip bundle",
6262
skipDescription: "Linux tooltip titlebar collision patch",
6363
apply: applyLinuxTooltipWindowControlsCollisionPatch,

scripts/workspace-root-open-targets-patch.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ test("workspace root dropdown follows aliased File Manager callbacks", () => {
124124
assert.equal(applyWorkspaceRootOpenTargetsPatch(patched, targets), patched);
125125
});
126126

127-
test("workspace root open targets patch scans current shared app main project chunks", () => {
127+
test("workspace root open targets patch scans the current app page chunk", () => {
128128
const root = fs.mkdtempSync(path.join(os.tmpdir(), "codex-workspace-root-open-targets-"));
129129
try {
130130
const buildDir = path.join(root, ".vite", "build");
@@ -145,7 +145,7 @@ test("workspace root open targets patch scans current shared app main project ch
145145
path.join(assetsDir, "app-main-current.js"),
146146
"function decoy(){return{target:`fileManager`}}",
147147
);
148-
const sharedChunkName = "app-initial~app-main~projects-index-page~remote-conversation-page-current.js";
148+
const sharedChunkName = "app-initial~app-main~page-current.js";
149149
fs.writeFileSync(
150150
path.join(assetsDir, sharedChunkName),
151151
[

0 commit comments

Comments
 (0)