Skip to content

fix(electron): relay the Linux caption inset to embedded panes - #30034

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
jkiepert:fix/linux-embedded-caption-inset
Nov 18, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
jkiepert:fix/linux-embedded-caption-inset

Conversation

@jkiepert

@jkiepert jkiepert commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Change the local dashboard's caption reserve or the injected Linux caption buttons.
  • Make the Linux reserve zoom-aware, as the Windows one is.
  • Change framed (native-decoration) Linux windows, which need no inset.

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-model message (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:

Side Change
Host (InstancesViewport.tsx) Sends linuxInset when the window is frameless Linux, and pads its own loading and error strips by the same reserve
Pane (EmbeddedHostBridge.tsx, instancesSlice.ts) Reads linuxInset (absent from an older host means no inset) and toggles .embedded-linux-inset on <html>
Styles (shell-chrome.css) .embedded-linux-inset pads the header and the focus-mode surface by 112px, the same as the local .linux-electron rule
Shared (lib/electron.ts) LINUX_CAPTION_RESERVE_PX names the 112px; full-window viewers in the pane keep their controls below the caption band

Both ends need this version: the host sends the field and the pane's own dashboard applies the padding.

Backwards compatibility

Compatible: linuxInset is 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 sends linuxInset: true, and its tab strip over the error overlay gets 112px right padding.
  • EmbeddedSwitcher.test.tsx: the pane adds .embedded-linux-inset when 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.
  • Fixture models in three existing tests gain linuxInset: false.
  • All five new tests fail with the source changes reverted and pass with them. The seven related test files pass, and tsc -p tsconfig.app.json is 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.
Screenshot from 2026-11-04 13-44-28
Screenshot from 2026-11-04 13-43-25

After: remote pane and local dashboard on the nightly build from this branch.
Screenshot from 2026-11-04 16-44-09
Screenshot from 2026-11-04 16-43-57

Related Issues

Closes #30030

Sibling sweep

Swept: git grep -nE "winInset|embedded-win-inset" -- website/src
Sibling: 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@jkiepert
jkiepert requested review from a team and KiroCrewCaptain as code owners November 4, 2026 23:53
@jkiepert
jkiepert requested a review from mbriones98 November 4, 2026 23:53
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 5, 2026
@jkiepert
jkiepert force-pushed the fix/linux-embedded-caption-inset branch from 32ffb31 to 30770a5 Compare November 8, 2026 22:15
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 8, 2026
@jkiepert
jkiepert force-pushed the fix/linux-embedded-caption-inset branch from 30770a5 to ee15146 Compare November 12, 2026 16:43
@jkiepert

Copy link
Copy Markdown
Contributor Author

@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 tier:T1).

Just rebased onto current main (ee15146a4d); type check and the 53 related frontend test files pass locally. Thanks!

@jkiepert

Copy link
Copy Markdown
Contributor Author

@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 main with the type check and related frontend tests passing locally.

Thanks!

@bolichen97

Copy link
Copy Markdown
Contributor

@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. ee15146a4d is authored as Josh Kiepert <jkiepert@amazon.com>, and that email is not linked to any GitHub account, so GitHub shows no login for it.

Either fix works:

  1. Add jkiepert@amazon.com as a verified email on your GitHub account (Settings > Emails). Nothing needs to be pushed.
  2. Or re-author the commit with your GitHub noreply address and force-push your branch: git commit --amend --no-edit --reset-author after git config user.email 297110+jkiepert@users.noreply.github.com.

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

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 17, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 isLinuxFramelessElectron and sends it in mc-host-model, and it is added to both dependency lists;
  • parseHostModel reads it with the same absence rule, so an older host sends false;
  • the bridge toggles .embedded-linux-inset on the pane's <html> and removes it on teardown;
  • overlayCaptionClearancePx counts 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

@bolichen97
bolichen97 enabled auto-merge (squash) November 17, 2026 03:37
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 51af78ce1dee73a6580bf6c8fad13c74207ba113 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the change copies the existing Windows winInset relay, the new field is optional so older hosts and panes still work, and four screenshots are attached.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 51af78ce1dee73a6580bf6c8fad13c74207ba113 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ships

Inventory (6 items) — 6 justified

