src/appdefines the browser action surfaces and extension entrypoints; start here when wiring new UI flows.src/componentsstores reusable React pieces, whilesrc/hooks,src/utils, andsrc/libhold shared logic; co-locate feature-specific assets beside their consumer.src/domainmodels state with Remesh,src/serviceimplements background scripts, andsrc/protocolcentralizes messaging contracts between contexts.- Keep static icons, locales, and manifest overrides in
public/; adjust extension metadata and bundler options inwxt.config.ts.
pnpm installinstalls dependencies; use Node 22.18 or newer as declared bypackage.json.pnpm testruns the colocated Vitest suite once.pnpm test:e2e:chromebuilds and exercises the production Chrome MV3 extension through the repository E2E harness.pnpm build:chromeandpnpm build:firefoxcreate production builds per browser;pnpm pack:*zips distributables for store submission.pnpm formatapplies oxfmt corrections andpnpm lintapplies oxlint safe fixes;pnpm format:checkandpnpm lint:checkreport violations without modifying files;pnpm checkruns the TypeScript compiler in no-emit mode for API regressions.
- Follow the oxfmt defaults in
.oxfmtrc.json(semi: false,singleQuote: true,printWidth: 120); never mix manual formatting with tool output. - Use PascalCase for React components in
src/components, camelCase for hooks/utilities, and prefix hooks withuse(e.g.,usePeerConnection). - Tailwind CSS utilities power styling; prefer component-level class composition via
clsxas configured in.oxfmtrc.json(sortTailwindcss). - Run
pnpm formatandpnpm lintbefore committing so the working tree stays clean under the read-only check commands and husky gates.
- Place focused tests beside source as
<module>.test.tsor<module>.spec.tsx; shared browser harness code belongs ine2e/. - Treat
pnpm test,pnpm check,pnpm format:check, andpnpm lint:checkas separate required signals. A production build does not substitute for runtime acceptance. - Use exact-bound production artifacts for browser verification. Chrome MV3 automation uses the repository E2E harness; Firefox MV2 and final cross-browser product checks run in the Owner's local test environment with isolated profiles and explicit process/profile cleanup.
- Do not use a WXT development session as release evidence. Record which exact and browser artifact was loaded when reporting a browser result.
- Commits must satisfy Conventional Commits (enforced by
.commitlintrc), e.g.,feat: add room presence indicator. - Group logical changes by feature; avoid mixing refactors and feature work in a single commit.
- Pull requests need a concise summary, linked issue (if any), and before/after screenshots for UI updates; mention affected browsers when behavior differs.
- Ensure CI-friendly commands (
pnpm lint,pnpm check, builds) pass locally and document any follow-up tasks in the PR description.