fix(ui): platform-correct shortcut hints, window identity, and narrow-window overlap - #4
Merged
Merged
Conversation
…ow-window overlap Three cross-platform defects found while testing a Linux build under Xvfb. macOS glyphs leaked into the Linux/Windows UI. `keybinding_hint()` already rewrites ⌘↵ to Ctrl+Enter off-mac and the palette used it, but the response pane's empty state and the Timing placeholder printed the raw glyph, and the empty sidebar said "Open one with ⌘O". The very first thing a Linux user saw was "Press ⌘↵ to send". (The Send button's hint was already gated to macOS — it renders nothing off-mac, which is intentional, so it's left alone.) The window set no title and no app_id, so Linux WMs showed it as "Unnamed Window" and couldn't match it to its .desktop entry for the icon. Both are now set; as a side effect the window is finally addressable by name for UI automation, which it wasn't before. `window_min_size` was unset, so the window could be dragged small enough that the response footer's metrics painted *over* the Pretty/Raw/Wrap group rather than clipping — "200 OK · 152 ms · 1.2 KiB" overprinting the toggles. Two fixes, because either alone is insufficient: the metrics group now clips (`min_w_0` lets it shrink but doesn't stop its text painting outside, which is also reachable at any window size via ⌘+ font scaling), and a 1000x640 floor keeps the side-by-side layout above the width where the footer and both tab strips stop fitting. Verified clean at the floor and cramped below it.
The recording captured the pre-fix UI, whose response empty state read "Press ⌘↵ to send" on Linux. Re-shot so the README's first impression matches what a Linux or Windows user actually sees.
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.
Three cross-platform defects found while driving a Linux build under Xvfb, plus a re-shot demo.
1. macOS glyphs in the Linux/Windows UI
The response pane's empty state — the first thing a new user sees — read
"Press ⌘↵ to send" on Linux. Same for the Timing placeholder and the empty sidebar's
"Open one with ⌘O".
command.rs::keybinding_hint()already rewrites⌘↵→Ctrl+Enteroff-mac and the commandpalette used it correctly; these three sites bypassed it. Now routed through it.
(The Send button's
⌘↵is alreadycfg!(target_os = "macos")-gated — it renders nothing off-mac,which is deliberate, so it's untouched. My earlier count of "four sites" was wrong.)
2. Window had no identity
WindowOptionsset notitleand noapp_id, so Linux WMs showed "Unnamed Window" in thetaskbar and alt-tab, and couldn't match the window to its
.desktopentry for the icon. Both setnow. Side benefit: the window is finally addressable by name for UI automation — previously
xdotool search --namematched the X root window instead.3. Response footer overlapped itself on a narrow window
window_min_sizewas unset, so the window could be dragged small enough that the footer's200 OK · 152 ms · 1.2 KiBpainted over the Pretty/Raw/Wrap toggles instead of clipping.Two fixes, because neither alone is sufficient:
min_w_0lets a flex item shrink but does not stop its textpainting outside the box — that was the actual overlap. This path is also reachable at any
window size via
⌘+font scaling, so it's worth fixing independently of the floor.side-by-side layout simply needs that much width for the footer and both tab strips.
● 20overprinted byPretty Raw Wrap,KiBcolliding4. Demo re-recorded
The README GIF captured the pre-fix UI, so it showed
Press ⌘↵ to send. Re-shot against the fixedbuild; same content and size (728K), now matching what users actually see.
Verification
CI is still unavailable (Actions credits), so as before:
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace→ 401 passed, 0 failedx86_64-pc-windows-gnu, clippy-D warnings) cleanPosel,WM_CLASS = com.starvy.posel, the emptystate reads
Press Ctrl+Enter to send, and resizing to 500x400 clamps to 1000x640 with thefooter intact