Chrome (MV3) extension: capture balances from provider pages - #10
Merged
Conversation
Phase 4 multi-surface item — the second consumer of @pointup/api-client. Reads
the loyalty balance a provider page already shows the signed-in user and records
it as a manual snapshot in PointUp; no credentials shared.
- apps/extension: MV3 extension bundled with esbuild.
- src/extraction.ts: pure, unit-tested provider detection + balance
extraction (no DOM, no chrome APIs) with a per-provider host/regex registry.
- content script (scrape visible text) → background worker (match provider →
account, POST manual balance via the typed client) → popup (settings +
latest capture + one-click record).
- Bearer-token auth (same path as mobile); no api-client refactor needed —
it already supports baseUrl + headers.
- 11 tests, incl. a guard that the manifest content_scripts matches stay in
sync with the extraction rules.
- CI builds the extension; docs/extension.md; README layout + docs list.
Verification: 123 tests pass (92 core + 20 bot + 11 extension); typecheck + lint
clean; extension build produces a loadable dist/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 4 multi-surface item — a Manifest V3 Chrome extension, the second consumer of
@pointup/api-client(the whole reason that package exists). It reads the loyalty balance a provider page already shows the signed-in user and records it as a manual snapshot in PointUp — sync without sharing credentials.src/extraction.ts— pure, unit-tested provider detection + balance extraction (no DOM, nochromeAPIs) via a per-provider host/regex registry. This is the valuable, testable core; the rest is thin glue.baseUrl+headers.docs/extension.md; README updated.Safety
Never reads passwords/cookies/credential fields — only the balance number already on screen. Capture is one-click and user-initiated; no provider automation.
Verification
npm run build --workspace @pointup/extensionproduces a loadabledist/(bundles + manifest + popup).content_scriptsmatches stay in sync with the extraction rules — adding a provider can't silently miss the manifest.Follow-up
A full
@clerk/chrome-extensionsign-in flow (vs. pasting a token) is the natural next step; the client + capture pipeline are already token-driven.🤖 Generated with Claude Code