Skip to content

feat: package the app as a browser extension - #11

Merged
ttncode merged 1 commit into
mainfrom
feat/browser-extension
Oct 11, 2026
Merged

ttncode merged 1 commit into
mainfrom
feat/browser-extension

Conversation

@ttncode

@ttncode ttncode commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

Package the app as a Manifest V3 browser extension for Chromium browsers (Chrome, Edge, Brave, Opera).

  • npm run build:extension makes a static export (BUILD_TARGET=extension) and reshapes it for extension rules: renames _next (underscore names are reserved), externalizes every inline script (MV3 allows only same-origin scripts), drops unused _-prefixed routes, writes manifest.json, and zips the result to dist/.
  • extension/background.js: the toolbar button focuses the open timer tab or opens one, so two timers never race on the same data. A global shortcut can be assigned at chrome://extensions/shortcuts.
  • The shortcuts panel shows that hint when running inside the extension.
  • CI builds the extension and uploads the zip as an artifact.

Testing

  • Lint, typecheck, unit tests and build pass.
  • npm run build:extension output served with the MV3 policy script-src 'self': app loads with no CSP violations, all tabs and shortcuts work.

## Summary
Package the app as a Manifest V3 browser extension for Chromium browsers (Chrome, Edge, Brave, Opera).

- `npm run build:extension` makes a static export (`BUILD_TARGET=extension`) and reshapes it for extension rules: renames `_next` (underscore names are reserved), externalizes every inline script (MV3 allows only same-origin scripts), drops unused `_`-prefixed routes, writes `manifest.json`, and zips the result to `dist/`.
- `extension/background.js`: the toolbar button focuses the open timer tab or opens one, so two timers never race on the same data. A global shortcut can be assigned at `chrome://extensions/shortcuts`.
- The shortcuts panel shows that hint when running inside the extension.
- CI builds the extension and uploads the zip as an artifact.

## Testing
- Lint, typecheck, unit tests and build pass.
- `npm run build:extension` output served with the MV3 policy `script-src 'self'`: app loads with no CSP violations, all tabs and shortcuts work.
@ttncode
ttncode merged commit 8de0765 into main Oct 11, 2026
2 checks passed
@ttncode
ttncode deleted the feat/browser-extension branch October 11, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant