Skip to content

Abandon a Surface move whose late iframe consent would replace a newer question - #1482

Merged
nedtwigg merged 3 commits into
mainfrom
fix/surface-move-stale-consent
Nov 1, 2026
Merged

nedtwigg merged 3 commits into
mainfrom
fix/surface-move-stale-consent

Conversation

@dormouse-bot

Copy link
Copy Markdown
Collaborator

A GUI Surface move could answer a newer Workspace close "no" and put its own "Move iframe?" question in its place. moveSurface asks for iframe consent a second time after awaiting both Walls' flushPersistence, to cover a Tool that starts serving an iframe in that window. It threw away the guard that cancelPendingConfirmation() returns, though. A busy Workspace close requested during the flush therefore raised its question first, and the move's late requestConfirmation answered it no. The move now checks that guard before asking and abandons itself, returning null and releasing its transfer guards, the same way closeOnceWallRegisters does. docs/specs/layout.md → "Workspace lifecycle" already requires superseded preparation to be abandoned. This PR adds the persistence flush to the list of awaits that rule names.

The first consent is unaffected. It runs before any await, so the guard is still current there, and the second consent only asks when the first one didn't.

The new WorkspaceWindow.test.tsx case fails on main: the pending confirmation is the move's Move iframe? instead of the Workspace 3 close. It passes here, along with the rest of that file and surface-workspace-drag.test.ts (75 tests).

…r question

moveSurface asks for iframe consent a second time after awaiting both
Walls' persistence flush, for a Tool that starts serving meanwhile. It
dropped the guard cancelPendingConfirmation returns, so a Workspace close
asked during that flush was answered no when the move raised its own
question. The move now gives up instead, as layout.md requires of
superseded preparation.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6da5f6b
Status: ✅  Deploy successful!
Preview URL: https://63bc0050.mouseterm.pages.dev
Branch Preview URL: https://fix-surface-move-stale-conse.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is red only on Argos: argos/storybook-chromium and argos/storybook-webkit each report "1 changed — waiting for your decision". This PR changes no component or story, only the consent guard in moveSurface, one WorkspaceWindow.test.tsx case and a spec phrase, and #1479 and #1480 show the same "1 changed" status, so this looks like baseline drift rather than something this diff rendered. The visual diff still needs a maintainer's accept or reject in Argos before the checks go green.

`PairedPhonesAndAccessLog` built its log in a `parameters` literal, which runs at module load, before the meta's `beforeEach` pins `Date.now` to `STORY_NOW`. The log therefore carried the CI runner's wall-clock time, and every PR showed an Argos diff on `modals-remotecontrolsection--paired-phones-and-access-log`. `pairedDevices` and `accessLogEntries` now take an optional `now`, and the story passes `STORY_NOW`; `OneTimeEndedNetworkNotAllowed`'s refusal time gets the same treatment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nedtwigg
nedtwigg merged commit 8a08ecf into main Nov 1, 2026
18 checks passed
@nedtwigg
nedtwigg deleted the fix/surface-move-stale-consent branch November 1, 2026 00:09
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.

2 participants