Skip to content

fix(apps): audit-3 surgical batch (#33) - #37

Merged
Xuepoo merged 2 commits into
mainfrom
carryctx/web-0037-audit3-fixes
Aug 25, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
carryctx/web-0037-audit3-fixes

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Closes #33.

Audit-3 surgical fixes (audit WEB-0036):

  1. Paint Clear was dead code — clear descriptor sat in the swatches palette so the color hit-test matched it first; Clear now standalone, strokes actually clear, empty currentColor unreachable.
  2. Restore-under-cursor unclamped — dragging a maximized window's titlebar restored off-screen (x=-107.75 measured); one-shot gesture-end re-clamp armed on maximize→restore transitions, bounded to live pointer gestures (keyboard/taskbar restores re-clamp immediately; mid-gesture close cleans up).
  3. N/NW/NE resize was unreachable — drag handle spanned the full titlebar absorbing the 6px resize rim; handle's isPointInside now yields the rim on resizable windows (DEC-0023: engine resets handle geometry every applyGeom, so predicate patch is the stable seam). Maximized/dialog keep full-handle restore-drag.
  4. Files inner list viewport hardcoded 150px — binds to window content height (min 120px floor).
  5. Browser address bar select-on-focus — typing now replaces instead of appending (standard URL-bar pattern).

Gates: 183 pass / 0 fail · tsc · oxlint · oxfmt repo-wide · build. Review: APPROVE (2 LOW findings fixed in 794fcf8).

Xuepoo added 2 commits August 25, 2026 13:29
- 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.
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.
@Xuepoo
Xuepoo merged commit 91ea42c into main Aug 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit-3 surgical fixes: Paint clear, N-rim resize, restore clamp, Files list height, address-bar select-on-focus

1 participant