diff --git a/.claude/agents/corpus-fixer.md b/.claude/agents/corpus-fixer.md
index 44ede88..6125f20 100644
--- a/.claude/agents/corpus-fixer.md
+++ b/.claude/agents/corpus-fixer.md
@@ -4,7 +4,7 @@ description: Use this agent when you need to fix or improve the detection logic
model: inherit
---
-You are an expert Gitcasso corpus debugging specialist with deep knowledge of browser extension development. You operate exclusively within the `browser-extension` directory and specialize in using the corpus:view development environment to diagnose and fix detection logic issues.
+You are an expert Gitcasso corpus debugging specialist with deep knowledge of browser extension development. You operate within the root project directory and specialize in using the corpus:view development environment to diagnose and fix detection logic issues.
Your primary workflow:
diff --git a/.github/workflows/browser-extension.yml b/.github/workflows/browser-extension.yml
index 6b8d132..35685d8 100644
--- a/.github/workflows/browser-extension.yml
+++ b/.github/workflows/browser-extension.yml
@@ -21,9 +21,6 @@ jobs:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- - run: pnpm run biome
- working-directory: browser-extension
- run: pnpm test
- working-directory: browser-extension
- - run: pnpm run typecheck
- working-directory: browser-extension
\ No newline at end of file
+ - run: pnpm biome
+ - run: pnpm typecheck
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 428a70f..7541f49 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -11,9 +11,111 @@ By submitting a Pull Request, you agree that your contributions are licensed und
This extension ***must never transmit any data outside the browser***.
- it adds syntax highlighting by running local scripts
-- it stores unfinished comments in local storage
+- it stores finished and unfinished comments in local storage
- there is no need to initiate an outbound network request, no features will be added which require outbound network requests
-## How to
+## Developer quickstart
-- `browser-extension` is the primary project. Go to [its README.md](browser-extension/README.md) for development info.
+### Hotreload development
+
+- `pnpm install`
+- `pnpm dev`
+- open [`chrome://extensions`](chrome://extensions)
+- toggle **Developer mode** (top-right)
+- click "Load unpacked" (far left)
+ - `.output/chrome-mv3-dev`
+ - if you can't find `.output`, it's probably hidden, `command+shift+period` will show it
+- click the puzzle icon next to the url bar, then pin the Gitcasso icon
+
+### Testing and quality
+- `pnpm biome` - runs `biome check` (lint & formatting)
+- `pnpm biome:fix` - fixes most of what `biome check` finds
+- `pnpm typecheck` - typechecking
+- `pnpm test` - vitest
+- `pnpm test -u` - updates all snapshots
+
+## How it works
+
+This is a [WXT](https://wxt.dev/)-based browser extension that
+
+- finds `textarea` components and decorates them with [overtype](https://overtype.dev/) and [highlight.js](https://highlightjs.org/)
+- stores unposted comment drafts, and makes them easy to find via the extension popup
+
+### Entry points
+
+- [`src/entrypoints/content.ts`](src/entrypoints/content.ts) - injected into every webpage
+- [`src/entrypoints/background.ts`](src/entrypoints/background.ts) - service worker that manages state and handles messages
+- [`src/entrypoints/popup/popup.tsx`](src/entrypoints/popup/popup.tsx) - popup (react html + TailwindCSS)
+
+```mermaid
+graph TD
+ Content[Content Script
content.ts]
+ Background[Background Script
background.ts]
+ Popup[Popup Script
popup/popup.tsx]
+
+ Content -->|ENHANCED/DESTROYED
CommentEvent| Background
+ Popup -->|GET_OPEN_SPOTS
SWITCH_TO_TAB| Background
+ Background -->|GetOpenSpotsResponse
spots array| Popup
+
+ Background -.->|manages| Storage[Comment State Storage
openSpots JsonMap]
+ Content -.->|enhances| TextArea[textarea elements
on web pages]
+ Popup -.->|displays| UI[Extension UI
list of comment spots]
+
+ classDef entrypoint fill:#e1f5fe
+ classDef storage fill:#f3e5f5
+ classDef ui fill:#e8f5e8
+
+ class Content,Background,Popup entrypoint
+ class Storage storage
+ class TextArea,UI ui
+```
+
+Every time a `textarea` shows up on a page, on initial load or later on, it gets passed to a list of `CommentEnhancer`s. Each one gets a turn to say "I can enhance this box!". They show that they can enhance it by returning something non-null in the method `tryToEnhance(textarea: HTMLTextAreaElement): Spot | null`. Later on, that same `Spot` data will be used by the `tableRow(spot: Spot): ReactNode` method to create React components for rich formatting in the popup table.
+
+Those `Spot` values get bundled up with the `HTMLTextAreaElement` itself into an `EnhancedTextarea`, which gets added to the `TextareaRegistry`. At some interval, draft edits get saved by the browser extension.
+
+When the `textarea` gets removed from the page, the `TextareaRegistry` is notified so that the `CommentSpot` can be marked as abandoned or submitted as appropriate.
+
+## Testing
+
+- `pnpm playground` gives you a test environment where you can tinker with the popup with various test data, supports hot reload
+- `pnpm corpus:view` gives you recordings of various web pages which you can see with and without enhancement by the browser extension
+
+### Test Corpus
+
+We maintain a corpus of test pages in two formats for testing the browser extension:
+
+#### HAR Corpus (Automated)
+
+- For testing initial page loads and network requests
+- HAR recordings live in `tests/corpus/*.har`, complete recordings of the network requests of a single page load
+- You can add or change URLs in `tests/corpus/_corpus-index.ts`
+- **Recording new HAR files:**
+ - `npx playwright codegen https://github.com/login --save-storage=playwright/.auth/gh.json` will store new auth tokens
+ - login manually, then close the browser
+ - ***these cookies are very sensitive! we only run this script using a test account that has no permissions or memberships to anything, recommend you do the same!***
+ - `pnpm corpus:har:record` records new HAR files using those auth tokens (it needs args, run it with no args for docs)
+ - DO NOT COMMIT AND PUSH NEW OR CHANGED HAR files!
+ - we try to sanitize these (see `corpus-har-record.ts` for details) but there may be important PII in them
+ - if you need new HAR files for something, let us know and we will generate them ourselves using a dummy account
+ - IF YOUR PR CHANGES OR ADDS HAR FILES WE WILL CLOSE IT. Ask for HAR files and we'll be happy to generate clean ones you can test against.
+
+#### HTML Corpus (Manual)
+
+- For testing post-interaction states (e.g., expanded textareas, modal dialogs, dynamic content)
+- HTML snapshots live in `tests/corpus/*.html`, manually captured using SingleFile browser extension
+- All assets are inlined in a single HTML file by SingleFile
+- **Creating new HTML corpus files:**
+ 1. Navigate to the desired page state (click buttons, expand textareas, etc.)
+ 2. Use SingleFile browser extension to save the complete page
+ 3. Save the `.html` file to `tests/corpus/html/` with a descriptive name
+ 4. Add an entry to `tests/corpus/_corpus-index.ts` with `type: 'html'` and a description of the captured state
+ 5. Feel free to contribute these if you want, but be mindful that they will be part of our immutable git history
+
+#### Viewing Corpus Files
+
+- Run `pnpm corpus:view` to start the test server at http://localhost:3001
+- Select any corpus file to view in two modes:
+ - **Clean**: Original page without extension
+ - **Gitcasso**: Page with extension injected for testing
+- Both HAR and HTML corpus types are supported
diff --git a/README.md b/README.md
index 3204ae5..fc10683 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-#
Gitcasso
+#
Gitcasso
*Syntax highlighting and autosave for comments on GitHub (and other other markdown-friendly websites).*
diff --git a/browser-extension/biome.json b/biome.json
similarity index 100%
rename from browser-extension/biome.json
rename to biome.json
diff --git a/browser-extension/README.md b/browser-extension/README.md
deleted file mode 100644
index 1b3afb5..0000000
--- a/browser-extension/README.md
+++ /dev/null
@@ -1,110 +0,0 @@
-# Gitcasso browser extension
-
-## Developer quickstart
-
-### Hotreload development
-
-- `pnpm install`
-- `pnpm run dev`
-- open [`chrome://extensions`](chrome://extensions)
-- toggle **Developer mode** (top-right)
-- click "Load unpacked" (far left)
- - `browser-extension/.output/chrome-mv3-dev`
- - if you can't find `.output`, it's probably hidden, `command+shift+period` will show it
-- click the puzzle icon next to the url bar, then pin the Gitcasso icon
-
-### Testing and quality
-- `pnpm run biome` - runs `biome check` (lint & formatting)
-- `pnpm run biome:fix` - fixes most of what `biome check` finds
-- `pnpm run compile` - typechecking
-- `pnpm test` - vitest
-- `pnpm test -- -u` updates all the snapshots
-
-### Deployment
-- `pnpm run build` - build for mv3 for most browsers
-- `pnpm run build:firefox` - build mv2 specifically for Firefox
-
-## How it works
-
-This is a [WXT](https://wxt.dev/)-based browser extension that
-
-- finds `textarea` components and decorates them with [overtype](https://overtype.dev/) and [highlight.js](https://highlightjs.org/)
-- stores unposted comment drafts, and makes them easy to find via the extension popup
-
-### Entry points
-
-- [`src/entrypoints/content.ts`](src/entrypoints/content.ts) - injected into every webpage
-- [`src/entrypoints/background.ts`](src/entrypoints/background.ts) - service worker that manages state and handles messages
-- [`src/entrypoints/popup/popup.tsx`](src/entrypoints/popup/popup.tsx) - popup (html/css/tsx) with shadcn/ui table components
-
-```mermaid
-graph TD
- Content[Content Script
content.ts]
- Background[Background Script
background.ts]
- Popup[Popup Script
popup/popup.tsx]
-
- Content -->|ENHANCED/DESTROYED
CommentEvent| Background
- Popup -->|GET_OPEN_SPOTS
SWITCH_TO_TAB| Background
- Background -->|GetOpenSpotsResponse
spots array| Popup
-
- Background -.->|manages| Storage[Comment State Storage
openSpots JsonMap]
- Content -.->|enhances| TextArea[textarea elements
on web pages]
- Popup -.->|displays| UI[Extension UI
list of comment spots]
-
- classDef entrypoint fill:#e1f5fe
- classDef storage fill:#f3e5f5
- classDef ui fill:#e8f5e8
-
- class Content,Background,Popup entrypoint
- class Storage storage
- class TextArea,UI ui
-```
-
-Every time a `textarea` shows up on a page, on initial load or later on, it gets passed to a list of `CommentEnhancer`s. Each one gets a turn to say "I can enhance this box!". They show that they can enhance it by returning something non-null in the method `tryToEnhance(textarea: HTMLTextAreaElement): Spot | null`. Later on, that same `Spot` data will be used by the `tableRow(spot: Spot): ReactNode` method to create React components for rich formatting in the popup table.
-
-Those `Spot` values get bundled up with the `HTMLTextAreaElement` itself into an `EnhancedTextarea`, which gets added to the `TextareaRegistry`. At some interval, draft edits get saved by the browser extension.
-
-When the `textarea` gets removed from the page, the `TextareaRegistry` is notified so that the `CommentSpot` can be marked as abandoned or submitted as appropriate.
-
-## Testing
-
-- `npm run playground` gives you a test environment where you can tinker with the popup with various test data, supports hot reload
-- `npm run corpus:view` gives you recordings of various web pages which you can see with and without enhancement by the browser extension
-
-### Test Corpus
-
-We maintain a corpus of test pages in two formats for testing the browser extension:
-
-#### HAR Corpus (Automated)
-
-- For testing initial page loads and network requests
-- HAR recordings live in `tests/corpus/har/`, complete recordings of the network requests of a single page load
-- You can add or change URLs in `tests/corpus/_corpus-index.ts`
-- **Recording new HAR files:**
- - `npx playwright codegen https://github.com/login --save-storage=playwright/.auth/gh.json` will store new auth tokens
- - login manually, then close the browser
- - ***these cookies are very sensitive! we only run this script using a test account that has no permissions or memberships to anything, recommend you do the same!***
- - `pnpm run corpus:har:record` records new HAR files using those auth tokens (it needs args, run it with no args for docs)
- - DO NOT COMMIT AND PUSH NEW OR CHANGED HAR files!
- - we try to sanitize these (see `corpus-har-record.ts` for details) but there may be important PII in them
- - if you need new HAR files for something, let us know and we will generate them ourselves using a dummy account
- - IF YOUR PR CHANGES OR ADDS HAR FILES WE WILL CLOSE IT. Ask for HAR files and we'll be happy to generate clean ones you can test against.
-
-#### HTML Corpus (Manual)
-
-- For testing post-interaction states (e.g., expanded textareas, modal dialogs, dynamic content)
-- HTML snapshots live in `tests/corpus/html/`, manually captured using SingleFile browser extension
-- All assets are inlined in a single HTML file by SingleFile
-- **Creating new HTML corpus files:**
- 1. Navigate to the desired page state (click buttons, expand textareas, etc.)
- 2. Use SingleFile browser extension to save the complete page
- 3. Save the `.html` file to `tests/corpus/html/` with a descriptive name
- 4. Add an entry to `tests/corpus/_corpus-index.ts` with `type: 'html'` and a description of the captured state
-
-#### Viewing Corpus Files
-
-- Run `pnpm run corpus:view` to start the test server at http://localhost:3001
-- Select any corpus file to view in two modes:
- - **Clean**: Original page without extension
- - **Gitcasso**: Page with extension injected for testing
-- Both HAR and HTML corpus types are supported
diff --git a/browser-extension/package.json b/browser-extension/package.json
deleted file mode 100644
index 1ffb822..0000000
--- a/browser-extension/package.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "author": "DiffPlug",
- "dependencies": {
- "@primer/octicons-react": "^19.18.0",
- "@types/react": "^19.1.12",
- "@types/react-dom": "^19.1.9",
- "@wxt-dev/webextension-polyfill": "^1.0.0",
- "highlight.js": "^11.11.1",
- "lucide-react": "^0.543.0",
- "overtype": "workspace:*",
- "react": "^19.1.1",
- "react-dom": "^19.1.1",
- "tailwind-merge": "^3.3.1",
- "tailwind-variants": "^3.1.1",
- "webextension-polyfill": "^0.12.0"
- },
- "description": "Syntax highlighting and autosave for comments on GitHub (and other other markdown-friendly websites).",
- "devDependencies": {
- "@biomejs/biome": "^2.1.2",
- "@playwright/test": "^1.46.0",
- "@tailwindcss/vite": "^4.1.13",
- "@testing-library/jest-dom": "^6.6.4",
- "@types/express": "^4.17.21",
- "@types/har-format": "^1.2.16",
- "@types/node": "^22.16.5",
- "@vitejs/plugin-react": "^5.0.2",
- "@vitest/coverage-v8": "^3.2.4",
- "@vitest/ui": "^3.2.4",
- "express": "^4.19.2",
- "linkedom": "^0.18.12",
- "postcss": "^8.5.6",
- "tailwindcss": "^4.1.13",
- "tsx": "^4.19.1",
- "typescript": "^5.8.3",
- "vite": "^7.1.5",
- "vitest": "^3.2.4",
- "wxt": "^0.20.7"
- },
- "keywords": [
- "browser-extension",
- "chrome-extension",
- "firefox-addon",
- "github",
- "gitlab",
- "bitbucket",
- "syntax highlighting"
- ],
- "license": "MIT",
- "name": "gitcasso",
- "scripts": {
- "biome": "biome check .",
- "biome:fix": "biome check --write .",
- "biome:fix:unsafe": "biome check --write --unsafe .",
- "build": "wxt build",
- "build:dev": "wxt build --mode development",
- "build:firefox": "wxt build -b firefox",
- "precommit": "npm run biome:fix && npm run typecheck && npm run test",
- "typecheck": "tsc --noEmit",
- "dev": "wxt",
- "dev:firefox": "wxt -b firefox",
- "postinstall": "wxt prepare",
- "test": "vitest run",
- "playground": "vite --config vite.playground.config.ts",
- "playground:build": "vite build --config vite.playground.config.ts",
- "corpus:har:record": "tsx tests/corpus-har-record.ts",
- "corpus:view": "tsx tests/corpus-view.ts"
- },
- "type": "module",
- "version": "0.0.1"
-}
diff --git a/package.json b/package.json
index dc8404b..f83d4b4 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,71 @@
{
- "name": "gitcasso-workspace",
- "private": true,
+ "author": "DiffPlug",
+ "dependencies": {
+ "@primer/octicons-react": "^19.18.0",
+ "@types/react": "^19.1.12",
+ "@types/react-dom": "^19.1.9",
+ "@wxt-dev/webextension-polyfill": "^1.0.0",
+ "highlight.js": "^11.11.1",
+ "lucide-react": "^0.543.0",
+ "overtype": "workspace:*",
+ "react": "^19.1.1",
+ "react-dom": "^19.1.1",
+ "tailwind-merge": "^3.3.1",
+ "tailwind-variants": "^3.1.1",
+ "webextension-polyfill": "^0.12.0"
+ },
+ "description": "Syntax highlighting and autosave for comments on GitHub (and other other markdown-friendly websites).",
+ "devDependencies": {
+ "@biomejs/biome": "^2.1.2",
+ "@playwright/test": "^1.46.0",
+ "@tailwindcss/vite": "^4.1.13",
+ "@testing-library/jest-dom": "^6.6.4",
+ "@types/express": "^4.17.21",
+ "@types/har-format": "^1.2.16",
+ "@types/node": "^22.16.5",
+ "@vitejs/plugin-react": "^5.0.2",
+ "@vitest/coverage-v8": "^3.2.4",
+ "@vitest/ui": "^3.2.4",
+ "express": "^4.19.2",
+ "linkedom": "^0.18.12",
+ "postcss": "^8.5.6",
+ "tailwindcss": "^4.1.13",
+ "tsx": "^4.19.1",
+ "typescript": "^5.8.3",
+ "vite": "^7.1.5",
+ "vitest": "^3.2.4",
+ "wxt": "^0.20.7"
+ },
+ "keywords": [
+ "browser-extension",
+ "chrome-extension",
+ "firefox-addon",
+ "github",
+ "gitlab",
+ "bitbucket",
+ "syntax highlighting"
+ ],
+ "license": "MIT",
+ "name": "gitcasso",
"scripts": {
- "build:overtype": "pnpm --filter=overtype run build",
- "typecheck": "pnpm --filter=gitcasso run typecheck",
- "build": "pnpm run build:overtype && pnpm --filter=gitcasso run build",
- "build:dev": "pnpm run build:overtype && pnpm --filter=gitcasso run build:dev",
- "har:view": "pnpm --filter=gitcasso run har:view",
- "postinstall": "pnpm run build:overtype"
- }
-}
\ No newline at end of file
+ "biome": "biome check .",
+ "biome:fix": "biome check --write .",
+ "biome:fix:unsafe": "biome check --write --unsafe .",
+ "build:overtype": "pnpm -r --filter=overtype run build",
+ "build": "pnpm run build:overtype && wxt build",
+ "build:dev": "pnpm run build:overtype && wxt build --mode development",
+ "build:firefox": "wxt build -b firefox",
+ "precommit": "npm run biome:fix && npm run typecheck && npm run test",
+ "typecheck": "tsc --noEmit",
+ "dev": "wxt",
+ "dev:firefox": "wxt -b firefox",
+ "postinstall": "pnpm run build:overtype && wxt prepare",
+ "test": "vitest run",
+ "playground": "vite --config vite.playground.config.ts",
+ "playground:build": "vite build --config vite.playground.config.ts",
+ "corpus:har:record": "tsx tests/corpus-har-record.ts",
+ "corpus:view": "tsx tests/corpus-view.ts"
+ },
+ "type": "module",
+ "version": "0.0.1"
+}
diff --git a/browser-extension/playwright.config.ts b/playwright.config.ts
similarity index 100%
rename from browser-extension/playwright.config.ts
rename to playwright.config.ts
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f05be97..96125a4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -6,9 +6,7 @@ settings:
importers:
- .: {}
-
- browser-extension:
+ .:
dependencies:
'@primer/octicons-react':
specifier: ^19.18.0
@@ -30,7 +28,7 @@ importers:
version: 0.543.0(react@19.1.1)
overtype:
specifier: workspace:*
- version: link:../packages/overtype
+ version: link:packages/overtype
react:
specifier: ^19.1.1
version: 19.1.1
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index d20149b..4340350 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1,3 +1,2 @@
packages:
- - 'browser-extension'
- 'packages/*'
\ No newline at end of file
diff --git a/browser-extension/public/icons/icon-128.png b/public/icons/icon-128.png
similarity index 100%
rename from browser-extension/public/icons/icon-128.png
rename to public/icons/icon-128.png
diff --git a/browser-extension/public/icons/icon-16.png b/public/icons/icon-16.png
similarity index 100%
rename from browser-extension/public/icons/icon-16.png
rename to public/icons/icon-16.png
diff --git a/browser-extension/public/icons/icon-48.png b/public/icons/icon-48.png
similarity index 100%
rename from browser-extension/public/icons/icon-48.png
rename to public/icons/icon-48.png
diff --git a/browser-extension/src/components/Badge.tsx b/src/components/Badge.tsx
similarity index 100%
rename from browser-extension/src/components/Badge.tsx
rename to src/components/Badge.tsx
diff --git a/browser-extension/src/components/MultiSegment.tsx b/src/components/MultiSegment.tsx
similarity index 100%
rename from browser-extension/src/components/MultiSegment.tsx
rename to src/components/MultiSegment.tsx
diff --git a/browser-extension/src/components/PopupRoot.tsx b/src/components/PopupRoot.tsx
similarity index 100%
rename from browser-extension/src/components/PopupRoot.tsx
rename to src/components/PopupRoot.tsx
diff --git a/browser-extension/src/components/design.tsx b/src/components/design.tsx
similarity index 100%
rename from browser-extension/src/components/design.tsx
rename to src/components/design.tsx
diff --git a/browser-extension/src/components/misc.ts b/src/components/misc.ts
similarity index 100%
rename from browser-extension/src/components/misc.ts
rename to src/components/misc.ts
diff --git a/browser-extension/src/entrypoints/background.ts b/src/entrypoints/background.ts
similarity index 100%
rename from browser-extension/src/entrypoints/background.ts
rename to src/entrypoints/background.ts
diff --git a/browser-extension/src/entrypoints/content.ts b/src/entrypoints/content.ts
similarity index 100%
rename from browser-extension/src/entrypoints/content.ts
rename to src/entrypoints/content.ts
diff --git a/browser-extension/src/entrypoints/popup/index.html b/src/entrypoints/popup/index.html
similarity index 100%
rename from browser-extension/src/entrypoints/popup/index.html
rename to src/entrypoints/popup/index.html
diff --git a/browser-extension/src/entrypoints/popup/popup.tsx b/src/entrypoints/popup/popup.tsx
similarity index 100%
rename from browser-extension/src/entrypoints/popup/popup.tsx
rename to src/entrypoints/popup/popup.tsx
diff --git a/browser-extension/src/entrypoints/popup/style.css b/src/entrypoints/popup/style.css
similarity index 100%
rename from browser-extension/src/entrypoints/popup/style.css
rename to src/entrypoints/popup/style.css
diff --git a/browser-extension/src/lib/config.ts b/src/lib/config.ts
similarity index 100%
rename from browser-extension/src/lib/config.ts
rename to src/lib/config.ts
diff --git a/browser-extension/src/lib/enhancer.ts b/src/lib/enhancer.ts
similarity index 100%
rename from browser-extension/src/lib/enhancer.ts
rename to src/lib/enhancer.ts
diff --git a/browser-extension/src/lib/enhancers/CommentEnhancerMissing.tsx b/src/lib/enhancers/CommentEnhancerMissing.tsx
similarity index 100%
rename from browser-extension/src/lib/enhancers/CommentEnhancerMissing.tsx
rename to src/lib/enhancers/CommentEnhancerMissing.tsx
diff --git a/browser-extension/src/lib/enhancers/draftStats.ts b/src/lib/enhancers/draftStats.ts
similarity index 100%
rename from browser-extension/src/lib/enhancers/draftStats.ts
rename to src/lib/enhancers/draftStats.ts
diff --git a/browser-extension/src/lib/enhancers/github/ghOptions.ts b/src/lib/enhancers/github/ghOptions.ts
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/ghOptions.ts
rename to src/lib/enhancers/github/ghOptions.ts
diff --git a/browser-extension/src/lib/enhancers/github/githubEditComment.tsx b/src/lib/enhancers/github/githubEditComment.tsx
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/githubEditComment.tsx
rename to src/lib/enhancers/github/githubEditComment.tsx
diff --git a/browser-extension/src/lib/enhancers/github/githubHighlighter.ts b/src/lib/enhancers/github/githubHighlighter.ts
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/githubHighlighter.ts
rename to src/lib/enhancers/github/githubHighlighter.ts
diff --git a/browser-extension/src/lib/enhancers/github/githubIssueAddComment.tsx b/src/lib/enhancers/github/githubIssueAddComment.tsx
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/githubIssueAddComment.tsx
rename to src/lib/enhancers/github/githubIssueAddComment.tsx
diff --git a/browser-extension/src/lib/enhancers/github/githubIssueNewComment.tsx b/src/lib/enhancers/github/githubIssueNewComment.tsx
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/githubIssueNewComment.tsx
rename to src/lib/enhancers/github/githubIssueNewComment.tsx
diff --git a/browser-extension/src/lib/enhancers/github/githubPRAddComment.tsx b/src/lib/enhancers/github/githubPRAddComment.tsx
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/githubPRAddComment.tsx
rename to src/lib/enhancers/github/githubPRAddComment.tsx
diff --git a/browser-extension/src/lib/enhancers/github/githubPRNewComment.tsx b/src/lib/enhancers/github/githubPRNewComment.tsx
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/githubPRNewComment.tsx
rename to src/lib/enhancers/github/githubPRNewComment.tsx
diff --git a/browser-extension/src/lib/enhancers/github/githubSpotTypes.ts b/src/lib/enhancers/github/githubSpotTypes.ts
similarity index 100%
rename from browser-extension/src/lib/enhancers/github/githubSpotTypes.ts
rename to src/lib/enhancers/github/githubSpotTypes.ts
diff --git a/browser-extension/src/lib/enhancers/modifyDOM.ts b/src/lib/enhancers/modifyDOM.ts
similarity index 100%
rename from browser-extension/src/lib/enhancers/modifyDOM.ts
rename to src/lib/enhancers/modifyDOM.ts
diff --git a/browser-extension/src/lib/logger.ts b/src/lib/logger.ts
similarity index 100%
rename from browser-extension/src/lib/logger.ts
rename to src/lib/logger.ts
diff --git a/browser-extension/src/lib/messages.ts b/src/lib/messages.ts
similarity index 100%
rename from browser-extension/src/lib/messages.ts
rename to src/lib/messages.ts
diff --git a/browser-extension/src/lib/registries.ts b/src/lib/registries.ts
similarity index 100%
rename from browser-extension/src/lib/registries.ts
rename to src/lib/registries.ts
diff --git a/browser-extension/tests/background.test.ts b/tests/background.test.ts
similarity index 100%
rename from browser-extension/tests/background.test.ts
rename to tests/background.test.ts
diff --git a/browser-extension/tests/corpus-fixture.ts b/tests/corpus-fixture.ts
similarity index 100%
rename from browser-extension/tests/corpus-fixture.ts
rename to tests/corpus-fixture.ts
diff --git a/browser-extension/tests/corpus-har-record.ts b/tests/corpus-har-record.ts
similarity index 100%
rename from browser-extension/tests/corpus-har-record.ts
rename to tests/corpus-har-record.ts
diff --git a/browser-extension/tests/corpus-utils.ts b/tests/corpus-utils.ts
similarity index 100%
rename from browser-extension/tests/corpus-utils.ts
rename to tests/corpus-utils.ts
diff --git a/browser-extension/tests/corpus-view.ts b/tests/corpus-view.ts
similarity index 100%
rename from browser-extension/tests/corpus-view.ts
rename to tests/corpus-view.ts
diff --git a/browser-extension/tests/corpus/_corpus-index.ts b/tests/corpus/_corpus-index.ts
similarity index 100%
rename from browser-extension/tests/corpus/_corpus-index.ts
rename to tests/corpus/_corpus-index.ts
diff --git a/browser-extension/tests/corpus/gh_issue.har b/tests/corpus/gh_issue.har
similarity index 100%
rename from browser-extension/tests/corpus/gh_issue.har
rename to tests/corpus/gh_issue.har
diff --git a/browser-extension/tests/corpus/gh_issue_edit.html b/tests/corpus/gh_issue_edit.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_issue_edit.html
rename to tests/corpus/gh_issue_edit.html
diff --git a/browser-extension/tests/corpus/gh_issue_populated_comment.html b/tests/corpus/gh_issue_populated_comment.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_issue_populated_comment.html
rename to tests/corpus/gh_issue_populated_comment.html
diff --git a/browser-extension/tests/corpus/gh_new_issue.har b/tests/corpus/gh_new_issue.har
similarity index 100%
rename from browser-extension/tests/corpus/gh_new_issue.har
rename to tests/corpus/gh_new_issue.har
diff --git a/browser-extension/tests/corpus/gh_new_pr.har b/tests/corpus/gh_new_pr.har
similarity index 100%
rename from browser-extension/tests/corpus/gh_new_pr.har
rename to tests/corpus/gh_new_pr.har
diff --git a/browser-extension/tests/corpus/gh_pr.har b/tests/corpus/gh_pr.har
similarity index 100%
rename from browser-extension/tests/corpus/gh_pr.har
rename to tests/corpus/gh_pr.har
diff --git a/browser-extension/tests/corpus/gh_pr_edit.html b/tests/corpus/gh_pr_edit.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_pr_edit.html
rename to tests/corpus/gh_pr_edit.html
diff --git a/browser-extension/tests/corpus/gh_project.html b/tests/corpus/gh_project.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_project.html
rename to tests/corpus/gh_project.html
diff --git a/browser-extension/tests/corpus/gh_project_draft.html b/tests/corpus/gh_project_draft.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_project_draft.html
rename to tests/corpus/gh_project_draft.html
diff --git a/browser-extension/tests/corpus/gh_project_draft_edit.html b/tests/corpus/gh_project_draft_edit.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_project_draft_edit.html
rename to tests/corpus/gh_project_draft_edit.html
diff --git a/browser-extension/tests/corpus/gh_project_issue.html b/tests/corpus/gh_project_issue.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_project_issue.html
rename to tests/corpus/gh_project_issue.html
diff --git a/browser-extension/tests/corpus/gh_project_issue_edit.html b/tests/corpus/gh_project_issue_edit.html
similarity index 100%
rename from browser-extension/tests/corpus/gh_project_issue_edit.html
rename to tests/corpus/gh_project_issue_edit.html
diff --git a/browser-extension/tests/lib/enhancers/draftStats.test.ts b/tests/lib/enhancers/draftStats.test.ts
similarity index 100%
rename from browser-extension/tests/lib/enhancers/draftStats.test.ts
rename to tests/lib/enhancers/draftStats.test.ts
diff --git a/browser-extension/tests/lib/enhancers/github.test.ts b/tests/lib/enhancers/github.test.ts
similarity index 100%
rename from browser-extension/tests/lib/enhancers/github.test.ts
rename to tests/lib/enhancers/github.test.ts
diff --git a/browser-extension/tests/playground/claude.tsx b/tests/playground/claude.tsx
similarity index 100%
rename from browser-extension/tests/playground/claude.tsx
rename to tests/playground/claude.tsx
diff --git a/browser-extension/tests/playground/index.html b/tests/playground/index.html
similarity index 100%
rename from browser-extension/tests/playground/index.html
rename to tests/playground/index.html
diff --git a/browser-extension/tests/playground/playground-styles.css b/tests/playground/playground-styles.css
similarity index 100%
rename from browser-extension/tests/playground/playground-styles.css
rename to tests/playground/playground-styles.css
diff --git a/browser-extension/tests/playground/playground.tsx b/tests/playground/playground.tsx
similarity index 100%
rename from browser-extension/tests/playground/playground.tsx
rename to tests/playground/playground.tsx
diff --git a/browser-extension/tests/playground/replica.tsx b/tests/playground/replica.tsx
similarity index 100%
rename from browser-extension/tests/playground/replica.tsx
rename to tests/playground/replica.tsx
diff --git a/browser-extension/tests/playground/replicaData.tsx b/tests/playground/replicaData.tsx
similarity index 100%
rename from browser-extension/tests/playground/replicaData.tsx
rename to tests/playground/replicaData.tsx
diff --git a/browser-extension/tsconfig.json b/tsconfig.json
similarity index 100%
rename from browser-extension/tsconfig.json
rename to tsconfig.json
diff --git a/browser-extension/vite.playground.config.ts b/vite.playground.config.ts
similarity index 100%
rename from browser-extension/vite.playground.config.ts
rename to vite.playground.config.ts
diff --git a/browser-extension/vitest.config.ts b/vitest.config.ts
similarity index 83%
rename from browser-extension/vitest.config.ts
rename to vitest.config.ts
index d545330..71ca1ff 100644
--- a/browser-extension/vitest.config.ts
+++ b/vitest.config.ts
@@ -6,6 +6,7 @@ export default defineConfig({
test: {
environment: 'node',
globals: true,
+ include: ['tests/**/*.test.{ts,tsx}'],
pool: 'threads',
},
})
diff --git a/browser-extension/wxt.config.ts b/wxt.config.ts
similarity index 100%
rename from browser-extension/wxt.config.ts
rename to wxt.config.ts