Repository navigation
fix(desktop): shrink-clamp escaping windows and refit maximized on work-area change (#30) - #34
Merged
Merged
Conversation
…rk-area change (#30) Viewport/DPR changes stranded windows outside the reachable work area (audit WEB-0038). Three compensations for engine gaps filed upstream in vectojs-docs forge/findings (commit 794340f): - clampRect in model/window-geometry mirrors the engine's DisplayLayout.clampRect shrink-then-pin semantics (with optional min floors): a position-only clamp left windows taller/wider than a shrunken work area stranded past the bottom/right forever (4/5 windows outside at 568x315). - fit() re-applies maximize after shell.resize so maximized windows track the new work area instead of keeping their stale pre-shrink box (E1, measured 1280x760 in a 568x355 viewport). - every window-manager event re-runs the clamp so restore()'s stale pre-maximize box is pulled back inside immediately (E2).
…area (#30) Review round PX-0159..0163 on WEB-0038: - Restrict the window-manager stream clamp to "state" events (clampWindowsOnEvent): engine drag deliberately parks windows mostly off-screen (titlebar + 48px visible, Window.clampMovePosition), so an unrelated open/focus/close event must not yank them back on-screen. Restore/un-minimize still emit "state" and keep the E2 stale-box correction. - Cover the zero-height work-area edge: clampRect floors to a 1px box pinned at area.y, the documented DEC-0021 app-side deviation from the engine's applyGeom re-flooring. - Dist contract: pin the drag-parking permission so an engine change that forbids parking surfaces here before the event gate is relaxed. Rebased onto origin/main 8689e79 (#31): guardTaskbar dropped (the WebOS-owned taskbar self-subscribes to the wm stream), refitMaximized kept in fit(), and the per-era setTaskbar sync composes with the work-area clamp unchanged (applyTheme re-clamps after setTaskbar). Restores oxfmt-canonical single-quote formatting in main.ts and window-geometry.test.ts after an external editor session re-saved them with Biome defaults.
Xuepoo
added a commit
that referenced
this pull request
Aug 25, 2026
* fix(apps): audit-3 surgical batch (#33) - Paint: Clear hit-tested standalone; it was swallowed by the swatch find, so clicks never cleared and set currentColor=''. The palette now holds colors-only swatches. - Windows: re-open the N/NW/NE resize rim above the titlebar drag handle via an instance hit-test predicate that survives engine applyGeom; maximized/dialog keep the full handle for restore-drag. - Shell: one-shot work-area re-clamp of just-restored windows on gesture end - the engine drops the restored box under the cursor unclamped; WEB-0038's clampWindowsToWorkArea untouched. - Files: inner list viewport binds to the window client height with a 120px floor instead of a fixed 150px strip. - Browser: address bar selects its text on focus so typing replaces. * fix(desktop): bound restore re-clamp to live pointer gestures (#33) Audit review follow-up (LOW 1 + LOW 2, notes PX-0185..0193), rebased onto origin/main b326ef9 (WEB-0038 #34): - Keyboard/taskbar restores no longer leave an armed pendingRestoreClamp that would fire at an arbitrary later pointerup anywhere. A document- level gesture flag arms deferral only while a pointer is actually down; restores arriving outside a gesture re-clamp immediately. The flag resets before reclamp's empty-pending early-return so it cannot wedge true. - A window closed mid-gesture is dropped from both trackers on the wm close event, so the next pointerup can never setGeometry a destroyed instance. - Rebase kept both window-manager handlers (WEB-0038's gated shrink clamp and this branch's chrome/arming handler are independent) and restored the clampPosition import the auto-merge silently dropped. Covered by three smoke tests: pointer restore still waits for gesture end (via pointercancel), keyboard restore consumes its clamp at arm time, and a mid-gesture close produces zero geometry writes on the dead instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #30.
DPR/display-change window stranding fixes (audit WEB-0038):
clampRect(shrink-then-pin, engineDisplayLayout.clampRectsemantics + DEC-0021 min-floor deviation) insrc/model/window-geometry.ts;clampWindowsToWorkAreadelegates viasrc/desktop/window-refit.ts— oversized windows now SHRINK to the work area instead of overflowing bottom/right forever.fit()refits maximized windows aftershell.resize(compensates engine E1: DesktopShell.resize leaves maximized boxes stale).stateevents only (restore/un-minimize) — focus/open/close never yank user-parked partially-off-screen windows (engine drag permits titlebar+48px visible parking).Gates: 163 pass / 0 fail · tsc · oxlint · oxfmt (repo-wide) · build · review round + 3-finding fix round complete.