Skip to content

fix: ignore stale preview renders - #254

Open
PathGao wants to merge 1 commit into
alecdotdev:masterfrom
PathGao:codex/guard-preview-render
Open

fix: ignore stale preview renders#254
PathGao wants to merge 1 commit into
alecdotdev:masterfrom
PathGao:codex/guard-preview-render

Conversation

@PathGao

@PathGao PathGao commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #253.

Summary

  • Give each split/edit preview request a revision.
  • Cancel its debounce timer when the reactive effect is invalidated.
  • Apply a completed render only when the same active tab and raw content still match the request.

Validation

  • node --test --import tsx scripts/previewRenderRevision.test.ts
  • npm run check

@PathGao
PathGao force-pushed the codex/guard-preview-render branch 2 times, most recently from 2c73d69 to 5951796 Compare July 28, 2026 05:46
@PathGao
PathGao force-pushed the codex/guard-preview-render branch from 5951796 to 837b76a Compare July 29, 2026 07:04
@PathGao

PathGao commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@alecdotdev This branch has been rebased onto the current master and force-pushed; the merge conflict is resolved. Validation passed: node --test --import tsx scripts/previewRenderRevision.test.ts and npm run check. This is the first PR in the dependency chain; please merge it before #258, #260, and #266.

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.

fix: prevent stale preview renders from replacing newer tab content

1 participant