Repository navigation
omamobile-shell 0.2.107: Grok Bot fits the phone's screen - #542
Conversation
Grok Bot (grok-bot from [omarchy], x.ai's agent, an Electron app) sets a minimum window size of 512x520 (SAND_MIN_WINDOW_SIZE in its main process). The Pixel 7 Pro is 480 px wide in logical pixels, so the app laid itself out 512 px wide inside a 480 px window and ran off the right edge: the ends of messages, the header buttons and the composer's microphone were cut off. Chromium had the same problem and setup-user gives it --force-device-scale-factor=0.83. setup-user now does the same for Grok Bot, whose launcher reads ~/.config/grok-bot-flags.conf. The factor comes from the panel's mode (the DSI connector in /sys/class/drm) and the monitor scale setup-user seeds, so the layout gets about the 578 px Chromium gets on the 7 Pro: 0.83 on the 7 Pro (480 px), 0.70 on the 9a (405 px), 0.62 for a 1080 px panel at scale 3 (360 px), where 0.83 would leave 434 px, still under 512. With no readable mode it falls back to 0.83. Once, and a factor the user's file already has stays theirs. Tested on a Pixel 7 Pro (Omarchy 4.5.0-3, omamobile-shell 0.2.100): the factor by hand made the window fit (screenshots before and after); the new step, run alone on the phone against a scratch home, read 1440x3120 and wrote 0.83. test/setup-user.sh covers the 7 Pro, the 9a, a 1080x2400 panel, no mode, a user's own factor and two logins; its first new check fails against the old script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTVicoVA5YdXzobkXGujF9
|
Thanks, Jeremy, this is a tidy fix, and I appreciate that you ran both the factor and the new step on your 7 Pro and kept your conversations out of the screenshots. I checked the two facts it rests on in Omarchy's signed grok-bot package (0.78.3): the launcher does read One thing I'll fix at merge: main shipped omamobile-shell 0.2.107 with #420 after you branched, and your version file makes the same 0.2.106 → 0.2.107 change, so git merges it without a conflict and the package would keep a version that's already published. I'll set the next free number (likely 0.2.110, after #553 and #557) in the file and the title when I merge. A small note, no change needed: the width comes from the scale the script would seed, not the user's own And yes, I'd welcome the same panel-based factor for Chromium as a follow-up. |
) * omamobile-shell 0.2.107: Grok Bot fits the phone's screen Grok Bot (grok-bot from [omarchy], x.ai's agent, an Electron app) sets a minimum window size of 512x520 (SAND_MIN_WINDOW_SIZE in its main process). The Pixel 7 Pro is 480 px wide in logical pixels, so the app laid itself out 512 px wide inside a 480 px window and ran off the right edge: the ends of messages, the header buttons and the composer's microphone were cut off. Chromium had the same problem and setup-user gives it --force-device-scale-factor=0.83. setup-user now does the same for Grok Bot, whose launcher reads ~/.config/grok-bot-flags.conf. The factor comes from the panel's mode (the DSI connector in /sys/class/drm) and the monitor scale setup-user seeds, so the layout gets about the 578 px Chromium gets on the 7 Pro: 0.83 on the 7 Pro (480 px), 0.70 on the 9a (405 px), 0.62 for a 1080 px panel at scale 3 (360 px), where 0.83 would leave 434 px, still under 512. With no readable mode it falls back to 0.83. Once, and a factor the user's file already has stays theirs. Tested on a Pixel 7 Pro (Omarchy 4.5.0-3, omamobile-shell 0.2.100): the factor by hand made the window fit (screenshots before and after); the new step, run alone on the phone against a scratch home, read 1440x3120 and wrote 0.83. test/setup-user.sh covers the 7 Pro, the 9a, a 1080x2400 panel, no mode, a user's own factor and two logins; its first new check fails against the old script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTVicoVA5YdXzobkXGujF9 * omamobile-shell 0.2.108: renumber above main's 0.2.107 (derekross#420) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Derek Ross <derekross@gmail.com>
What and why
Grok Bot (
grok-botfrom[omarchy], x.ai's agent, an Electron app) runs off the right edge of the phone's screen. Its main process sets a minimum window size of 512x520 (SAND_MIN_WINDOW_SIZE), and the Pixel 7 Pro is 480 px wide in logical pixels. Hyprland gives the window 480x996, but the app lays itself out 512 px wide, so the right 32 px are cut off: the ends of messages, the header's buttons, and the composer's microphone. Chromium has the same problem, andomamobile-setup-useralready gives it--force-device-scale-factor=0.83(AGENTS.md, Userspace).This adds the same step for Grok Bot. Its launcher (
/usr/bin/grok-bot) reads~/.config/grok-bot-flags.conf. The new step picks the factor from the panel's mode (the DSI connector in/sys/class/drm) and the monitor scalesetup-userseeds, aiming at the layout width Chromium gets on the 7 Pro (480 / 0.83 = 578 px):A single 0.83 wouldn't do it beyond the 7 Pro: on the 9a it leaves 488 px and on a 1080 px panel at scale 3 it leaves 434 px, both under 512. It runs once, a factor the user's file already has stays theirs, and other flags in the file are kept. I left out Chromium's
--wayland-text-input-version=3: the on-screen keyboard came up in Grok Bot's composer before any flags, so I had no reason to add it. AGENTS.md gets a line under the Chromium gotcha.Chromium's own step keeps its fixed 0.83. The same panel-based factor would suit it on the 9a and on 1080 px panels too, if you want that as a follow-up.
Device and build
uname -r): 7.3.0-rc6-omamobile-push1-g1cb4bd36f3beChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packagespasses, except omamobile-audio'salsa-lib control accesscheck ("nothing readable"). It fails on my laptop because the laptop's first sound card is its own Apple T2 audio, and this PR doesn't touch omamobile-audio.versionbumped, and the new version is in the commit subjectCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:test/setup-user.shcovers the 7 Pro (0.83), the 9a (0.70), a 1080x2400 panel (0.62), no readable mode (0.83), an external display's mode not being read, a user's own factor and flags kept, and the flags written once over two logins. Its first new check fails against the current script. The package'stest/all: 299 ok.On the phone
--force-device-scale-factor=0.83by hand in~/.config/grok-bot-flags.conf, then a restart of Grok Bot: the window fits (the full message width, the header's buttons and the microphone are all on screen), checked against screenshots from before and after. I'm not attaching them, because they show my own conversations./sys/class/drmand device tree: it read1440x3120fromcard2-DSI-1and wrote--force-device-scale-factor=0.83, the same factor as the hand-made file.omamobile-setup-user.serviceat a login, the 9a and 1080 px panels (unit test only), and whether 0.70 and 0.62 are comfortable to read there.userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/phone-smokereportphone-smoke: cheetah
Kernel
7.3.0-rc6-omamobile-push1-g1cb4bd36f3be, tools at20790a8, 2026-11-08T21:51Z.Packages: hyprland 0.57.0-3.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.13-1, omamobile-device-cheetah 0.1.44-1, omamobile-fingerprint 0.1.15-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-modem 0.1.16-1, omamobile-omarchy 0.1.36-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.100-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1
🤖 Generated with Claude Code
https://claude.ai/code/session_01TTVicoVA5YdXzobkXGujF9