Skip to content

fix(ui): platform-correct shortcut hints, window identity, and narrow-window overlap - #4

Merged
starvy merged 2 commits into
mainfrom
fix/cross-platform-polish
Jul 21, 2026
Merged

fix(ui): platform-correct shortcut hints, window identity, and narrow-window overlap#4
starvy merged 2 commits into
mainfrom
fix/cross-platform-polish

Conversation

@starvy

@starvy starvy commented Jul 21, 2026

Copy link
Copy Markdown
Owner

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+Enter off-mac and the command
palette used it correctly; these three sites bypassed it. Now routed through it.

(The Send button's ⌘↵ is already cfg!(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

WindowOptions set no title and no app_id, so Linux WMs showed "Unnamed Window" in the
taskbar and alt-tab, and couldn't match the window to its .desktop entry for the icon. Both set
now. Side benefit: the window is finally addressable by name for UI automation — previously
xdotool search --name matched the X root window instead.

3. Response footer overlapped itself on a narrow window

window_min_size was unset, so the window could be dragged small enough that the footer's
200 OK · 152 ms · 1.2 KiB painted over the Pretty/Raw/Wrap toggles instead of clipping.

Two fixes, because neither alone is sufficient:

  • The metrics group now clips. min_w_0 lets a flex item shrink but does not stop its text
    painting 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.
  • A 1000x640 floor. Verified clean at exactly the floor and visibly cramped below it; the
    side-by-side layout simply needs that much width for the footer and both tab strips.
before after
880px footer ● 20 overprinted by Pretty Raw Wrap, KiB colliding can't get there; clean at the 1000px floor

4. Demo re-recorded

The README GIF captured the pre-fix UI, so it showed Press ⌘↵ to send. Re-shot against the fixed
build; 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 --workspace401 passed, 0 failed
  • Windows cross-compile (x86_64-pc-windows-gnu, clippy -D warnings) clean
  • Verified live under Xvfb: window title now Posel, WM_CLASS = com.starvy.posel, the empty
    state reads Press Ctrl+Enter to send, and resizing to 500x400 clamps to 1000x640 with the
    footer intact

starvy added 2 commits July 21, 2026 17:52
…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.
@starvy
starvy merged commit b741eb6 into main Jul 21, 2026
0 of 3 checks passed
@starvy
starvy deleted the fix/cross-platform-polish branch July 21, 2026 17:56
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