4 Commits

Author SHA1 Message Date
Zebratic 33779e6716 Rewrite README to fit shipped state
The old README was the scaffolding-era version: said 'V1 in progress',
'no build step', 'will be pushed once vault unlocked' — all stale.

New README reflects what's actually in the repo:
- Repo remote, branch, smoke-test status
- Real file tree under extension/content/ (6 TS modules, not 5)
- Actual build pipeline (npm run build / watch / typecheck)
- Smoke test section with the Playwright workflow that works
- Permission surface as it actually is (storage + host permission)
- Privacy stance — no data collection, ever

Stale scaffolding TODOs removed. The detailed V1 architecture,
risk register, and V2 backlog stay in docs/PLAN.md where they
belong — README is now the entry point, not the plan.
2026-07-11 02:45:10 +00:00
Zebratic 78ebc4fffd Add Playwright-based smoke test scripts
scripts/smoke.js, scripts/probe.js, scripts/probe-inject.js,
scripts/probe-minimal.js, scripts/smoke-final.js

The smoke test verifies the Beat Pocket extension loads and injects into
beat-battle.net:

  1. Service worker registers (manifest valid, MV3 wiring works)
  2. Content script runs (creates #bbp-host element on document.body)
  3. No JS errors thrown on the page
  4. Site renders normally (PLAY button still visible)

Why Playwright instead of raw --load-extension:
  - Google Chrome refuses --load-extension on the command line
  - Chromium full build accepts it but hangs under --virtual-time-budget
  - Playwright's launchPersistentContext properly initializes extensions
    in headless mode and gives a clean Chromium without the GCM/dbus noise
  - The bundled Chromium is at
    /root/.cache/ms-playwright/chromium-1208/chrome-linux64/chrome

Run with: node scripts/smoke-final.js (after npm install)

Probe results from this session:
  - [final:dom] #bbp-host is appended to body via ensureHost()
  - [final:errors] 0 page errors
  - [final:console] 0 extension-related console lines (expected: silent
    happy path; logs only on phase transitions)
2026-07-11 02:40:06 +00:00
Zebratic 80c2aa0401 Fix: bundle output to extension/dist/content/, update manifest path
The esbuild outdir was relative to cwd, so it landed at project root
(dist/content/) on a project-root build, not under the extension dir.
Fix:
- esbuild writes to extension/dist/content/
- manifest.json content_scripts.js → dist/content/index.js
- Keeps the extension self-contained so Chrome --load-extension works
  without any external files
2026-07-11 02:29:25 +00:00
Zebratic 02a90e839c Initial scaffold: Beat Pocket MV3 extension
- manifest.json with MV3 config, host permissions for beat-battle.net
- content/detector.ts: route + overlay observer, emits bbp:phase events
- content/layout.ts: defensive mobile-first layout reflow
- content/chat-drawer.ts: bottom-sheet drawer, dispatches synthetic events
  through site's own React-managed textarea + button (preserves auth,
  rate-limit, mute, profanity guards)
- content/util/selectors.ts: text- and role-based fallback chain
- content/util/ws-proxy.ts: lightweight WebSocket instrumentation, no
  payload capture
- content/inject.css: mobile overrides using site's existing --bb-* vars
- background.js: MV3 service worker stub
- package.json + tsconfig.json + esbuild.config.mjs: build pipeline
- icons/: 16/32/48/128 placeholder PNGs (chili-red disc)
- docs/PLAN.md: full V1 architecture, risks, scope
- README.md: scope, dev workflow (load unpacked), tech
2026-07-11 02:24:37 +00:00