Repository navigation
fix(website): keep full-screen file and artifact exit controls clear of the window caption buttons - #24801
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: both items apply the existing What this change shipsInventory (3 items) — 3 justifiedIntent: let Windows and Linux desktop users click Exit full screen on a full-screen file view, so Esc is not the only way out. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 4c5593f Description read[DESCRIPTION-READ] f00739ef052b84da67e74407ace5850f533b1fc511a99ffbbab950df980f881b That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the fix reuses the caption-clearance helper the image and diagram viewers already ship, and browser and macOS layouts don't change. Notes
[DESIGN-REVIEWED] 4c5593f Description read[DESCRIPTION-READ] 3b2ee23d5ced73dd62dc7c2c114e007893be9496956a4088437660d1af69149d That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing a screenshot of the full-screen file and artifact headers with the 42px caption clearance applied. The blind read was not performed because the PR supplies no image. Evidence gaps
Notes
[UX-REVIEWED] 4c5593f Description read[DESCRIPTION-READ] a29de4291ff8bfbd9907f47f867c1f0fb0d62bb5103f2a9538a3e8c60943b4d3 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
b8efae2 to
3801091
Compare
…of the window caption buttons
3801091 to
4c5593f
Compare
|
Review-ready at head 4c5593f: all 107 checks pass, readiness: passed, mergeable, base is fresh (no main movement in this PR's files). Design, First Principles and UX lanes PASS; GPT and Opus lanes reviewed this head. Remaining gate is a maintainer approval. Manual check still worth doing on the Windows desktop app: open a .md file from the sidebar, switch to full screen, click Exit full screen. Not merged, approved or auto-merged by the agent. |
buluoray
left a comment
There was a problem hiding this comment.
Approving 4c5593f.
The fix reuses overlayCaptionClearancePx(), which the image and diagram viewers already use. It returns 42 only on frameless Windows, frameless Linux, or inside an embedded pane whose Windows host sets .embedded-win-inset, and 0 in a browser tab and on macOS. When it's 0 the header gets no style at all, so the browser layout is unchanged. Only a top margin is added: the Exit full screen button, the dialog's initial focus and its Tab focus trap are untouched, so the control stays reachable by keyboard and Esc behaves as before.
Verified locally: the two touched test files pass (55). Removing the margin from either panel, or applying it unconditionally, turns a test red. CI is green on this head (91 pass, 16 skipped).
Non-blocking: the UX lane's evidence gap still stands. Setting embedded-win-inset on <html> in a browser tab renders the shifted header, so a capture of the file and artifact full-screen headers can be attached, and the "Why no screenshot" reason can be corrected. I haven't verified this on a real Windows or frameless Linux window.
Problem / Motivation
Goal: On the Windows desktop app, the X / Exit full screen button of a full-screen file view can be clicked again, so Esc is no longer the only way out.
A
.mdfile opened from the sidebar and switched to full screen shows its Exit full screen button at the top-right corner. On the Windows desktop app, the native minimize / maximize / close buttons sit on top of that same corner, so a click on Exit full screen lands on the window controls instead. Only Esc closes the view (#24784).Why it matters
Every Windows desktop user who opens a file in full screen is stuck there unless they know to press Esc. The visible exit control does nothing, which reads as a broken app.
Not a goal
What changed (motivation → approach → change)
The full-screen view is portaled to
<body>, outside the shell<div>that carries.win-electron, so the header's caption-button inset never reaches it. Its header sat in the 42px caption band, under the Windows overlay buttons (and frameless Linux's own).The image and diagram viewers had the same bug (#11732) and fixed it with
overlayCaptionClearancePx()inwebsite/src/lib/electron.ts: on a frameless Windows or Linux window, or inside an embedded pane under a Windows host, the control row gets a 42px top margin. This PR applies that same helper to the full-screen header of the file panel (MarkdownPanel.tsx) and of the artifact panel (ArtifactPanel.tsx), which share the identical header. In a browser tab and on macOS the helper returns 0, so nothing moves there.Backwards compatibility
Compatible: the header only gains a top margin on frameless Windows/Linux windows; no prop, key or API changes.
Removes nothing: the diff only adds a margin and a test id.
Tests
MarkdownPanel.captionClearance.test.tsx(new, soMarkdownPanelCoverage.test.tsxstays under the 2,000-line cap) andArtifactPanelCoverage.test.tsx: the full-screen header carries a 42px top margin under a Windows host (.embedded-win-inset), and no margin in a plain browser tab.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Not run on a Windows desktop app: this host is Linux.
tsc -p tsconfig.app.jsonand eslint on the changed files pass. A maintainer on Windows can open a.mdfile, switch to full screen and click Exit full screen.Screenshots / video
Why no screenshot: the margin applies only inside the frameless Windows/Linux desktop app, which this Linux host cannot capture, and a browser tab renders the view pixel-for-pixel as before.
Related Issues
Closes #24784
Sibling sweep
Swept: git grep -n "pl-20 pr-6 h-12" -- website/src
Sibling: website/src/components/ArtifactPanel.tsx -- changed here
Sibling: website/src/components/DiagramLightbox.tsx -- not affected -- already uses overlayCaptionClearancePx
Sibling: website/src/components/markdown/Lightbox.tsx -- not affected -- already uses overlayCaptionClearancePx
Pattern harvest
Rule candidate: review-prompt
Pattern: a full-window overlay portaled to
<body>puts controls in the top 42px withoutoverlayCaptionClearancePx().Checklist