Skip to content

fix: ignore stale preview renders - #254

Merged
alecdotdev merged 1 commit into
sftwrdotdev:masterfrom
PathGao:codex/guard-preview-render
Jul 29, 2026
Merged

fix: ignore stale preview renders#254
alecdotdev merged 1 commit into
sftwrdotdev:masterfrom
PathGao:codex/guard-preview-render

Conversation

@PathGao

@PathGao PathGao commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

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
Collaborator 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.

@alecdotdev
alecdotdev merged commit a903810 into sftwrdotdev:master Jul 29, 2026
5 checks passed
@PathGao
PathGao deleted the codex/guard-preview-render branch July 30, 2026 06:28
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

2 participants