Repository navigation
fix(electron): relay the Linux caption inset to embedded panes - #30034
Conversation
32ffb31 to
30770a5
Compare
30770a5 to
ee15146
Compare
|
@bolichen97 could you approve the fork workflows on this one when you have a minute? It's been waiting since Nov 4 with none of the gated runs started, so it hasn't had CI or AI review yet. It's a small Linux follow-up to #9931: in the frameless Linux desktop app, a remote crew pane's header runs under the min/max/close caption buttons, because the host relays the macOS and Windows insets to embedded panes but not a Linux one. The fix adds that relay (closes #30030, now Just rebased onto current |
|
@iamwhatever @buluoray could one of you approve the fork workflows here? None of the gated runs have started since this was opened on Nov 4, so it still has no CI or AI review. It's the Linux counterpart of #10789 (which @iamwhatever reviewed): the host relays the Windows caption inset to embedded remote crew panes but not a Linux one, so in the frameless Linux app the remote pane's header runs under the min/max/close buttons. This adds the same relay for Linux. It sits on top of the remote-pane work in #33810 and #35156, and is rebased on current Thanks! |
|
@jkiepert thanks for the ping. Before I approve the 17 held CI runs, our fork CI check needs the commit's GitHub author to be the PR author, and it can't match it here. Either fix works:
Reply here or in the Slack thread when it's done, and I'll approve the runs and review the PR. AI-assisted, sent by Bolin Review bot |
bolichen97
left a comment
There was a problem hiding this comment.
Approving ee15146a4d. Thanks for linking the email; the commit now shows as yours, so I approved the 17 held CI runs.
I read the full diff. linuxInset follows the existing winInset path at every step:
- the host sets it from
isLinuxFramelessElectronand sends it inmc-host-model, and it is added to both dependency lists; parseHostModelreads it with the same absence rule, so an older host sendsfalse;- the bridge toggles
.embedded-linux-inseton the pane's<html>and removes it on teardown; overlayCaptionClearancePxcounts the new class.
The 112px reserve is one named constant (LINUX_CAPTION_RESERVE_PX), and the CSS rules point back to it. The four changed test files pass locally on this head (53 tests), and tsc --noEmit is clean.
AI-assisted, sent by Bolin Review bot
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change copies the existing Windows [DESIGN-REVIEWED] 51af78c Description read[DESCRIPTION-READ] 29b1fec4845e2edb340f727771dfec653735fb2f4ea280a1a9f90415fee96cf7 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 |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: each item traces to the bell being unclickable under Close in a remote pane on frameless Linux (#30030), and each one fixes the code that leaves no inset. What this change shipsInventory (6 items) — 6 justifiedIntent: let someone using the frameless Linux desktop app click a remote crew's header, including the bell, without the window's caption buttons covering it. FIX.
[FIRST-PRINCIPLES-REVIEWED] 51af78c Description read[DESCRIPTION-READ] ad3859393b1aa9bde36aaf6c202a1c0b7b9d34b78708977375005520e12508c7 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5, fork) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing screenshots of three Linux-inset surfaces the diff moves: the host tab strip over the loading/error overlay, the focus-mode header in the pane, and full-window viewer controls in the pane. Evidence gaps
Notes
[UX-REVIEWED] 51af78c Description read[DESCRIPTION-READ] 3cfccd1708cab44c9f304b422b3561535178c8ebe67c6ff5a3c1406b107bb912 That sha256 names everything this verdict read: the PR description, plus the 7 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 (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
|
Closing and reopening to refresh CI: the approved runs replayed the 11-12 push event, whose merge with main predates the Playwright fix for the ubuntu-26.04 fork runner (#37653). The current merge ref has it. AI-assisted, sent by Bolin Review bot |
Pull request was closed
|
@jkiepert one more step, sorry for the back and forth: please rebase onto latest main and push.
My approval stays and auto merge is on. I'll approve the new CI runs when you push. AI-assisted, sent by Bolin Review bot |
Head branch was pushed to by a user without write access
ee15146 to
dceb663
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Re-approving dceb66392d. Thanks for the rebase. The range-diff against ee15146a4d (the head I approved) shows the commit unchanged, so this push only moves the base to current main. That should clear the localeFormatting [vs-base] timeout. I approved the held CI runs on this head.
AI-assisted, sent by Bolin Review bot
|
The CI fix has landed: #38678 (the in-repo copy of #33281) merged, so the diff-scoped gates now measure from the merge commit's first parent. Please rebase this branch onto current AI-assisted, sent by Bolin Review bot |
On a frameless Linux window the shell injects its own minimize, maximize and close buttons at the top-right. The local dashboard reserves room for them, but a remote crew pane is a cross-origin iframe that cannot see the shell, so its header ran under the buttons and the notifications bell sat behind Close. The host now sends linuxInset in mc-host-model, as it already does macInset and winInset. The pane toggles .embedded-linux-inset on <html>, which pads its header and focus-mode surface by the same 112px as .linux-electron, and the host's own loading and error strips get the same padding.
Head branch was pushed to by a user without write access
dceb663 to
51af78c
Compare
|
@jkiepert I looked at the PR Hygiene red. GitHub's merge ref for this PR is still the one built at 12:14 PST on main 654781f, and main has moved 90 commits since, so every rerun of PR Hygiene reads that old base and counts main's commits as yours. A rerun can't fix that, and a close/reopen would check out the same stale merge commit. The clean fix is one more rebase onto current main (your branch is a single commit and merges cleanly). The new push makes GitHub rebuild the merge ref, and PR Hygiene then counts only your commit. I'll re-approve as soon as the new head is up. AI-assisted, sent by Bolin Review bot |
Problem / Motivation
Goal: In the frameless Linux desktop app, a remote crew's header stays clear of the window's minimize, maximize and close buttons, so the notifications bell can be clicked.
On a frameless Linux window (Wayland with client-side decorations), a remote crew pane's header runs under the caption buttons the shell draws at the top-right. The notifications bell sits behind Close and cannot be clicked. The local dashboard in the same window lays out correctly.
Why it matters
Every remote crew session on frameless Linux loses the bell and the right end of its header. macOS and Windows hosts already relay their caption inset to remote panes, so Linux is the one platform where this breaks.
Not a goal
What changed (motivation → approach → change)
A remote crew pane is a cross-origin iframe with no Electron preload, so it cannot tell it sits inside a frameless Linux window. The host already tells the pane about macOS and Windows caption buttons through the
mc-host-modelmessage (macInset,winInset), and the pane pads its header to match. Linux had no such field, so the pane never left room.This adds the Linux counterpart, following the Windows relay from #10789:
InstancesViewport.tsx)linuxInsetwhen the window is frameless Linux, and pads its own loading and error strips by the same reserveEmbeddedHostBridge.tsx,instancesSlice.ts)linuxInset(absent from an older host means no inset) and toggles.embedded-linux-inseton<html>shell-chrome.css).embedded-linux-insetpads the header and the focus-mode surface by 112px, the same as the local.linux-electronrulelib/electron.ts)LINUX_CAPTION_RESERVE_PXnames the 112px; full-window viewers in the pane keep their controls below the caption bandBoth ends need this version: the host sends the field and the pane's own dashboard applies the padding.
Backwards compatibility
Compatible:
linuxInsetis a new optional field. An older host omits it and the pane treats that as no inset; an older pane ignores it.Removes nothing: the change only adds a relayed field, a CSS class and a constant.
Tests
InstancesViewport.linuxElectron.test.tsx(new): on a frameless Linux shell the host sendslinuxInset: true, and its tab strip over the error overlay gets 112px right padding.EmbeddedSwitcher.test.tsx: the pane adds.embedded-linux-insetwhen the host relays it, removes it when the host stops and on unmount, and treats a host model without the field as no inset; a CSS check keeps the local and embedded Linux rules at 112px.linuxInset: false.tsc -p tsconfig.app.jsonis clean.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Built a nightly AppImage from this branch and installed the same commit as an isolated gateway on a second Linux host, then connected to it as a remote crew from a frameless window. The remote pane's header stops left of the caption buttons and the bell is clickable, matching the local dashboard. Before the change, the same setup put the bell under Close.
Screenshots / video
Before: remote pane (bell under Close) and local dashboard, same window.


After: remote pane and local dashboard on the nightly build from this branch.


Related Issues
Closes #30030
Sibling sweep
Swept:
git grep -nE "winInset|embedded-win-inset" -- website/srcSibling: website/src/lib/electron.ts -- changed here
Sibling: website/src/components/ArtifactPanel.tsx -- not affected -- reads overlayCaptionClearancePx, which this change extends
Sibling: website/src/components/MarkdownPanel.tsx -- not affected -- reads overlayCaptionClearancePx, which this change extends
Pattern harvest
Not generalizable: each caption inset is a per-platform field relayed by hand; this adds the missing Linux one.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.