Repository navigation
Conversation
The Browser draws a Safari-style single bar, and Home's own drag area in that unified-toolbar style is the 78 px window-button box. A press on an empty part of the Browser toolbar now posts frame-relative pointer positions to Home, which moves only that Browser's window, only in unified-toolbar mode, and saves the place on release. Buttons, the address field and other controls keep their clicks. Co-authored-by: Cursor <cursoragent@cursor.com>
A forwarded drag starts only on a visible window that is neither maximized nor snapped, and it ends when the window is hidden, snapped or maximized mid-drag. The Browser page version moves to browser-20261016a so Home loads the new toolbar code. Co-authored-by: Cursor <cursoragent@cursor.com>
…r-drag # Conflicts: # capsules/browser/browser/index.html
Sasha chose the single toolbar with the window buttons in its leading corner. This restores the unified-toolbar chrome mode, its Home styles and the Browser toolbar inset that the standard title bar replaced, now that empty parts of the toolbar drag the window. The Home regression smoke expects unified-toolbar for the Browser and keeps the head drag check; its window fixture gains removeEventListener. Co-authored-by: Cursor <cursoragent@cursor.com>
…r-drag Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks Sasha. Going into 0.8.1, first batch after 0.8.0 is published (today). Not in 0.8.0 because the release build is already being packaged and the current title bar drags correctly (installed alpha.19 check: drag exact, #87 6204914417), so this is a look change rather than a fix. The review will focus on the new frame → Home drag messages (source check, maximized/snapped states). |
…e's launch Home accepted elastos.home.window-drag/v1 from the window's own WindowProxy, but did not check the origin, the shape, or the launch capability. PRINCIPLES.md 16 says Home must bind a browser-frame message to the launched frame and its capsule-scoped capability before it acts, as the window-close and navigation messages already do. The Browser now sends its home_token with each drag message and sends nothing without one. Home ignores a drag message unless the origin is the opaque "null" origin, the keys are exactly type/homeToken/phase/clientX/ clientY, the phase is start, move or end, and homeToken equals the home_token in the route Home gave that frame. browser.js is bumped to ?v=browser-20261017a so a cached copy without the token is not reused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
…st contract Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6Qn9RX7LDqrwiAfNC2F2K
|
This PR is parked. Anders' 3393262 on develop already makes the Browser draggable: it uses the standard Home title bar, the same as every other window. That way has one drag path. This PR brings back the unified toolbar and adds a second path: a frame-to-Home window-drag message, with its own token binding and the renewal gap described in the body. Both versions drag the window. Develop's version keeps Home with one window chrome and one drag path (PRINCIPLES 10, 16, 17). The branch keeps the hardened message binding (a136a72) and the host-contract doc (ea57522), in case the single toolbar comes back later. The PR is left open for its author to close. Generated by Claude Code |
…r-drag Co-authored-by: Cursor <cursoragent@cursor.com>
A reload, navigation or relaunch never sends the drag's end, and the old launch token no longer matches, so Home's interaction state stayed active until another drag ended or the window closed. Co-authored-by: Cursor <cursoragent@cursor.com>
…ndow and snaps at screen edges Co-authored-by: Cursor <cursoragent@cursor.com>
What a person sees
How
unified-toolbarchrome for the Browser (reverts the chrome part of 3393262, "give the Browser the standard draggable Home title bar"; other windows keep the standard title bar).elastos.home.window-drag/v1start/move/end messages from empty parts of.browser-chrome, using pointer capture. Each message carries the frame'shome_token; a frame without a launch token sends nothing. Presses on button, input, select, textarea, a, label, form and[role=button]are ignored, as are non-left buttons and a second pointer.attachForwardedWindowDraginshell-window-geometry.js) acts on a message only whenevent.sourceis that window's own frame, the origin is the opaquenullorigin, the keys are exactlytype/homeToken/phase/clientX/clientY,phaseisstart,moveorend,homeTokenequals thehome_tokenin the route Home gave that frame (read withbrowserLaunchAuthorityinshell-windows.js), and the window uses unified-toolbar chrome. A drag that starts on a maximized, Browser-maximized or snapped window restores it under the pointer, like a Home title bar; dragging to a screen edge shows the snap preview and releasing there snaps it. If the window is maximized, snapped or hidden by something else during a drag, the drag stops. On a phone the press only focuses. A reload or close during a drag never snaps. The listener is removed when the window is torn down. This is the PRINCIPLES.md 16 binding the window-close and navigation messages already use.docs/HOME_SHELL_HOST_CONTRACT.md("Browser toolbar window drag", under App Messages), and the test is in that doc's Verification list.browser.jsis at?v=browser-20261017a,style.cssat?v=browser-20261016a(capsules/browser/browser/index.html). Onlyv=browser-assets are cached (max-age=60, must-revalidate+ ETag,elastos/crates/elastos-server/src/api/browser_capsules.rs:19-20,161-180);v=home-assets are servedno-store, so the changed Home modules keep?v=home-20260813alike the rest ofhome-gui. No script enforces these tokens:scripts/home-entropy-check.mjswas removed ondevelopina32e3e24, and there is nobrowser-entropy-check.mjs.Checks
node --test scripts/browser-toolbar-window-drag.test.mjs: 14 pass (adds: a frame that loads again mid-drag ends the drag, 76fc08a). The new negative cases (another origin, the Home origin, another or empty launch token, an extra field, a window with no launch token, a frame without a token sends nothing) fail on the code beforea136a72cand pass after.13764e74passed the local pre-push gate (elastos-serverlib: 3,005 passed withRUST_TEST_THREADS=2).home-shell-regression-smoke(Browser expects unified-toolbar; head drag kept),home-agent-shell-smoke,home-shell-bridge-smoke,check-product-data,git diff --check: pass onea575224.home-phone-layout-smoke(every Browser and Home row passes on Chromium and WebKit; the only WebKit rows over baseline are the known Wallet buttons under 44 px, Required: Home on phones #92, 0.8.1); WebKit and Chromium fixture: toolbar drag moves the window by the pointer delta (-120/+80), address field still focuses, head drag +120/+80; local pre-push gate.Branch: three feature commits (
fb79807c,c7b49789,ba414024) plusa136a72c(message binding) andea575224(doc), and two merges oforigin/develop. Not stacked on another PR.For 0.8.1. Merge after #68 (both touch
capsules/home-gui/browser/style.css).