fix(hud): keep the "End session" confirm popover on-screen (#97) #101

Merged
albert merged 2 commits from u/albert/97/hud-popover-clipped into main 2026-07-19 06:15:01 +00:00
Owner

The prompt is a Popover parented to the action button, the rightmost
widget of the right-aligned HUD bar. With no explicit placement GTK
centered it horizontally on the button, pushing half of it past the
right screen edge; under gtk4-layer-shell + sway an oversized popup is
not slid back on-screen, so it clipped. The XWayland HiDPI counter-scale
enlarges the popover, making the overflow bigger and the bug more
visible (hence "occasionally").

Give the popover PositionType::Bottom (a top bar has unlimited room
below) and, at popup() time, right-align it to the button by shifting
its center left by (popover_width - button_width)/2 — landing its right
edge on the button's right edge, fully on-screen, without relying on any
compositor slide-to-fit. Width is measured from the content Box (a
GtkPopover reports ~0 before it is mapped) plus the scale-aware chrome.

Reproduced and verified headlessly at HiDPI factor 1.5 and the normal
factor 1.0; see docs/ai/history/2026-07-19 001.

Also documents the headless harness's dev-click limitation in the
headless-dev skill, and notes a preference for in-repo docs over private
agent memory in AGENTS.md.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01S4naZNwEpnVCF71D1Huhe4

Fixes #97

The prompt is a Popover parented to the action button, the rightmost widget of the right-aligned HUD bar. With no explicit placement GTK centered it horizontally on the button, pushing half of it past the right screen edge; under gtk4-layer-shell + sway an oversized popup is not slid back on-screen, so it clipped. The XWayland HiDPI counter-scale enlarges the popover, making the overflow bigger and the bug more visible (hence "occasionally"). Give the popover PositionType::Bottom (a top bar has unlimited room below) and, at popup() time, right-align it to the button by shifting its center left by (popover_width - button_width)/2 — landing its right edge on the button's right edge, fully on-screen, without relying on any compositor slide-to-fit. Width is measured from the content Box (a GtkPopover reports ~0 before it is mapped) plus the scale-aware chrome. Reproduced and verified headlessly at HiDPI factor 1.5 and the normal factor 1.0; see docs/ai/history/2026-07-19 001. Also documents the headless harness's dev-click limitation in the headless-dev skill, and notes a preference for in-repo docs over private agent memory in AGENTS.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S4naZNwEpnVCF71D1Huhe4 Fixes #97
fix(hud): keep the "End session" confirm popover on-screen (#97)
All checks were successful
CI / Version harmony (pull_request) Successful in 30s
CI / Arch neutrality (pull_request) Successful in 33s
CI / ShellCheck (pull_request) Successful in 35s
CI / CI image (pull_request) Successful in 36s
CI / CI image (Android) (pull_request) Successful in 25s
CI / CI images (pull_request) Successful in 0s
CI / Warm cargo registry (pull_request) Successful in 44s
CI / Rustfmt (pull_request) Successful in 45s
CI / Android media (cargo-ndk build) (pull_request) Successful in 1m11s
CI / Android companion (unit tests) (pull_request) Successful in 1m25s
CI / Clippy (pull_request) Successful in 1m44s
CI / Build (pull_request) Successful in 2m58s
CI / Test (pull_request) Successful in 3m7s
CI / E2E (pull_request) Successful in 2m51s
CI / Firewall E2E (pull_request) Successful in 4m16s
CI / Package (.deb smoke build) (pull_request) Successful in 2m19s
884bf47bd8
The prompt is a Popover parented to the action button, the rightmost
widget of the right-aligned HUD bar. With no explicit placement GTK
centered it horizontally on the button, pushing half of it past the
right screen edge; under gtk4-layer-shell + sway an oversized popup is
not slid back on-screen, so it clipped. The XWayland HiDPI counter-scale
enlarges the popover, making the overflow bigger and the bug more
visible (hence "occasionally").

Give the popover PositionType::Bottom (a top bar has unlimited room
below) and, at popup() time, right-align it to the button by shifting
its center left by (popover_width - button_width)/2 — landing its right
edge on the button's right edge, fully on-screen, without relying on any
compositor slide-to-fit. Width is measured from the content Box (a
GtkPopover reports ~0 before it is mapped) plus the scale-aware chrome.

Reproduced and verified headlessly at HiDPI factor 1.5 and the normal
factor 1.0; see docs/ai/history/2026-07-19 001.

Also documents the headless harness's dev-click limitation in the
headless-dev skill, and notes a preference for in-repo docs over private
agent memory in AGENTS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4naZNwEpnVCF71D1Huhe4
chore: bump version to 0.2.1
Some checks failed
CI / CI images (pull_request) Has been cancelled
CI / Warm cargo registry (pull_request) Has been cancelled
CI / Build (pull_request) Has been cancelled
CI / Test (pull_request) Has been cancelled
CI / E2E (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Rustfmt (pull_request) Has been cancelled
CI / Package (.deb smoke build) (pull_request) Has been cancelled
CI / Firewall E2E (pull_request) Has been cancelled
CI / Android companion (unit tests) (pull_request) Has been cancelled
CI / Android media (cargo-ndk build) (pull_request) Has been cancelled
CI / CI image (Android) (pull_request) Has been cancelled
CI / Version harmony (pull_request) Has been cancelled
CI / ShellCheck (pull_request) Has been cancelled
CI / Arch neutrality (pull_request) Has been cancelled
CI / CI image (pull_request) Has been cancelled
ef73e7c3cc
Written across VERSION, Cargo.toml/Cargo.lock, and the webui package
manifests via `shepherd version set 0.2.1`; `shepherd version check`
passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4naZNwEpnVCF71D1Huhe4
albert merged commit a377fd01b4 into main 2026-07-19 06:15:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
albert/shepherd-launcher!101
No description provided.