fix: add error handling to critical tools - #269
Open
TerminalGravity wants to merge 3 commits into
Open
Conversation
Adds a new export_timeline tool that generates markdown reports from timeline data. Reports include: - Summary stats (event counts, correction rate, sessions) - Daily breakdown with commits, corrections, and errors - Tool usage frequency table - Configurable period (daily/weekly/monthly) - Optional save to ~/.preflight/reports/ Closes #5
Show users what preflight_check actually returns for ambiguous, clear, and cross-service prompts. Helps new users understand the value before installing.
…, what-changed, audit-workspace) Previously these tools had no try/catch — if git commands failed or the workspace was in an unexpected state, they'd crash with an unhandled exception. Now they return helpful error messages with recovery steps. Tools fixed: - checkpoint: most critical — crash during checkpoint means lost context - session-health: called frequently during long sessions - what-changed: fails on shallow clones or repos with few commits - audit-workspace: fails if not in a git repo
TerminalGravity
commented
Mar 17, 2026
TerminalGravity
left a comment
Collaborator
Author
There was a problem hiding this comment.
The error handling additions to checkpoint, session-health, what-changed, and audit-workspace look solid — actionable error messages instead of raw stack traces is exactly right, especially for checkpoint where a crash means lost context.
One thing: this PR also includes export-timeline.ts (342 lines) and its registration in index.ts, which looks like it belongs in PR #268 (the export_timeline feature PR). Might want to split that out to keep the diff focused on what the title says. As-is, merging this before #268 would create a conflict or duplicate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds try/catch with helpful error messages to 4 tools that previously had none:
Each error response includes actionable recovery steps instead of a raw stack trace.
Build ✅ | Tests ✅ (43/43)