perf: lazy-load commands and show early spinner for instant feedback#65
Merged
scottlovegrove merged 2 commits intomainfrom Feb 13, 2026
Merged
perf: lazy-load commands and show early spinner for instant feedback#65scottlovegrove merged 2 commits intomainfrom
scottlovegrove merged 2 commits intomainfrom
Conversation
2c3c6df to
7585d7b
Compare
There was a problem hiding this comment.
This pull request significantly enhances the CLI's performance and user experience by lazy-loading command modules and introducing an early-loading spinner for instant feedback, notably speeding up td --version and ensuring consistent visual cues during API calls. A minor command parsing edge case was noted, where an option's value might be mistaken for a command when using --progress-jsonl with a space-separated argument.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…I calls Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7585d7b to
f5181c0
Compare
9 tasks
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.
Summary
src/index.tsnow registers lightweight placeholders and onlyimport()s the module for the invoked command. Cutstd --versionfrom ~400ms to ~75ms.getTasksByFilterto spinner map: Commands usinggetTasksByFilter(td today,td upcoming,td filter show) previously showed no spinner at all during their API call — now they do.Test plan
npm run buildcompiles cleanlynpm test— all 680 tests passtd todayshows spinner immediately, stays running through all API calls, clears cleanly before outputtd today --jsonshows no spinnertd --versionstill fast (~75ms, no spinner)td --helplists all commands🤖 Generated with Claude Code