Skip to content

Fix slider knob stopping short of the track end - #9345

Merged
omarchybot merged 2 commits into
omacom:quattrofrom
erikrjohansson:fix/slider-knob-reaches-track-ends
Oct 29, 2026
Merged

omarchybot merged 2 commits into
omacom:quattrofrom
erikrjohansson:fix/slider-knob-reaches-track-ends

Conversation

@erikrjohansson

Copy link
Copy Markdown
Contributor

At 100% a slider still shows a bit of track past the knob, so it never quite looks finished.

The knob is kept inside the track, but the ticks and the fill are laid out across the track's full width, so the two don't agree at the ends. This measures them the same way and insets the track by half a knob, letting the knob sit at the very end without leaving the control.

slider-knob-before-after

It's the shared slider, so this covers display brightness, text size, audio volume and the per-app mixer.

The knob was kept inside the track while the ticks and fill spanned its full
width, so a slider at 100% still showed track past the knob.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@atrawog

atrawog commented Sep 1, 2026

Copy link
Copy Markdown

🧪 charly evaluation — PR #9345

Verdict: ✅ PASS@tier2 (venue L2 = VM, software GPU) · branch head cf9b16e2 · base b686ed89 · 2026-09-01T21:10Z

🔎 Stale if the PR head is no longer cf9b16e2 — re-run before trusting. I am an automated
harness evaluation, not a maintainer review; I ran charly's own consequence checks on a
disposable VM bed (check-omarchy-pr-vm-visual), not upstream's shell.d mocks.

Tier Result Key evidence
0 · triage QML visual class → visual lane 1 file: shell/Ui/PanelSlider.qml
1 · headless suite ✅ green — 9/9 steps (4 passed, 0 failed, 5 skipped) summary.yml
2 · VM L2 (soft-GPU) ✅ desktop up — hyprland running, omarchy bar onscreen, non-uniform screenshot (1.2 MB) candidate.png
3 · claim check “slider knob reaches track end” — capture succeeded; ADE visual grade not bound in this run (agent step skipped) below
4 · hardware ⛔ not reached — outside bed scope for this class —
🖼️ Candidate capture (PR #9345, head cf9b16e)

candidate
In-guest wl: screenshot on the disposable VM (check-omarchy-pr-vm-visual). Artifacts branch runs/pr-9345-cf9b16e2.

📓 Failing-output only (collapsed)
9 steps: 4 passed, 0 failed, 5 skipped (skips = verify-only mutating steps + the unbound agent grade)

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)

@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

Reviewed at cf9b16e, and the fix holds.

The problem is real on quattro. I rendered PanelSlider from quattro on a disposable VM built from the Omarchy ISO and measured it. The knob was clamped half a knob inside each end, but the fill and tick marks weren't. So at 0% and 100% the fill end sits 7px from the knob's centre, the knob doesn't move between 0% and 2% or between 98% and 100%, and it never lines up with the first or last tick of the text-size slider. With this change the fill end matches the knob's centre at every value tested (0, 2, 25, 50, 75, 98 and 100%), and the knob sits on the first and last tick. With the fix reverted, the mismatch comes back. The pointer now maps to the same inset track, so the knob stays under the cursor while dragging near the ends.

Tests on the same VM: ./test/cli passes. The shell was relinked onto this branch, and ./test/shell passes 219 of 221 files. The two failures, ascii-test.sh and branding-about-animation-test.sh, fail the same way on current quattro and have nothing to do with the slider. The callers (audio output, input and per-app sliders, display brightness and text size, the dev gallery) don't depend on the track spanning the full width. The diff is the size of the problem.

No second opinion. The configured reviewer (Codex Medium) answered a ping, but this run had used up its daily review allowance, so this review is one model's alone.

Overlaps: #10274 and #13212 change the same MouseArea, and #6467, #10915 and #13120 change other parts of this file. None of them fixes this, but whichever lands second will need a rebase.

Waiting on the maintainer.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 14, 2026
quattro taught PanelSlider to mirror in right-to-left layouts through trackX(), which collided with this branch's knobCenter. trackX() now measures from the inset track's own x, so the knob, the ticks and the pointer share one mapping in both directions, and knobCenter goes away because it ignored mirroring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 14, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This branch stopped merging after quattro taught PanelSlider to mirror in right-to-left layouts (#15326), which rewrote the same knob, tick and pointer lines. I merged quattro into it (3f03951) rather than rebasing, so your commit is unchanged. The resolution keeps both: trackX() now measures from the inset track's own x, so the knob, the ticks and the pointer all go through one mapping in either direction. knobCenter is gone because it didn't flip when mirrored. Against quattro the diff is still this one file and the same size as before.

Checked again on a disposable VM built from the Omarchy ISO, rendering PanelSlider at 0, 2, 50, 98 and 100%, left-to-right and mirrored. On quattro the fill end sits up to 7px from the knob's centre at either end, in both directions. On this head it's 0 at every value, and the first and last ticks of a 7-step slider sit under the knob at its minimum and maximum. A press anywhere on the track maps back to the value drawn there, mirrored included. Reverting the fix on this head gives quattro back, so the quattro run doubles as the reverted run. With the worker's shell running this branch, ./test/cli passes, and so do the audio, monitor, i18n and plugin-manifest shell tests. No QML warnings from the slider.

Second opinion: Codex Medium reviewed the merged head and found no defects. It agreed that mirroring, the callers (audio, monitor, dev gallery) and the bounds all hold, and that the diff is the size of the problem. It had my notes in front of it, so this isn't guaranteed to be independent agreement. The earlier review on cf9b16e had no second opinion. This one did.

#10274, #13212, #6467, #10915 and #13120 still touch this file without fixing this bug, so whichever lands second will need the same kind of merge.

Waiting on the maintainer.

@omarchybot
omarchybot merged commit 0ba7646 into omacom:quattro Oct 29, 2026
1 check passed
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
The knob was kept inside the track while the ticks and fill spanned its full
width, so a slider at 100% still showed track past the knob.

Co-authored-by: Erik Johansson <172146456+ejuro@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
(cherry picked from commit 0ba7646)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants