Repository navigation
fix(pwa): keep the image and diagram previews' bar clear of the title bar area (#2026) - #2381
Conversation
… bar area (#2026) In the installed app with the title bar folded away (Window Controls Overlay), the image and Mermaid previews placed their top bar at space-3 from the top, inside the title bar band. The browser's window controls covered the right-hand buttons (an upper-half click on the close button closed the whole app), and the header's app-region: drag stayed active under the preview, so a press on the bar's zoom readout dragged the window. Under display-mode: window-controls-overlay, both previews now opt out of the drag region on their scrim, and the bar starts below env(titlebar-area-*); the fitted picture keeps the same room clear of it.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 36 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Agent reviews of this PR (on the diff before the push), with how each finding was resolved: omo-native-code-reviewer (Claude Opus): approve, no HIGH or MEDIUM.
Codex (gpt-6.1-sol, fast, xhigh):
Checks on the pushed head 07f040a: |
|
Merging 07f040a (closes #2026, thanks @Hyd3-14 for the precise report and root-cause analysis; the fix is the one the issue proposed). In the installed app with the title bar folded away (Window Controls Overlay), the image and Mermaid previews' top bar sat inside the title bar band: the window's own controls took clicks on its right-hand buttons (a click on ✕ could close the app window) and the header's drag region dragged the window from the zoom readout. Under display-mode: window-controls-overlay only, both previews now opt out of dragging and start their bar below the band (the image keeps the same room clear); other display modes are unchanged. Reproduced on main in the Windows VM; reviewed by the merge pass (CSS only, plus src/styles-wco.test.ts). |
## Release 0.4.21 The release PR, prepared by step 1 of [docs/development.md#releasing](https://github.com/devswha/ovis/blob/main/docs/development.md#releasing), now re-folded on main `1ef6ea329108a0985b823e8235b03daddcd0a5f4` after the owner held 0.4.21 for more work. The merge pass reported the 0.4.21 queue empty. **Do not merge yet:** the owner judges the final build before release. No tag and no Release run from this PR's author. - **Version:** `version` is 0.4.21 in `package.json` and `herdr-plugin.toml`. - **Changelog:** `bun scripts/changelog-fold.ts 0.4.21 2026-10-30` folded 63 fragments into the 2026-10-30 section of `CHANGELOG.md` (71 entries), linked their PRs and deleted the fragments; `changelog.d` holds only `README.md`. - `by @login` on every outside contributor's PR link: #2361 @eddieparc, #2333 @IdrisGit, #2355 @imurfutur3, #2341 @sulthonzh, #2359 @YuuuXie, #2377 @IdrisGit, #2269 @CharleoYang, #2405 @jpcarranza94, #2414 @homebodify, #2417 @cheol-95, #2418 @eddieparc, #2435 @cheol-95. - Two outside PRs had no fragment and got an entry by hand: #2341 (OpenCode background commands, Added) and #2359 (installer test timing, Maintenance). - Issue reporters are credited in their entries: @blaker3115-Agri (#1488), @Hyd3-14 (#2026), @osamahbeig (#2343), @Shunamxiao (#2329), @matiemer (#2362), @kilhyeonjun (#2344), @eddieparc (#2360), @Ploppy3 (#2236), @sulthonzh (#2340), @WOULDU-pres (#2056), @odfalik (#2038), @aNNdii (#511), @Noobear (#2281, fixed by #2424); #2435 fixes @cheol-95's own #2434. - Two fragments ran past the changelog's width (#2418, #2269); their entries are re-wrapped, words unchanged. #2382's entry reads "OpenCode's installer puts its folder first" (reviewed earlier on this PR). - Maintainer PRs without a fragment and without a user-facing change have no entry: #2353 (check tool), #2371 (guide docs), #2396 and #2397 (tests), #2403 and #2433 (server and client transport seams, no behaviour change), #2437 (test-only fix for #2435's check). #2438's own entry (the sidebar selection marked by its fill again) is dropped: the stroke #2352 added never shipped, so users see no change; #2352's entry keeps only the Windows high-contrast Highlight bar. - **Release summaries:** en, ko, ja and zh each have 5 new, 5 improved and 5 fixed lines. Since the first review: New lists the in-browser Claude Code / Codex sign-in (#2428) in place of the tab/workspace shortcut line; Improved lists Settings → Agents (#2427) in place of the sidebar fold line; Fixed lists the Codex wrong-session fix (#2426, #2430) in place of the phone screenshot paste line. The Artifacts and Claude status-line lines keep their reviewed wording (turned on in Settings). Not in 0.4.21: #2420 (Codex chat behind Kiro), #2065 (Portal sign-in) and #2436 (relay foundations) stay open for a later release. - **Remote bundle:** `REMOTE_BUNDLE_VERSION` rises from 39 to 40 because the bundle inputs (`server/`, `shared/`, `patches/`) changed since remote-v39. After merge: push `remote-v40` on the merged commit and wait for the Remote PC bundles workflow before running Release. - **iOS:** `CURRENT_PROJECT_VERSION` stays 3 (#2370 changed `Info.plist`; build 3 is not known to be uploaded yet). ## Validation - `bun scripts/release-guards.ts --base v0.4.20`: "Release 0.4.21: remote bundle, telemetry Worker and release metadata are in order." - `dori heavy … bun run check fast` on this branch: workflow syntax, generated types and themes, typecheck, build, unit tests all ok. Unit: 9166 pass, 0 fail, 36 skip in 591 files. - Every PR in `v0.4.20..main` was pre-run for the owner's hands-on guide on isolated copies (own herdr session, fresh state, never the owner's live session). Items that need a real device (iPhone tap dictation #2370, dictation keyboards #2386, the installed desktop app's title-bar overlay #2381) are left for the owner's final check. This is a release-metadata PR: it changes no code path. Per the release steps, merge it after CI and the owner's go, then push `remote-v40`, wait for its bundles, and run Release with `0.4.21`.
Closes #2026. Thanks @Hyd3-14 for the precise report and root-cause analysis: the fix is the one the issue proposed.
Change
In the installed app with the title bar folded away (Window Controls Overlay), the image preview's and the Mermaid preview's top bar sat at
space-3from the top, inside the 33px title bar band. Two things took the clicks there (reproduced on main in winvm, comment):.app-header'sapp-region: drag(the WCO block insrc/styles.css) stayed active under the full-screen preview, so pressing the bar's zoom readout dragged the window.Under
@media (display-mode: window-controls-overlay),ImageLightbox.cssandMermaidLightbox.cssnow:app-region: no-drag, which cancels the header's drag region while a preview is open (Chromium subtracts no-drag rectangles from the drag region);top: calc(var(--space-3) + env(titlebar-area-y, 0px) + env(titlebar-area-height, 0px));max-height, so the picture stays centred clear of the bar. The Mermaid canvas keeps its inset: its zoom anchors are stage points, so moving the canvas would make a zoom drift further (review finding, below).Outside WCO,
env(titlebar-area-*)falls back to 0, and the rules apply only in that display mode anyway, so the browser tab, phones and the other installed modes are unchanged.Design reference: this follows Chromium's Window Controls Overlay guidance (keep interactive content inside
env(titlebar-area-*)or below it, and mark itno-drag). The Codex, Claude, Paseo and T3 Code apps have no installed-PWA title bar overlay to copy.Validation
src/styles-wco.test.ts: one new test per preview (the scrim isno-drag, and the bar'stopusesenv(titlebar-area-y/height)). Both failed on main ("no @media (display-mode: window-controls-overlay) block in ImageLightbox.css / MermaidLightbox.css") and pass now. Moving the offset offtopfails the image test again.bun run check fast: workflow syntax, generated files, typecheck, build, unit tests (8679 pass, 0 fail).display-mode: window-controls-overlaymatched, title bar area0,0 772x33. Every click and drag was a real OS mouse event:Reviews
top.Not in this PR (LOW, not reproduced)
.modal-scrimno-dragwould cover it.