fix(web): the review item of #850 that goes on top

The Dock button's hidden attribute was set only when a preview opened, so
with a preview open, switching Codex files off left a Dock button that did
nothing and switching it on showed none until the next preview.
applyHeaderVisibilitySettings() now sets it beside the Response files
button, and a test flips the setting with a preview open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-12-03 10:16:05 +01:00
1 parent d3d1f7cde1
commit a117955490
2 files changed
+16 -1

No files matched your search

+11
View File
@@ -159,6 +159,17 @@ describe('with the Codex files setting off (nothing stored), none of the three b
expect(overlay.classList.contains('is-docked')).toBe(true);
});
it('flips the Dock button of an open preview when the setting changes, not only at the next open', () => {
const { app, document } = loadApp();
const dockBtn = document.getElementById('filePreviewDockBtn')!;
app._codexFilePreviewsEnabled = () => true;
app.applyHeaderVisibilitySettings();
expect(dockBtn.hidden).toBe(false);
app._codexFilePreviewsEnabled = () => false;
app.applyHeaderVisibilitySettings();
expect(dockBtn.hidden).toBe(true);
});
it('keeps Response files off phones even with the setting on', () => {
const mobileCss = read('mobile.css');
const phoneBlock = mobileCss.slice(mobileCss.indexOf('@media (max-width: 599px)'));