GeezerVison is showing github.com — fix(cli): finish pending writes before dev watch shutdown by tannerlinsley · Pull Request #563 · TanStack/cli
Conversation
tannerlinsley
commented
Nov 4, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Dev watch now waits for in-flight writes before removing its temporary directory. It cancels pending package-manager commands and skips syncing an interrupted rebuild. CLI and core are versioned together because the CLI uses core's new cancellation argument.
The strengthened shutdown fixture failed against the old code and passed with this fix. The normal hook passed all builds, unit tests, and eight Chrome tests. A separate local subprocess check confirmed cancellation.
Summary by CodeRabbit
- Bug Fixes
- Improved development-watch shutdown reliability: pending rebuild writes are allowed to finish before temporary files are cleaned up.
- Prevented new rebuilds from starting while shutdown is underway or another build is active.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 4, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Dev-watch now passes a shutdown signal to rebuild commands and waits for an active rebuild before cleanup. The rebuild fixture tests shutdown during a temporary-directory write. A changeset marks @tanstack/cli and @tanstack/create for patch releases.
Changes: Dev-watch rebuild shutdown
| Layer / File(s) |
Summary |
Abortable rebuild environment packages/create/src/environment.ts, packages/cli/src/dev-watch.ts |
createDefaultEnvironment accepts an optional AbortSignal and passes it to package-manager commands. Dev-watch uses this environment for rebuilds and skips synchronization if shutdown has started. |
Shutdown and active-build drain packages/cli/src/dev-watch.ts, packages/cli/tests/fixtures/dev-watch-rebuild.mjs, .changeset/dev-watch-drain.md |
Dev-watch tracks active builds, blocks new builds during shutdown, and waits for the active build before cleanup. The fixture tests shutdown during a temporary-directory write. The changeset records patch releases for both packages. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant SignalHandler
participant DevWatchManager
participant AbortController
participant Watcher
participant Rebuild
participant Cleanup
SignalHandler->>DevWatchManager: stop()
DevWatchManager->>AbortController: abort rebuild signal
DevWatchManager->>Watcher: close watcher
DevWatchManager->>Rebuild: await active build
Rebuild-->>DevWatchManager: build completes
DevWatchManager->>Cleanup: clean up
Loading
Suggested reviewers: 43081j
Merge Risk: Minimal · up to 0120a
-
Dev-watch shutdown now waits for in-flight rebuild writes and cancels pending commands before removing its temporary directory. No actionable merge-blocking risk remains.
Pre-merge checks: 5
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title "fix(cli): finish pending writes before dev watch shutdown" matches the main change. The dev-watch.ts shutdown now waits for the active build, and the rebuild write to the temporary director… |
| Docstring Coverage |
 |
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title "fix(cli): finish pending writes before dev watch shutdown" matches the main change. The dev-watch.ts shutdown now waits for the active build, and the rebuild write to the temporary directory finishes before cleanup removes it. The title names the CLI scope and the fix. It omits the related cancellation of package-manager commands in core, which is a secondary aspect of the change.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files. (1 skipped: 1 unsupported.)
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
Recent review info
-
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f1f6be09-a6b7-4f12-bdbc-ad2acc15aaae
Commits
-
Reviewing files that changed from the base of the PR and between 6d6116b and 0120a70.
Files selected for processing: 4
-
.changeset/dev-watch-drain.md
packages/cli/src/dev-watch.ts
packages/cli/tests/fixtures/dev-watch-rebuild.mjs
packages/create/src/environment.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.