Add GitHub repository snapshot capture#6
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: undefined
… downloads - Add comprehensive test suite for GitHub README page in all supported browser engines - Test markdown download and conversion with both Puppeteer and Playwright engines - Test screenshot capture with both Puppeteer and Playwright engines - Add engine parity tests to ensure both engines produce valid results - Fix Playwright browser adapter to properly handle browser context - Update jest.config.mjs to include integration tests in test matching patterns All 11 new tests pass successfully, verifying that both Puppeteer and Playwright can download and convert the GitHub README page to markdown and capture screenshots. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 89811e6.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 📎 Log file uploaded as GitHub Gist (343KB) Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
We need to resolve conflicts, and make sure we are able to correctly get README.md of any GitHub project universally as txt, markdown and html. And also other details of the repository as files tree, project details and so on, so all info displayed in GitHub repository page can be compactly presented as txt, markdown, or original html and so on. |
|
🤖 AI Work Session Started Starting automated work session at 2026-06-04T23:48:17.086Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Working session summaryImplemented and pushed the fix to PR #6: What changed:
Verification:
This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (664.8K + 14.5M cached) input tokens, 71.2K output tokens, $24.316772 cost 🤖 Models used:
📎 Log file uploaded as Repository (101475KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
Resolves #5.
Summary
/txtand/markdownreturn compact repository snapshots for plain GitHub repo URLs, while/htmland screenshot capture continue returning the original rendered GitHub page.mainmonorepo layout.Reproduction
Before this change, capturing
https://github.com/link-assistant/web-captureas text/markdown did not provide a universal repository README/tree snapshot: text capture treated GitHub as an HTML page instead of a text source, and markdown capture depended on the GitHub web shell.After this change:
/txt?url=https://github.com/link-assistant/web-capturereturns a plain-text repository summary, root files, and README content./markdown?url=https://github.com/link-assistant/web-capturereturns the same repository data as Markdown./html?url=...and PNG screenshot capture still use the original GitHub page.Tests
npm test -- --runTestsByPath tests/unit/github.test.js tests/integration/api-endpoints.test.jsnpm run lintnpm run format:checknpm run check:duplicationnpm test -- --testPathIgnorePatterns="docker.test.js"GITHUB_REPOSITORY_INTEGRATION=true npm test -- --runTestsByPath tests/integration/github-readme.test.js --testTimeout=120000cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-features --verbosecargo test --doc --verboseGITHUB_REPOSITORY_INTEGRATION=1 cargo test --test integration github_repository::live -- --nocapture