Skip to content

Commit fd76a40

Browse files
Address coderabbitai review feedback: add Safari distribution artifacts, cross-references, remove specific file sizes, update AI provider list, and improve consistency
Co-authored-by: PeterDaveHello <[email protected]>
1 parent a105950 commit fd76a40

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

.github/copilot-instructions.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Always reference these instructions first and fall back to search or bash comman
1111
- Install dependencies: `npm ci` -- npm audit warnings may appear; for development-only dependencies they generally do not affect the shipped extension. Review and address runtime-impacting advisories separately.
1212
- Development build: `npm run dev` -- runs webpack in watch mode. Do not kill mid-compilation, but stop gracefully when switching branches or after dependency/config changes, then restart to avoid stale watchers and inconsistent state.
1313
- Production build: `npm run build` -- Avoid force-killing mid-bundle; stop, fix, then rebuild.
14+
See "Time Expectations" and "Build Issues" for the hung-build policy and recovery steps.
1415
- Format code: `npm run pretty` -- uses Prettier to format all JS/JSX/CSS files. Run this before linting.
1516
- Lint code: `npm run lint` -- uses ESLint.
1617
- Safari build: `npm run build:safari` -- macOS with Xcode required.
@@ -26,6 +27,7 @@ Production build creates multiple variants in `build/` directory:
2627
- Distribution artifacts:
2728
- Chromium: `build/chromium-*.zip` (e.g., `build/chromium-<version>.zip`)
2829
- Firefox: `build/firefox-*.xpi` (e.g., `build/firefox-<version>.xpi`)
30+
- Safari: `Fission - ChatBox.app` and `safari.dmg` (see Safari Build section for details)
2931

3032
## Architecture Overview
3133

@@ -41,7 +43,7 @@ Production build creates multiple variants in `build/` directory:
4143
### Manifests
4244

4345
- `src/manifest.json` - Manifest v3 for Chromium browsers (Chrome, Edge, Opera, etc.)
44-
- `src/manifest.v2.json` - Manifest v2 for Firefox
46+
- `src/manifest.v2.json` - Manifest v2 for Firefox (current status; future MV3 migration may change this)
4547
- Background runs as service worker (MV3) vs background page (MV2)
4648
- Different permission models between manifest versions
4749

@@ -79,15 +81,17 @@ Since this is a browser extension with no automated tests, ALWAYS manually test
7981

8082
Ensure these files exist in `build/chromium/` after successful build:
8183

82-
- `manifest.json` (~2.4KB, contains proper extension metadata)
83-
- `background.js` (~427KB, service worker)
84-
- `content-script.js` (~1MB, main functionality)
85-
- `content-script.css` (~650KB, styling)
84+
- `manifest.json` (contains proper extension metadata)
85+
- `background.js` (service worker bundle)
86+
- `content-script.js` (main functionality)
87+
- `content-script.css` (styling)
8688
- `popup.html` and `popup.js` (popup interface)
8789
- `IndependentPanel.html` and `IndependentPanel.js` (standalone chat page)
88-
- `shared.js` (typically around ~2MB; size may vary slightly by environment and dependencies)
89-
- `logo.png` (~18KB, extension icon)
90-
- `rules.json` (~1.4KB, declarative net request rules)
90+
- `shared.js` (shared vendor/runtime; size varies by environment and dependencies)
91+
- `logo.png` (extension icon)
92+
- `rules.json` (declarative net request rules)
93+
94+
Bundle sizes are approximate and not validation criteria.
9195

9296
### Verify Script Limitations
9397

@@ -154,9 +158,9 @@ src/
154158

155159
The extension supports multiple AI providers:
156160

157-
- **Web APIs** (free): ChatGPT, Claude, Kimi Moonshot (requires browser cookies)
158-
- **API Keys**: OpenAI GPT models, Claude API, OpenRouter, AI/ML, DeepSeek, Ollama
159-
- **Custom models**: Support for self-hosted and alternative API endpoints
161+
- **Web (cookie-based)**: ChatGPT (Web), Claude.ai (Web), Kimi.Moonshot (Web), Bing (Web), Gemini (Web)
162+
- **APIs (key-based)**: OpenAI (API), Azure OpenAI (API), Claude.ai (API), OpenRouter (API), AI/ML (API), DeepSeek (API), Ollama (local), ChatGLM (API), Waylaidwanderer (API), Kimi.Moonshot (API)
163+
- **Custom/self-hosted**: Alternative endpoints and self-hosted backends
160164

161165
## Troubleshooting
162166

@@ -183,11 +187,11 @@ The extension supports multiple AI providers:
183187

184188
- Do not interrupt builds or long-running commands unless they appear hung or unresponsive.
185189
- `npm ci`: ~30 seconds
186-
- `npm run build`: ~33 seconds (measured). Set timeout to 5–10 minutes to allow for slowdowns; if it exceeds this window and appears hung, use troubleshooting steps from Build Issues section.
190+
- `npm run build`: ~33 seconds (measured). Set timeout to 5–10 minutes; if it exceeds this and appears hung, see "Build Issues" for recovery steps.
187191
- `npm run dev`: ~13 seconds initial build, then watches for changes; use Ctrl+C to stop when switching branches or after config/dependency changes.
188192
- `npm run lint`: ~3–5 seconds
189-
- Manual extension testing: 5-10 minutes for thorough validation
190-
- Safari build: 2-5 minutes (macOS only)
193+
- Manual extension testing: 510 minutes for thorough validation
194+
- Safari build: 25 minutes (macOS only)
191195

192196
## Critical Validation Steps
193197

0 commit comments

Comments
 (0)