-
Notifications
You must be signed in to change notification settings - Fork 838
Add comprehensive GitHub Copilot instructions with AGENTS.md symlink #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@copilot check this review comment, please:
This review suggests applying this section to "### Verify Script Limitations":
|
Enhanced the verify script limitations section with detailed explanation of validation process, successful validation criteria, and expected failure modes. The section now clearly explains what constitutes successful validation (HTTP 200 + successful parsing) vs expected failures (network restrictions, HTTP errors, format changes) and when these can be safely ignored. Commit: 5c8d3f7 |
@copilot check this review comment, and see if it's correct: The description of Safari build output is unclear. Consider specifying the exact names or patterns of the generated files (e.g., 'ChatGPTBox.app' and 'ChatGPTBox.dmg') to help developers identify successful build artifacts. -- Creates `.app` bundle and `.dmg` installer
+- Creates `ChatGPTBox.app` bundle and `ChatGPTBox.dmg` installer |
Updated Safari build section with exact artifact names based on the actual build script. The correct names are Commit: 4f28ac4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive GitHub Copilot instructions to guide AI agents when working with the ChatGPTBox browser extension codebase. The instructions provide detailed architectural documentation, validated build processes, and manual testing strategies to help AI agents understand and effectively develop this complex cross-browser extension.
- Comprehensive architecture documentation covering all major components and cross-browser compatibility requirements
- Thoroughly validated build process with measured timing and explicit timeout warnings
- Detailed manual testing strategy since the project lacks automated test infrastructure
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@copilot Check the review comment below, confirm if it's correct or not, and decide whether to make some follow-up changes or not:
|
The comment is correct - the 90+ minute timeout for a 33-second build was inconsistent and confusing. Updated both timeout recommendations to 5-10 minutes, which provides a reasonable buffer for system variations while being proportional to the actual build time. Commit: 7210f28 |
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the WalkthroughAdds a new repository documentation file at Changes
Sequence Diagram(s)Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Assessment against linked issues
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
@copilot, It's interesting that you can only see normal comments, not the "review" comments? I've manually pasted Qodo Merge's suggestion here to see if it's reasonable to follow.
|
Both Qodo Merge suggestions were reasonable improvements:
These changes prevent common extension loading errors and improve cross-platform accessibility without changing core functionality. Commit: b8fcc48 |
b8fcc48
to
c12bd35
Compare
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (2)
.github/copilot-instructions.md (2)
30-31
: Safari artifact names look inconsistent with project branding; verify exact product names and update both places together.The doc says “Fission - ChatBox.app” and “safari.dmg”, which don’t match the repository/product name “ChatGPTBox”. Please confirm the actual names emitted by
safari/build.sh
/Xcode and make the two sections consistent.Proposed edit (assuming the app is branded ChatGPTBox in Xcode; if not, adjust to the verified names):
- - Safari: `Fission - ChatBox.app` and `safari.dmg` (see Safari Build section for details) + - Safari: `ChatGPTBox.app` and `ChatGPTBox.dmg` (see Safari Build section for details)-- Creates `Fission - ChatBox.app` bundle and `safari.dmg` installer +- Creates `ChatGPTBox.app` bundle and `ChatGPTBox.dmg` installerWould you like me to open a follow-up to auto-derive these names from
safari/build.sh
so the doc can’t drift again?Also applies to: 149-151
96-102
: Verify script behavior is now explicit and actionable.The success criteria and expected failure modes for
npm run verify
are clear, reducing false alarms in CI/sandboxes.
🧹 Nitpick comments (3)
.github/copilot-instructions.md (3)
45-47
: Time-stamp the Firefox MV2 note to avoid future staleness.Mozilla’s MV2/MV3 policy changes over time. Add an “as of” date so readers can evaluate freshness.
-- `src/manifest.v2.json` - Manifest v2 for Firefox (current status; future MV3 migration may change this) +- `src/manifest.v2.json` - Manifest v2 for Firefox (current status as of August 2025; future MV3 migration may change this)
12-16
: Hung-build policy is consistent; small style polish for time ranges.Great that the “NEVER CANCEL” wording was removed and the policy is unified. For consistency, consider using an en dash in time ranges.
-- `npm run build`: ~35 seconds (measured). Set timeout to 5-10 minutes; if it exceeds this and appears hung, see "Build Issues" for recovery steps. +- `npm run build`: ~35 seconds (measured). Set timeout to 5–10 minutes; if it exceeds this and appears hung, see "Build Issues" for recovery steps. -- `npm run dev`: ~15 seconds initial build, then watches for changes; use Ctrl+C to stop when switching branches or after config/dependency changes. +- `npm run dev`: ~15 seconds initial build, then watches for changes; use Ctrl+C to stop when switching branches or after config/dependency changes.Also applies to: 188-194
169-171
: Add npm cache reset as a last resort troubleshooting step.When deep cache corruption occurs, resetting npm’s cache helps.
- macOS/Linux: `rm -rf node_modules && npm ci && rm -rf node_modules/.cache build/ dist/` - - Windows (PowerShell): `Remove-Item -Recurse -Force node_modules, build, dist; if (Test-Path node_modules\.cache) { Remove-Item -Recurse -Force node_modules\.cache }; npm ci` + - Windows (PowerShell): `Remove-Item -Recurse -Force node_modules, build, dist; if (Test-Path node_modules\.cache) { Remove-Item -Recurse -Force node_modules\.cache }; npm ci` + - If issues persist: `npm cache clean --force && npm ci` (use sparingly)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/copilot-instructions.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
.github/copilot-instructions.md
[grammar] ~26-~26: There might be a mistake here.
Context: ...ithout math rendering and token encoding - Distribution artifacts: - Chromium: `b...
(QB_NEW_EN)
[grammar] ~27-~27: There might be a mistake here.
Context: ...token encoding - Distribution artifacts: - Chromium: build/chromium-*.zip
(e.g., ...
(QB_NEW_EN)
[grammar] ~28-~28: There might be a mistake here.
Context: ...(e.g.,
build/chromium-.zip) - Firefox:
build/firefox-*.xpi(e.g.,
b...
(QB_NEW_EN)
[grammar] ~29-~29: There might be a mistake here.
Context: ...i(e.g.,
build/firefox-.xpi) - Safari:
Fission - ChatBox.appand
saf...
(QB_NEW_EN)
[grammar] ~46-~46: There might be a mistake here.
Context: ...s; future MV3 migration may change this) - Background runs as service worker (MV3) ...
(QB_NEW_EN)
[grammar] ~56-~56: There might be a mistake here.
Context: ...nality: 1. Load Extension in Browser: - Chrome: Go to chrome://extensions/
, en...
(QB_NEW_EN)
[grammar] ~57-~57: There might be a mistake here.
Context: ...he folder must contain manifest.json
). - Firefox: Go to `about:debugging#/runtime...
(QB_NEW_EN)
[grammar] ~59-~59: There might be a mistake here.
Context: ... files cannot be tested by serving them via HTTP server - they must be loaded as a ...
(QB_NEW_EN)
[grammar] ~61-~61: There might be a mistake here.
Context: ...tension. 2. Core Functionality Tests: - Press Ctrl+B
(Windows/Linux) or ⌘+B
...
(QB_NEW_EN)
[grammar] ~65-~65: There might be a mistake here.
Context: ...nu appears - Click extension icon to open popup - Press Ctrl+Shift+H
(Window...
(QB_NEW_EN)
[grammar] ~68-~68: There might be a mistake here.
Context: ...ation page 3. Site Integration Tests: - Visit YouTube.com, verify video summary ...
(QB_NEW_EN)
[grammar] ~70-~70: There might be a mistake here.
Context: ...com, verify ChatGPT integration appears in sidebar - Visit github.com, verify c...
(QB_NEW_EN)
[grammar] ~74-~74: There might be a mistake here.
Context: ...ponses appear 4. Configuration Tests: - Open extension popup, navigate through t...
(QB_NEW_EN)
[grammar] ~75-~75: There might be a mistake here.
Context: ...:** - Open extension popup, navigate through tabs (General, Feature Pages, Modules >...
(QB_NEW_EN)
[grammar] ~82-~82: There might be a mistake here.
Context: ... these files exist in build/chromium/
after successful build: - manifest.json
(c...
(QB_NEW_EN)
[grammar] ~98-~98: There might be a mistake here.
Context: ...ers can parse and handle real responses. - Successful validation: For each search...
(QB_NEW_EN)
[grammar] ~162-~162: There might be a mistake here.
Context: ...ylaidwanderer (API), Kimi.Moonshot (API) - Custom/self-hosted: Alternative endpoi...
(QB_NEW_EN)
[grammar] ~169-~169: There might be a mistake here.
Context: ...res Node 20+), clear caches and rebuild. - macOS/Linux: `rm -rf node_modules && npm...
(QB_NEW_EN)
[grammar] ~170-~170: There might be a mistake here.
Context: ...ar caches and rebuild. - macOS/Linux: rm -rf node_modules && npm ci && rm -rf node_modules/.cache build/ dist/
- Windows (PowerShell): `Remove-Item -Recu...
(QB_NEW_EN)
[grammar] ~171-~171: There might be a mistake here.
Context: ...build/ dist/ - Windows (PowerShell):
Remove-Item -Recurse -Force node_modules, build, dist; if (Test-Path node_modules.cache) { Remove-Item -Recurse -Force node_modules.cache }; npm ci` - Safari build fails: Ensure macOS with Xc...
(QB_NEW_EN)
[grammar] ~183-~183: There might be a mistake here.
Context: ...ng new site adapter: Create new file in src/content-script/site-adapters/
- Adding new selection tool: Modify `src/c...
(QB_NEW_EN)
[grammar] ~184-~184: There might be a mistake here.
Context: ...s/- Adding new selection tool: Modify
src/content-script/selection-tools/` - Updating API integration: Modify files i...
(QB_NEW_EN)
[grammar] ~185-~185: There might be a mistake here.
Context: ...dating API integration: Modify files in src/services/apis/
- Adding new UI component: Create in `src/...
(QB_NEW_EN)
[grammar] ~192-~192: There might be a mistake here.
Context: ...npm run build`: ~35 seconds (measured). Set timeout to 5-10 minutes; if it exceeds ...
(QB_NEW_EN)
[grammar] ~192-~192: There might be a mistake here.
Context: ..., see "Build Issues" for recovery steps. - npm run dev
: ~15 seconds initial build, then watche...
(QB_NEW_EN)
[grammar] ~194-~194: There might be a mistake here.
Context: ...cy changes. - npm run lint
: ~5 seconds - Manual extension testing: 5-10 minutes f...
(QB_NEW_EN)
[grammar] ~195-~195: There might be a mistake here.
Context: ...ng: 5-10 minutes for thorough validation - Safari build: 2-5 minutes (macOS only) ...
(QB_NEW_EN)
[grammar] ~205-~205: There might be a mistake here.
Context: ...extension and test actual functionality.
(QB_NEW_EN)
🔇 Additional comments (2)
.github/copilot-instructions.md (2)
23-31
: Build output section reads well; casing and artifact patterns are clear.Lowercase “-without-katex-and-tiktoken” matches build outputs and the Chromium/Firefox packaging patterns are explicit. Nice job preventing misloads with clear folder targets.
56-60
: Extension loading guidance is precise and prevents common misloads.Clear distinction between Chrome “Load unpacked” and Firefox temporary add-ons with .xpi vs manifest.json is spot-on. The “no HTTP server” warning is especially helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive GitHub Copilot instructions to help AI agents understand and work effectively with the ChatGPTBox browser extension project. The instructions provide detailed guidance on architecture, development workflow, and cross-platform build processes.
Key changes:
- Create a comprehensive 205-line instruction file covering all aspects of development
- Document complete architecture including content script, background worker, popup, and site adapters
- Provide detailed build processes with timing expectations and validation steps
- Include manual testing procedures and troubleshooting guidance
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@copilot, please check if there are still any obvious repetitions. We need this document to be more elegant and avoid unnecessary redundancy (it doesn’t mean the more concise the better) |
I found and eliminated several obvious repetitions to improve document elegance:
The changes reduced content by 5 lines net while maintaining completeness and creating single sources of truth for key information. Commit: 321be5c |
61f586b
to
c06ec7a
Compare
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
c06ec7a
to
edaf40d
Compare
@josStorer, sorry that I noticed I should use rebase and merge 😅 Would you like to disable it in the settings, so that we can make sure it won't appear again? Thanks! |
This PR adds a comprehensive
.github/copilot-instructions.md
file that provides GitHub Copilot with detailed guidance on working with the ChatGPTBox codebase. The instructions are designed to help AI agents understand and work effectively with this browser extension project.Key Features
Comprehensive Architecture Documentation:
Thoroughly Validated Build Process:
Fission - ChatBox.app
andsafari.dmg
)Enhanced Manual Testing Strategy:
manifest.json
) and Firefox (prefer.xpi
files)Cross-Platform Development Support:
Enhanced Technical Documentation:
Improved Document Structure:
The instructions follow best practices with imperative tone, exhaustive validation of commands, and comprehensive manual testing scenarios. This significantly improves AI agent effectiveness when working on ChatGPTBox development tasks across different platforms.
Fixes #880.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
PR Type
Documentation
Description
Add comprehensive GitHub Copilot instructions file
Document architecture, build process, and testing procedures
Provide development workflow and troubleshooting guidance
Include platform-specific instructions and time expectations
Diagram Walkthrough
File Walkthrough
copilot-instructions.md
Add comprehensive GitHub Copilot development instructions
.github/copilot-instructions.md
popup components
Summary by CodeRabbit