Repository navigation
fix: v1.5.2 — visibility:hidden keeps title centered (display:none broke layout) - #62
Merged
Merged
Conversation
…ntered display:none (v1.5.1) removed the icon from the flex layout entirely, shifting the title text left. visibility:hidden keeps the icon's layout slot occupied so the title stays centered. Closes #61.
nesquena
approved these changes
Apr 25, 2026
nesquena
left a comment
Contributor
There was a problem hiding this comment.
Verified on Mac agent at tip 5e54625.
Build/test results
swift build -c release— Build complete (2.51s, 0 warnings)swift test— 22/22 passedbash build.sh—.appbuilt, ad-hoc signed, installed to/Applications
Scope: 9/-1 across 2 files (CHANGELOG + BrowserWindowController). One-character CSS swap.
Code review
The change is display: none → visibility: hidden on .app-titlebar-icon. Correct CSS-semantics fix:
display: noneremoves the element from the layout box tree entirely. In a flex container, that means the icon's flex slot disappears and remaining items reflow — the title text (presumably centered between icon-left and controls-right) shifts left to fill the void.visibility: hiddenrenders the element invisible but preserves its layout box. The flex slot stays the same width, so the title stays centered exactly where v1.5.1 was supposed to leave it.
Everything else from v1.5.1 is unchanged: documentStart timing, (document.head || document.documentElement) fallback, forMainFrameOnly: true, !important qualifier, IIFE wrapper.
Same lifecycle/safety properties as the v1.5.1 review:
- Re-injected on every main-frame load (incl.
reconnectInPlacereload paths). - Static string literal, no XSS surface.
- The element-creation race is benign —
visibility: hiddenapplies as soon as the.app-titlebar-iconelement matches the rule, regardless of whether it existed when the script ran.
Non-blocking follow-ups
None this round. Single-character CSS change, well-targeted to the specific layout break v1.5.1 introduced.
Ready to merge and tag v1.5.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One-line followup to v1.5.1. Changes
display: none→visibility: hiddenon.app-titlebar-icon.Problem
v1.5.1 hid the icon with
display: none !important, which removed it from the flex layout entirely. The title text was centered between the icon (left) and controls (right) — with the icon gone from layout, the title shifted left.Fix
visibility: hiddenrenders the element as invisible but preserves its flex slot. The title stays centered exactly as intended. Icon: gone. Layout: intact.Pre-merge checklist
Closes #61