Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(jarvisbar): narrow both pills per maintainer calibration round 2
Ruben Lütkedc4170f2ae54
diff --git a/jarvis/ui/jarvisbar/renderer.py b/jarvis/ui/jarvisbar/renderer.pyindex 5a5150f50e..894f448e49 100644--- a/jarvis/ui/jarvisbar/renderer.py+++ b/jarvis/ui/jarvisbar/renderer.py@@ -58,7 +58,7 @@ MUTED_RED = (220, 80, 72)_SCALE = 0.30 # overall size (was 0.336; -10% per maintainer feedback)_W = 0.8 # 20% narrower than the uniform _SCALE_H = 1.2 # taller than the uniform _SCALE (was 1.5; -20% per feedback)-_IDLE_W = 1.2 # standby pill length — a touch longer so the standby dots fit+_IDLE_W = 1.08 # standby pill length (was 1.2; -5% per side, maintainer 2026-07-21)_IDLE_H = 0.7 # standby pill is slimmer (less "fat") than the active height_SW = _SCALE * _W # combined horizontal factor_SH = _SCALE * _H # combined vertical factor@@ -114,14 +114,14 @@ def compute_display_scale(screen_w: int, screen_h: int) -> float:# time a voice session is live (listen/speak/think). This is the# "make the bar much bigger while talking" feature.# Conversation pill: 2x the open pill, then trimmed so it doesn't read as bulky.-# Width loses 13% off EACH side (→ 0.74 of 2x); height loses 22% off top AND-# bottom (→ 0.56 of 2x) — the live pill grows mainly in LENGTH and stays slim.-# Calibrated against the maintainer's good-example screenshot (2026-07-21):-# the previous 0.90-of-2x height rendered the live pill 29 px thick on the-# 2560x1440 monitor and was judged "way too big" next to the 18 px example;-# these trims land it at 86x18 there (example: 85x18). The pill stays centred,-# so the idle bar keeps its middle resting spot.-_ACTIVE_SIDE_TRIM = 0.13 # fraction removed from each side of the 2x width+# Width keeps 0.518 of 2x; height keeps 0.56 of 2x — the live pill stays slim+# and only moderately longer than the hover pill. Calibrated in two maintainer+# rounds (2026-07-21): the height trim killed the "way too big" 29 px+# thickness (target example: 18 px); the width then still read "much too+# wide" at 86 px on the 2560x1440 monitor, and the maintainer asked for 15%+# off each side → 0.74 * 0.70 = 0.518 of 2x (~60 px there). The pill stays+# centred, so the idle bar keeps its middle resting spot.+_ACTIVE_SIDE_TRIM = 0.241 # fraction removed from each side of the 2x width_ACTIVE_VERT_TRIM = 0.22 # fraction removed from top and bottom of the 2x height# The pill is anchored by its BOTTOM edge this many px above the window bottom,@@ -147,7 +147,7 @@ def apply_display_scale(scale: float) -> None:COLLAPSED_H = round(30 * _SH * _IDLE_H * s) # standby pill (slim)OPEN_W = round(284 * _SW * s) # hover/controls pill (the former "expanded")OPEN_H = round(52 * _SH * s)- ACTIVE_W = round(2 * OPEN_W * (1.0 - 2 * _ACTIVE_SIDE_TRIM)) # 2x * 0.74+ ACTIVE_W = round(2 * OPEN_W * (1.0 - 2 * _ACTIVE_SIDE_TRIM)) # 2x * 0.518ACTIVE_H = round(2 * OPEN_H * (1.0 - 2 * _ACTIVE_VERT_TRIM)) # 2x * 0.56_BOTTOM_PAD = max(4, round(_BASE_BOTTOM_PAD * s))# The fixed Tk window must contain the largest (ACTIVE) pill + its 2pxdiff --git a/tests/unit/ui/jarvisbar/test_display_scale.py b/tests/unit/ui/jarvisbar/test_display_scale.pyindex 13e39f290d..74274cbd7b 100644--- a/tests/unit/ui/jarvisbar/test_display_scale.py+++ b/tests/unit/ui/jarvisbar/test_display_scale.py@@ -70,17 +70,18 @@ def test_invalid_screen_degrades_to_the_approved_ceiling():# apply_display_scale ## --------------------------------------------------------------------------- ## The geometry baseline — scale 1.0 must reproduce these byte-identically-# (regression guard for the signed-off proportions). ACTIVE/WIN reflect the-# slimmer conversation pill calibrated 2026-07-21 (86x18 on the maintainer's-# 0.85-scaled monitor, matching the 85x18 good-example screenshot).+# (regression guard for the signed-off proportions). ACTIVE/WIN/COLLAPSED+# reflect the two 2026-07-21 maintainer calibration rounds: slim active+# height (18 px on the 0.85-scaled monitor), then -15% per side off the+# active width (~60 px there) and -5% per side off the idle width (~37 px)._HISTORICAL = {- "COLLAPSED_W": 48,+ "COLLAPSED_W": 44,"COLLAPSED_H": 8,"OPEN_W": 68,"OPEN_H": 19,- "ACTIVE_W": 101,+ "ACTIVE_W": 70,"ACTIVE_H": 21,- "WIN_W": 113,+ "WIN_W": 82,"WIN_H": 35,}diff --git a/tests/unit/ui/jarvisbar/test_renderer.py b/tests/unit/ui/jarvisbar/test_renderer.pyindex 1b48b123c1..ef0bf59adc 100644--- a/tests/unit/ui/jarvisbar/test_renderer.py+++ b/tests/unit/ui/jarvisbar/test_renderer.py@@ -110,13 +110,15 @@ def test_core_radius_breathes_within_bounds():def test_core_drifts_instead_of_being_pinned():# The user called a position-fixed core "starr" twice — the whole reactor- # must float. The drift has to be clearly visible (several px on the- # ACTIVE pill) within a short thinking phase (~3 s).+ # must float. The drift has to be clearly visible within a short thinking+ # phase (~3 s). Visibility is RELATIVE to the pill (the drift amplitude is+ # a fraction of the pill size), so the floor scales with the pill width+ # instead of pinning the absolute pixels of one historical geometry.pw, ph = float(R.ACTIVE_W), float(R.ACTIVE_H)points = [R.core_drift(t, pw, ph) for t in (0.0, 1.0, 2.0, 3.0)]xs = [p[0] for p in points]ys = [p[1] for p in points]- assert max(xs) - min(xs) >= 2.0 # visibly moves horizontally within 3 s+ assert max(xs) - min(xs) >= 0.02 * pw # visibly moves horizontally in 3 sassert max(ys) - min(ys) >= 0.8 # and vertically@@ -297,13 +299,12 @@ def _grow_settle(mode, *, hovered=False, frames=120):def test_active_conversation_pill_size_vs_open_pill():# During a conversation the pill is 2x the hover-open pill, then trimmed to- # feel less bulky: 13% off each side (→ 0.74 of 2x width) and 22% off top- # and bottom (→ 0.56 of 2x height — the live pill grows mainly in LENGTH,- # calibrated to the good-example screenshot 2026-07-21). Centred, so the- # idle bar stays in the middle.+ # feel less bulky: width keeps 0.518 of 2x, height keeps 0.56 of 2x (two+ # maintainer calibration rounds 2026-07-21 — slim AND narrow). Centred, so+ # the idle bar stays in the middle.active = _grow_settle("speak")open_pill = _grow_settle("idle", hovered=True)- assert active._st.pw == pytest.approx(2 * 0.74 * open_pill._st.pw, rel=0.05)+ assert active._st.pw == pytest.approx(2 * 0.518 * open_pill._st.pw, rel=0.05)assert active._st.ph == pytest.approx(2 * 0.56 * open_pill._st.ph, rel=0.05)