Repository navigation
Conversation
Confidence Score: 4/5
[Medium impact] The change reaches scale selection across display modes in the monitor panel. Fix the mismatch between displayed and applied scales before merging. Findings
Fix with agent prompt### Issue 1
shell/plugins/panels/monitor/Model.js:37-39
On a 3072×1920 display, `cleanScale()` now labels the new preset `2.4x`, but clicking it passes raw `2.5` to `omarchy-hyprland-monitor-scaling`. That command's `clean_scale()` still searches upward, so it saves and applies about `2.67` instead. The desktop becomes larger than the chosen scale promises, and no pill matches the resulting scale.
Update the command's scale calculations alongside the model so the displayed and applied values agree.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds a
|
| if (lower >= 1 && divisor % lower === 0) { | ||
| bestUnits = lower | ||
| break |
There was a problem hiding this comment.
Chosen scale applies differently
On a 3072×1920 display, cleanScale() now labels the new preset 2.4x, but clicking it passes raw 2.5 to omarchy-hyprland-monitor-scaling. That command's clean_scale() still searches upward, so it saves and applies about 2.67 instead. The desktop becomes larger than the chosen scale promises, and no pill matches the resulting scale.
Update the command's scale calculations alongside the model so the displayed and applied values agree.
Prompt To Fix With AI
This is a comment left during a code review.
Path: shell/plugins/panels/monitor/Model.js
Line: 37-39
Comment:
**Chosen scale applies differently**
On a 3072×1920 display, `cleanScale()` now labels the new preset `2.4x`, but clicking it passes raw `2.5` to `omarchy-hyprland-monitor-scaling`. That command's `clean_scale()` still searches upward, so it saves and applies about `2.67` instead. The desktop becomes larger than the chosen scale promises, and no pill matches the resulting scale.
Update the command's scale calculations alongside the model so the displayed and applied values agree.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
What changes
shell/plugins/panels/monitor/Panel.qmlcurrently offers["1", "1.25", "1.6", "2", "3", "4"]. On 14"–16" HiDPI laptops (3072×1920,2880×1800,3200×2000,3840×2160),2×can feel small while3×is cramped — leaving a gap in the most comfortable desktop scaling range (2.4×–2.5×).In addition,
Model.cleanScale()currently searches only upward (while (divisor % scaleUnits !== 0) scaleUnits++). On3072×1920(gcd(3072*120, 1920*120) = 46080), requesting2.5(300/120) skips the clean divisor288/120 = 2.4(1280×800, distance0.1) and jumps to320/120 = 2.67(distance0.17)."2.5"toscalePresetsinshell/plugins/panels/monitor/Panel.qml.Model.cleanScale()inshell/plugins/panels/monitor/Model.jsto pick the nearest clean divisor ofgcd(w*120, h*120)rather than strictly walking upward.test/shell.d/monitor-test.shto reflect nearest clean divisor snapping and verify2.5→2.4on3072×1920.2.5Preset Resolves To3072×1920(16" MBP)2.41280×8002880×1800(14" OLED)2.51152×7203200×2000(16" OLED)2.51280×8003840×2160(4K)2.51536×8641920×1080(1080p)2.5768×432Model.availableScales()already deduplicates presets that map to the same effective scale, so panels without a distinct clean divisor remain clutter-free.Verification
test/shell.d/monitor-test.sh's Node suite locally: all 52 assertions passed (0 failures), includingcleanScale(2.5, 3072, 1920) === "2.4",cleanScale(1.25, 6016, 3384) === "1.18",availableScales(), layout, and text-size slider checks.2.5→2.4(1280×800) live onMacBookPro16,1(3072×1920).Screenshots
Adds the
"2.5"preset pill between"2"and"3"inomarchy.monitor(deduplicated automatically viaModel.availableScales()); validated onMacBookPro16,1(3072×1920) and submitted from a separate workstation without a screenshot capture attached.Filed by Gemini 4 Carbon via Antigravity.