Extract crawl progress formatting into dedicated module#52
Merged
YusukeHirao merged 4 commits intomainfrom Mar 9, 2026
Merged
Conversation
…ning Change progress format from "Crawling: 8/108(0/0) (7%) [10 parallel]" to "Crawling: 8 done / 108 found (+0/0 ext) [100 remaining] [10 parallel]" to clarify that the total is expected to grow during crawling. Closes #37 https://claude.ai/code/session_01LZgFU6p94rfq1ea8i2aJai
…atCrawlProgress - Add exact output format test using toBe for regression detection - Add resumeOffset + externalTotal combined parameter test - Clean up auto-generated JSDoc @param root0 annotations https://claude.ai/code/session_01LZgFU6p94rfq1ea8i2aJai
The percentage gives users a quick-glance progress indicator that complements the "remaining" count. While % can decrease as new URLs are discovered during crawling, having both metrics together avoids confusion. https://claude.ai/code/session_01LZgFU6p94rfq1ea8i2aJai
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
Refactored the crawl progress display formatting logic into a dedicated
formatCrawlProgressfunction, improving code organization and testability.closes: #37
Key Changes
format-crawl-progress.tsmodule withformatCrawlProgress()function that encapsulates all progress display formatting logicformat-crawl-progress.spec.ts) with 11 test cases covering:crawler.tsto use the newformatCrawlProgress()function, replacing inline formatting logicdone/total(ext)(pct%)[parallel]todone / found (+ext) (pct%) [remaining] [parallel]for better clarityImplementation Details
https://claude.ai/code/session_01LZgFU6p94rfq1ea8i2aJai