Summary#
- Prevents git timeout when T3 is run from home directory
- Detects home directory using
homedir() from node:os
- Skips checkpointing with warning log instead of letting 30-second timeout occur
- Returns
false for isGitRepository on home directories
Changes#
This PR adds early detection of home directories to prevent the git add -A -- . command from timing out. Home directories typically contain thousands of files (Applications, .npm, .cache, etc.) which makes staging extremely slow.
The checkpoint system is designed for project-level work where git repositories have a manageable number of tracked files—not for entire home directories.
Files Modified#
apps/server/src/checkpointing/Layers/CheckpointStore.ts:
- Added
isHomeDirectory() helper function
- Updated
isGitRepository() to return false for home directories
- Updated
captureCheckpoint() to skip with warning for home directories
Test Plan#
Checklist#
Related Issue#
Resolves #1227
Notes#
This is a small, focused bug fix that aligns with the contribution guidelines:
- Small reliability fix (prevents timeout crashes)
- Minimal code change (32 lines added, 11 removed)
- Clear explanation of what and why
- No scope expansion or feature creep
If running from home directory, users should navigate to a project directory first (e.g., cd ~/my-project && npx t3).
Note
Fix checkpoint timeout when running from the home directory#
Running the app from the home directory could trigger a checkpoint timeout because git operations on ~ are slow or hang. isGitRepository now short-circuits to false and captureCheckpoint exits early with a warning log when cwd matches os.homedir(), skipping all git index and commit logic.
Macroscope summarized 54c00d9.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
b8a04df5-1201-44b3-ae15-e0fce610f241You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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
Tip
You can disable the changed files summary in the walkthrough.
Disable the
reviews.changed_files_summarysetting to disable the changed files summary in the walkthrough.