Skip to content

Cover Slides refresh cancellation across editor mounts - #8244

Merged
3mdistal merged 1 commit into
mainfrom
3mdistal/changes-1792922306
Oct 27, 2026
Merged

3mdistal merged 1 commit into
mainfrom
3mdistal/changes-1792922306

Conversation

@3mdistal

@3mdistal 3mdistal commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Add an editor-level regression for the 250 ms null-refresh retry surviving unmount and calling the next hidden editor's shared refresh function.

The test mounts an unresolved deck, leaves its first null-result refresh waiting, unmounts it, clears the shared refresh mock, and mounts the deck hidden. Advancing the clock must produce no refresh calls. This checks the editor cleanup wiring as well as the helper's cancellation contract; the existing visibility test covers hiding a mounted editor.

#8193 already implements the AbortSignal repair. The repeated failure in #8147 at 021d52b used a synthetic merge into b7565d8; neither revision contains #8193. This PR adds regression coverage for that mechanism without duplicating the production fix or relaxing the failing assertion. It changes only the Slides 2 owning spec.

Validation:

  • All 80 tests in the owning generation-signal file passed, including 20 iterations of the new regression.
  • Removing only the editor effect's unmount abort made the regression fail with one old-mount refresh call; restoring it made the case pass. This demonstrates that the test catches the cleanup wiring behind the reported cross-test leak.
  • The existing visibility case also passed. git diff --check and TypeScript syntax checks passed.

Local execution used one worker and a temporary Vitest config resolving workspace exports to source because the restored Windows checkout lacked built package outputs. This is runtime evidence for the owning source, not a package-build result. No assertions were relaxed. Independent technical review found no blocking issues in the published diff.

Hosted CI is now green after rerunning the dependency-install failure. A fresh local probe also asserted that the 250 ms retry timer was registered before the first editor unmounted; the regression passed. The test targets this inner null-refresh retry across unmount, while the outer polling backoff is separate.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Builder reviewed your changes and has a few items to flag 🟡

Review Details

PR #8244 adds an editor-level regression test for a pending null-result deck refresh across unmount/remount, complementing the existing visibility test. This is a low-risk, test-only change, and it does not alter production behavior. The fixture clears the shared refresh mock between mounts, disposes the first router, and verifies the hidden editor does not refresh when timers advance. One review found a narrow coverage gap: the first editor is unmounted after a microtask flush, before the null-result retry's backoff timer is scheduled, so the test does not exercise the cleanup's cancelled guard for that timer. Current production cancellation appears correct; the concern is that the regression does not fully prove its stated retry-across-unmount scenario. The other review found no additional actionable issue. Browser testing: Skipped — this PR only modifies tests and has no UI impact.

@3mdistal

Copy link
Copy Markdown
Contributor Author

Checked the timer-ordering concern in the review summary. A temporary timer spy asserted that setTimeout(callback, 250) was already registered before the first editor unmounted; the regression passed, and the exact published test file was restored afterward. The visibility setter dispatches no event.

This case targets the helper's inner null-result retry across unmount, rather than the later outer polling backoff. The earlier negative control removed only the effect's unmount abort and produced exactly one stale refresh; restoring the abort passed. No production or test change is needed for this finding.

The dependency-install rerun is green, and the PR description now reflects that.

  • Codex AI

@3mdistal
3mdistal merged commit f631e87 into main Oct 27, 2026
96 of 98 checks passed
@3mdistal
3mdistal deleted the 3mdistal/changes-1792922306 branch October 27, 2026 20:33
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