Skip to content

Fix Bitwarden extension popout rendering - #8341

Open
TyRichards wants to merge 2 commits into
omacom:quattrofrom
TyRichards:fix/bitwarden-popup-rendering
Open

TyRichards wants to merge 2 commits into
omacom:quattrofrom
TyRichards:fix/bitwarden-popup-rendering

Conversation

@TyRichards

Copy link
Copy Markdown
Contributor

Summary

  • match Bitwarden extension popouts by their stable extension ID, regardless of Chromium browser prefix or popup-path suffix
  • float the popout directly instead of applying the generic floating-window tag
  • cap it at Bitwarden's supported 480x650 size and disable blur/screen sharing
  • add a regression test for the desktop and extension rules

Why

Brave currently exposes the Bitwarden popup as:

brave-nngceckbapebfimnlniiiahkandclblb__popup_index.html-Default

The existing chrome-nngceckbapebfimnlniiiahkandclblb-Default rule does not match that class, so Hyprland tiles the narrow popup surface into a wide window. This produces the apparent half-rendered/transparent popup.

Applying Omarchy's generic floating-window tag is not sufficient here: its 875x600 size is also incompatible with Bitwarden's current popup layout. This rule therefore floats Bitwarden directly and uses a maximum size of 480x650.

This combines the browser-class coverage from #8236 with the Bitwarden-specific sizing approach from #6449.

Fixes #6075.

Verification

Live tested with Hyprland 0.56.2, Brave, and Bitwarden extension 2026.7.0:

  • before: the class above opened tiled at 1386x858
  • after: the same class opened floating at 480x650, with screen-share protection applied

Tests:

./test/shell.d/hyprland-bitwarden-test.sh
bash test/shell.d/hyprland-default-config-test.sh
git diff --check

The full ./test/all suite was also run. Its five failures were reproduced unchanged on a detached, unmodified upstream/quattro checkout (one local bar-geometry check, three checks requiring an omarchy-pkgs checkout, and one network-dependent theme URL check).

Copilot AI balanced review requested due to automatic review settings August 26, 2026 07:13

Copilot AI 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.

Pull request overview

Updates Bitwarden Hyprland rules to correctly float Chromium extension popouts at supported dimensions.

Changes:

  • Matches Bitwarden popouts by extension ID.
  • Applies direct floating, size, blur, and sharing rules.
  • Adds regression coverage.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
default/hypr/apps/bitwarden.lua Corrects extension popout matching and presentation.
test/shell.d/hyprland-bitwarden-test.sh Tests desktop and extension rules.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/shell.d/hyprland-bitwarden-test.sh Outdated

require_command lua

OMARCHY_PATH="$ROOT" lua <<'LUA'
Lua 5.5 reports an error in a chunk read off bare stdin and then exits 0 anyway, so `lua <<'LUA'` swallowed every assertion in the heredoc: mutating `max_size` to `{ 9999, 9999 }` still printed `ok -` and left the file exiting 0. Passing `-` names stdin as the script and restores the exit status. `set -euo pipefail` is what then carries that status out of the file, since the runner only reads the exit code and `pass` would otherwise run regardless.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed by Claude Opus 5 in Claude Code, with an independent second opinion from Codex at xhigh reasoning. Everything below was checked against the source, and the window rule itself was proved on a disposable VM running a real Hyprland 0.56.2 session rather than read.

Pushed one fix to this branch: 6f98e393 — "Make the Bitwarden window rule test able to fail".

test/shell.d/hyprland-bitwarden-test.sh could not fail. Two things stacked up. The script had no set -euo pipefail, so pass ran and set the exit status whatever lua did — and Lua 5.5 reports an error in a chunk read off bare stdin and then exits 0 anyway, so set -e alone would not have caught it either. Measured on your commit aa9ab96:

$ sed -i 's/max_size = { 480, 650 }/max_size = { 9999, 9999 }/' default/hypr/apps/bitwarden.lua
$ bash test/shell.d/hyprland-bitwarden-test.sh; echo EXIT=$?
lua: stdin:25: extension popouts stay within Bitwarden's supported size
ok - Bitwarden popouts match all Chromium browsers at their supported size
EXIT=0

The fix passes - so stdin is named as the script (lua - <<'LUA'), which restores the exit status, and adds set -euo pipefail to carry it out of the file. The same mutation now exits 1 with no ok - line, and a clean tree still passes. Worth knowing: test/shell.d/config-test.sh:192 and test/shell.d/hyprland-workspace-layout-test.sh:53 use the same bare-stdin pattern and their assertions are dead for the same reason. That is pre-existing and not yours to fix here.

The rule itself checks out. max_size is a registered Lua window-rule effect — LuaBindingsInternal.hpp:77 maps it to an expression-vec2, the same type as size, so the table form is genuinely accepted and not silently dropped. Windows opened with each candidate class on a 1280x800 output:

brave-nngceckbapebfimnlniiiahkandclblb-Default                     floating=True  size=[480,500] at=[400,163]
chrome-nngceckbapebfimnlniiiahkandclblb-Profile_1                  floating=True  size=[480,500] at=[400,163]
brave-nngceckbapebfimnlniiiahkandclblb__popup_index.html-Default   floating=True  size=[480,500] at=[400,163]
brave-browser                                                      floating=False size=[1256,750]
Bitwarden                                                          floating=True  size=[875,600] at=[203,113]

The widened match covers the browser prefix, a non-default profile suffix and the __popup_index.html variant, and it does not catch an ordinary browser window. Hyprland matches window rules with RE2 full match, so .*<extid>.* means "the class contains this ID" and cannot be triggered by a tab title or a devtools window — o.window only ever writes match.class.

Dropping +floating-window costs less than it looks. The tag is only float + center + size 875x600 (default/hypr/apps/system.lua:2-4), and nothing else in the repo reads it. float you reproduced. The forced 875x600 is the thing #6075 is about, so losing it is the point. center is not reproduced — but Hyprland already centres a new floating Wayland toplevel that requests no position, and the numbers above show it: at=[400,163] is exactly centred for a 480x500 window under the bar's reserved area, with no center rule in play. The cap does not lock users out either; a resize dispatch took the window to 900x900.

One gap, not a blocker and not new. The regex carries only the Chrome Web Store ID. Bitwarden's Microsoft Edge Add-ons build has its own ID, jbkfoedolllekgbhcbcoahefnbanhhlh, so Bitwarden installed from Edge's own store still will not match, which makes "all Chromium browsers" a little generous. Codex found that one and it holds against Bitwarden's deployment docs. It is missing from quattro today and from every other open Bitwarden PR, so it is a follow-up rather than something you regressed.

What is waiting on the maintainer. This is one of four open PRs editing default/hypr/apps/bitwarden.lua — #6449, #7628, #8236 and this one. Yours is the only one covering both halves of the problem, the browser-prefix miss and the 875x600 sizing in #6075, and the only one carrying a test. It is also the only one that hardcodes a third party's popup dimensions into Omarchy where the shared tag would otherwise track them, and that trade is the maintainer's call rather than mine. Nothing has been merged, closed or approved, and the other PRs were left untouched.

On the second opinion: Codex at xhigh agreed on the match semantics, the max_size key and what the tag carries, though those were conclusions already reached here and its independence is not currently guaranteed. The Edge ID is its own finding. It also proposed set -euo pipefail alone as the test fix, on the assumption that lua exits non-zero on a failed assertion — the mutation above is what showed that was not enough.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-checked at 6f98e393 against current quattro (b18ab495) by Claude Opus 5.5 in Claude Code. This time the fix was reproduced on a disposable VM running a real Hyprland session, with the branch merged onto quattro, since quattro has moved a long way since the branch was cut. The merge is clean.

The bug reproduces, and this fixes it. Windows opened under each class, first with quattro's bitwarden.lua, then with this branch's:

                                                                   quattro                    this branch
brave-nngceckbapebfimnlniiiahkandclblb__popup_index.html-Default   tiled    1256x750          floating 480x650
chrome-nngceckbapebfimnlniiiahkandclblb-Default                    floating 875x600          floating 480x650
chrome-nngceckbapebfimnlniiiahkandclblb-Profile_1                  tiled    1256x750          floating 480x650
brave-browser                                                      tiled    1256x750          tiled    1256x750

Restoring quattro's rule on the same tree brings the tiled Brave popout back. An ordinary browser window is untouched either way.

Tests, on the same VM. hyprland-bitwarden-test.sh and hyprland-default-config-test.sh pass against current quattro. The Bitwarden test still fails when the size cap is changed, so it can catch a regression. The full ./test/cli and ./test/shell suites fail identically on unmodified quattro: the same one CLI check and the same 62 shell checks, mostly node missing from the VM. The only difference is this branch's new test, which passes.

What changed since the last review. #6449, #7628 and #8236 are now closed, so this is the only open fix for #6075 and there is no longer a choice between them. The Edge Add-ons ID (jbkfoedolllekgbhcbcoahefnbanhhlh) is still not matched, which remains a follow-up rather than something this branch regressed.

No second opinion this run. The reviewer answered a ping, but omabot's daily review budget was spent, so nothing checked this round's work. It is labelled verified and not ready. It waits on a second-opinion round at this head, then on the maintainer.

omarchybot added a commit that referenced this pull request Oct 16, 2026
The rule matched only chrome-<id>-Default, so the popout in Brave (brave-<id>...), in a second Chromium profile (-Profile_1) or with the popup path appended (__popup_index.html) got none of it: no float and no screen-share protection, and Brave tiles it into a wide, half-drawn window. Matching on the extension ID alone covers them, as #8341 does. The test is adapted from #8341's, keeping its float and screen-share checks and asserting that no size or size cap is set.

Co-Authored-By: Ty Richards <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit that referenced this pull request Oct 31, 2026
* Let the Bitwarden extension popout keep the size it asks for

The extension window was tagged floating-window, which forces every window carrying it to 875x600. Bitwarden opens its popout at the width chosen in its settings (380, 480 or 600) and a height of 630, so the forced size left it the wrong shape. Float and centre it directly instead, keeping no_screen_share.

Co-Authored-By: Codex Medium <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Match the Bitwarden extension popout in every Chromium browser

The rule matched only chrome-<id>-Default, so the popout in Brave (brave-<id>...), in a second Chromium profile (-Profile_1) or with the popup path appended (__popup_index.html) got none of it: no float and no screen-share protection, and Brave tiles it into a wide, half-drawn window. Matching on the extension ID alone covers them, as #8341 does. The test is adapted from #8341's, keeping its float and screen-share checks and asserting that no size or size cap is set.

Co-Authored-By: Ty Richards <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Drop the Bitwarden rule test

The test restated the two declarative rules in bitwarden.lua and counted them, so it guarded nothing a reader of the file cannot see and broke whenever a rule was added, which AGENTS.md asks tests not to do.

The broader `.*nngceckbapebfimnlniiiahkandclblb.*` match stays: the popout's class is `brave-...` in Brave and ends in `-Profile_1` in a second Chromium profile, and on quattro those popouts tile because the old exact class never matches them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Omarchybot <[email protected]>
Co-authored-by: Codex Medium <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Ty Richards <[email protected]>
@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 31, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

#14514 has been merged into quattro, and it fixes the same Bitwarden popout bug (#6075). Thanks @TyRichards: your Brave class reproduction is what showed that the old rule missed every class that isn't Chrome's -Default one. Claude Opus 5.5 compared the two diffs against quattro as the merge left it, and Codex Medium checked that comparison.

Already covered by the merge: matching on the extension ID (.*nngceckbapebfimnlniiiahkandclblb.*), floating the popout directly instead of tagging it floating-window, and keeping no_screen_share. The merged rule also centres the popout.

Not carried over:

  • max_size = { 480, 650 } doesn't fit the merged approach. Let the Bitwarden extension popout keep the size it asks for #14514 deliberately lets the popout keep the size it asks for, which is the width chosen in Bitwarden's appearance settings (380, 480 or 600) and a height of 630. A 480 cap would shrink the 600 setting.
  • no_blur = true looks unnecessary for the default popout, since no rule on quattro makes that class see-through. Codex noted it could still matter if the popout were made transparent some other way, such as with the transparency toggle.

Still worth having: test/shell.d/hyprland-bitwarden-test.sh. The merge added no test for this rule, so this PR stays open for it. For it to land, the branch needs these changes:

  • Resolve the conflict in default/hypr/apps/bitwarden.lua by taking quattro's version.
  • Update the test to match the merged rule: assert center, and drop the max_size and no_blur assertions. Asserting that max_size stays unset would also guard against the 875x600 coming back by another route.
  • Update the desktop-rule assertion, which expects ^(Bitwarden)$. Since Float Bitwarden's own Linux builds like the Arch package #15769, quattro matches ^([bB]itwarden)$, so the test fails as it stands. Codex caught this one.

I took the verified label off, because it applied to a head that no longer merges cleanly. Once the branch is updated, the new head will be run on a worker and reviewed again. Waiting on the author.

berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
…14514)

* Let the Bitwarden extension popout keep the size it asks for

The extension window was tagged floating-window, which forces every window carrying it to 875x600. Bitwarden opens its popout at the width chosen in its settings (380, 480 or 600) and a height of 630, so the forced size left it the wrong shape. Float and centre it directly instead, keeping no_screen_share.

Co-Authored-By: Codex Medium <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Match the Bitwarden extension popout in every Chromium browser

The rule matched only chrome-<id>-Default, so the popout in Brave (brave-<id>...), in a second Chromium profile (-Profile_1) or with the popup path appended (__popup_index.html) got none of it: no float and no screen-share protection, and Brave tiles it into a wide, half-drawn window. Matching on the extension ID alone covers them, as omacom#8341 does. The test is adapted from omacom#8341's, keeping its float and screen-share checks and asserting that no size or size cap is set.

Co-Authored-By: Ty Richards <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Drop the Bitwarden rule test

The test restated the two declarative rules in bitwarden.lua and counted them, so it guarded nothing a reader of the file cannot see and broke whenever a rule was added, which AGENTS.md asks tests not to do.

The broader `.*nngceckbapebfimnlniiiahkandclblb.*` match stays: the popout's class is `brave-...` in Brave and ends in `-Profile_1` in a second Chromium profile, and on quattro those popouts tile because the old exact class never matches them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Omarchybot <[email protected]>
Co-authored-by: Codex Medium <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Ty Richards <[email protected]>
(cherry picked from commit ab85004)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bitwarden Chrome Extension popup locked to 875x600 since 2026.5.1 update

3 participants