Intent: 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.

  1. A remote crew pane's header stops left of the Linux min/max/close buttons — justified
  2. In focus mode, the remote pane's surface also clears the Linux caption buttons — justified
  3. The host's own loading and error tab strips get 112px of right padding on frameless Linux — justified
  4. Full-window viewers inside a remote pane keep their controls below the caption band when the host is Linux — justified
  5. The host-to-pane model message gains a linuxInset field; an older host that omits it means no inset — justified
  6. The 112px reserve is now a named constant (LINUX_CAPTION_RESERVE_PX) used by the host's strip padding — justified

[FIRST-PRINCIPLES-REVIEWED] 51af78c

Description read

[DESCRIPTION-READ] ad3859393b1aa9bde36aaf6c202a1c0b7b9d34b78708977375005520e12508c7

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 51af78ce1dee73a6580bf6c8fad13c74207ba113 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Host tab strip over the loading/error overlay (paddingRight: LINUX_CAPTION_RESERVE_PX in InstancesViewport.tsx): no screenshot shows the remote pane while it is still loading or has failed to connect on frameless Linux. To close: attach one of the error state, showing the strip clear of the caption buttons.
  • Focus-mode header inside a remote pane (.embedded-linux-inset .mc-focus-mode .focus-caption-reserve{padding-right:112px}): all four images show normal mode only. To close: attach the remote pane in focus mode on frameless Linux.
  • Full-window viewers inside a remote pane (overlayCaptionClearancePx now returns 42px for embedded-linux-inset): the artifact and markdown viewers' close controls move down by 42px, and no image shows that. To close: attach a remote pane with an artifact or markdown viewer open on frameless Linux.

Notes

  • attachment-01 vs attachment-03 shows the main fix working: the remote header and bell now stop left of the window's minimize, maximize and close buttons. This lane has no blind first-time read; a maintainer can push the branch to this repository to get one.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 51af78ce1dee73a6580bf6c8fad13c74207ba113 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 51af78c

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 51af78ce1dee73a6580bf6c8fad13c74207ba113 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 51af78c

@bolichen97

Copy link
Copy Markdown
Contributor

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

@bolichen97 bolichen97 closed this Nov 17, 2026
auto-merge was automatically disabled November 17, 2026 04:08

Pull request was closed

@bolichen97 bolichen97 reopened this Nov 17, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) November 17, 2026 04:09
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 17, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

@jkiepert one more step, sorry for the back and forth: please rebase onto latest main and push.

Frontend Tests (2) keeps failing on one check, three runs in a row: src/i18n/localeFormatting.test.ts > [vs-base] no file this branch touched gained a host-locale call times out at 15 s. It is not your code. Merged with current main, that test passes locally in 0.7 s. The test diffs website/src from the base tip to the checked-out tree, and this branch still starts from Nov 12. So the diff it reads holds every website/src change on main since then, and the check runs out of time. A rebase makes that diff just your 9 files.

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

auto-merge was automatically disabled November 17, 2026 16:07

Head branch was pushed to by a user without write access

@jkiepert
jkiepert force-pushed the fix/linux-embedded-caption-inset branch from ee15146 to dceb663 Compare November 17, 2026 16:07

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bolichen97

Copy link
Copy Markdown
Contributor

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 main and push; the emoji-icon and Fast Gate reds should clear on the new head. My approval carries over once I re-check the new head.

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.
auto-merge was automatically disabled November 17, 2026 20:14

Head branch was pushed to by a user without write access

@jkiepert
jkiepert force-pushed the fix/linux-embedded-caption-inset branch from dceb663 to 51af78c Compare November 17, 2026 20:14

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving 51af78c. This is a rebase of dceb663 onto current main; the patch is identical line for line. CI runs on this head are approved.

AI-assisted, sent by Bolin Review bot

@bolichen97
bolichen97 enabled auto-merge (squash) November 17, 2026 20:37
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 17, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

@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

@bolichen97
bolichen97 disabled auto-merge November 18, 2026 04:49
@bolichen97
bolichen97 merged commit 62df088 into kirodotdev:main Nov 18, 2026
159 of 190 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote crew header runs under the Linux caption buttons

2 participants