Skip to content

macos/iwa: hide native buttons in unframed windows - #382

Closed
luke wants to merge 1 commit into
imputnet:mainfrom
Agent54:codex/fix-unframed-iwa-macos
Closed

luke wants to merge 1 commit into
imputnet:mainfrom
Agent54:codex/fix-unframed-iwa-macos

Conversation

@luke

@luke luke commented Sep 24, 2026

Copy link
Copy Markdown

Problem

In an unframed isolated web app on macOS, Helium removes the web-app toolbar but AppKit's close, minimize, and zoom buttons remain over the app's custom top border. Kitchen Sink IWA reproduces this after selecting Go unframed and granting window management permission. Chromium issue 482535474 confirms that an unframed window should not expose those controls; Chromium is not currently planning to support the feature on macOS.

Change

The browser sends titlebar-button visibility through the remote Cocoa window interface to the app-shim process, which owns the visible NSWindow. The app shim hides or restores the three standard button views and reapplies that state after style-mask changes. Browser layout stops reserving caption-button space while the app is unframed. The window keeps its close and resize capabilities.

The patch includes a native-window unit test and Mac assertions in the existing unframed-IWA browser test. The investigation report records reproduction steps, root cause, design, validation, and the Chromium submission path.

Validation and review status

  • Built patched Helium 153 chrome on macOS arm64 and manually verified Kitchen Sink IWA across unframed → framed → unframed permission transitions.
  • Compiled the revised native unit-test object and macOS browser-test source. The full browser-test target was not linked or run in the prepared runner checkout.
  • Helium patch-series lint passed on the rebased branch. CI on current Helium main (Chromium 154) is pending; this PR is a draft until that patch stack and runtime are checked.
  • AI assistance was used to prepare the patch and report. The contributor and maintainers should review the source and tests directly. The AI-use checkbox in the repository template is deliberately not asserted.

This draft seeks maintainer confirmation that Helium wants to carry the macOS fix. The linked Chromium issue is an upstream bug report, but no Helium maintainer has approved this change yet.

Unframed IWAs remove the web app toolbar, but macOS still creates a
titled window in the remote Cocoa app shim. Its native close, minimize,
and zoom buttons remain visible over app content. Send the unframed
state to the actual NSWindow, hide or restore its standard buttons, and
remove the caption exclusion from browser layout.

Cover style-mask changes and permission grant/revoke transitions.
Document the reproduction, root cause, and validation for review.

Bug: 482535474
Test: Built Helium 153 chrome; compiled native and browser test objects;
      manually verified IWA unframed/framed/unframed transitions.
@luke luke closed this Sep 24, 2026
@luke

luke commented Sep 24, 2026

Copy link
Copy Markdown
Author

Apologies this shouldn't have been submitted yet. Please delete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant