Skip to content

Staging#498

Merged
equationalapplications merged 26 commits into
mainfrom
staging
Jun 30, 2026
Merged

Staging#498
equationalapplications merged 26 commits into
mainfrom
staging

Conversation

@equationalapplications

Copy link
Copy Markdown
Owner

Description

Prepares the Clanker Desktop Bridge extension for Chrome Web Store review: manifest hardening, safe DOM rendering in the side panel, clearer offscreen document justification, privacy policy addendum, and copy-paste CWS dashboard artifacts.

Spec: CWS Extension Readiness Design Spec

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test update
  • Build/CI update

Related Issue

Fixes #

Changes Made

  • Add icons, action.default_icon.128, and content_security_policy to extension/manifest.json (omit key until 1Password .pem is available)
  • Replace innerHTML write in side-panel renderLog with safe DOM insertion; add panel.test.ts
  • Sharpen offscreen document justification in auth-bridge.ts for CWS reviewers
  • Add docs/cws-submission-artifacts.md with store listing copy, permission justifications, and preflight checklist
  • Add browser extension data usage section to src/config/privacyConfig.ts (v1.5)
  • Add CWS readiness design spec, implementation plan, and patch June 29 extension spec

Testing

Platforms Tested

  • iOS
  • Android
  • Web

Test Steps

  1. cd extension && npm run typecheck && npm test
  2. cd extension && npm run build
  3. Verify dist/manifest.json has icons, default_icon.128, and CSP; verify dist/ui/side-panel/panel.js has no innerHTML assignments

Screenshots

Before

N/A — manifest and side-panel log rendering changes only.

After

N/A

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

  • key field: Not yet in manifest.json. Retrieve the signing .pem from 1Password and add the base64 public key before uploading to CWS (see preflight checklist in docs/cws-submission-artifacts.md).
  • dist/: Gitignored; run npm run build in extension/ before packaging for CWS.
  • Privacy policy: Verify clanker-ai.com/privacy renders the ## Clanker Browser Extension Data Usage section before submission.

Made with Cursor

equationalapplications and others added 24 commits June 29, 2026 17:37
Co-authored-by: Cursor <cursoragent@cursor.com>
…ions

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fail fast when the extension is loaded without esbuild env injection
instead of falling back to REPLACE_* placeholders.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align security rules with the Phase 2 approval flow where mobile writes
approvalToken alongside status and approvedAt.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Validate scheduler actions with shared DSL schemas, verify approval
tokens before resuming, and harden test cleanup and error propagation.

Co-authored-by: Cursor <cursoragent@cursor.com>
feat(bridge): Phase 3 proactive scheduler and async Expo Push completion
…n bridge

Full pipeline validated: Cloud Scheduler → Firestore session → extension polls
and connects → task executes → result written to Firestore → scheduler returns 200.

Key fixes:
- offscreen/auth.ts: await onAuthStateChanged before serving GET_ID_TOKEN to
  avoid race where auth.currentUser is null on fresh offscreen doc creation
- offscreen/auth.ts: use firebase/auth/web-extension (IndexedDB) in both panel
  and offscreen doc to prevent persistence migration that deleted IndexedDB entry
- content-bridge.ts: switch from executeScript({func}) to files+sendMessage
  pattern; func serializes only the function body losing module-scope deps
- content/bridge-listener.ts: new IIFE content script entry exposing CLANKER_RUN_ACTION
  message handler with idempotency guard (window.__clankerInjected)
- esbuild.mjs: build content/executor.js as IIFE (not ESM) so Chrome can inject
  it into the page isolated world via executeScript({files})
- manifest.json: add tabs permission (needed for tab.url); move <all_urls> to
  host_permissions (optional_host_permissions requires user gesture to grant)
- panel.ts: remove tryUpgradeToGcm; register immediately with polling: token
- service-worker.ts: alarm-based polling every 1 min as primary wake mechanism
- schedulerTriggerHandler.ts: FCM wake non-fatal; skip entirely for polling: tokens
- firestoreSession.ts: add getPendingSchedulerSession for pending-session endpoint
- index.ts: add GET /agent/browser/pending-session route; schedulerTimeoutMs 90s
- firestore.indexes.json: add sessions(status ASC, createdAt ASC) composite index

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
runInActiveTab now injects executor.js then sends CLANKER_RUN_ACTION
via chrome.tabs.sendMessage; mock that API in tests and chrome-stub.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Return only sessionId from the API, skip expired/taskless pending sessions,
dedupe concurrent wake-ups, and harden extension sign-in UX.

Co-authored-by: Cursor <cursoragent@cursor.com>
feat(bridge): Phase 4 — MV3 Chrome extension bridge E2E validated
Restore CWS-friendly optional_host_permissions, register GCM on install,
and remove the unused alarm/pending-session fallback. Add browser-bridge
guide, update C4 phasing and cross-refs, and delete the dead GET route.

Co-authored-by: Cursor <cursoragent@cursor.com>
fix(bridge): align extension manifest, docs, and remove pending-session poll
Covers 5 targeted changes (innerHTML XSS fix, explicit CSP, manifest key,
offscreen justification, icons field), copy-paste store submission artifacts,
and MV3 policy rationale for each permission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…se label

Add missing tabs to manifest snippet (used by chrome.tabs.query/create/update
in content-bridge.ts). Remove stale (Phase 2+) label from Expo Push row in
Infrastructure Prerequisites — approval flow shipped in bridge Phase 2 commit
(feat(bridge/p2)) and is correctly scoped as Phase 1 in the phasing table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add dedicated section heading (required for CWS manual reviewer to find it),
Limited Use Disclosure clause (CWS hard requirement), and explicit no-data-sale
statement. Previous draft was missing the Limited Use language.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds CWS-required browser extension section including Limited Use Disclosure
clause (Chrome Web Store User Data Policy hard requirement). Placed after
Cookies section to group platform-specific data handling disclosures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- auth-bridge.ts line ref 6 → 8 (justification is on line 8, not 6)
- Store description: (iOS) → (iOS and Android) — app.config.ts has both platforms
- §1.1a: add action.default_icon 128 alongside top-level icons field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add manifest icons and CSP, safe DOM renderLog, offscreen justification,
CWS submission artifacts doc, and mark the readiness spec implemented.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align offscreen reason with justification, test production log renderer,
sync privacy copy with CWS artifacts, and fix doc lint/grep portability.

Co-authored-by: Cursor <cursoragent@cursor.com>
feat(extension): CWS submission readiness
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f8ed21a-f0a9-496c-ba09-714dac390406

📥 Commits

Reviewing files that changed from the base of the PR and between 484c5fd and d12ad20.

📒 Files selected for processing (9)
  • app/privacy.tsx
  • cloud-agent/src/handlers/schedulerTriggerHandler.test.ts
  • cloud-agent/src/handlers/schedulerTriggerHandler.ts
  • cloud-agent/src/handlers/wsLiveAgentHandler.ts
  • cloud-agent/src/services/firestoreSession.test.ts
  • cloud-agent/src/services/firestoreSession.ts
  • docs/browser-bridge.md
  • docs/superpowers/plans/2026-06-29-phase3-proactive-scheduler.md
  • src/components/PolicyMarkdown.tsx
📝 Walkthrough

Walkthrough

Adds a Cloud Scheduler-triggered browser-task endpoint with secret auth, credit handling, Firestore task coordination, and Expo Push completion. Also updates the extension for MV3 submission readiness, including manifest, content-bridge, auth, side-panel, and privacy/documentation changes.

Changes

Cloud Agent — Phase 3 Proactive Scheduler

Layer / File(s) Summary
Proactive notification and push signature changes
cloud-agent/src/services/fcmDispatcher.ts, cloud-agent/src/services/fcmDispatcher.test.ts, cloud-agent/src/services/liveToolAdapter.ts, cloud-agent/src/tools/browserAction.ts, cloud-agent/src/tools/browserAction.test.ts
Adds sendProactive to the dispatcher and threads sessionId through live push callbacks and browser-action invocation paths.
Approval token verification in auth observer
cloud-agent/src/handlers/authApprovalObserver.ts, cloud-agent/src/handlers/authApprovalObserver.test.ts, cloud-agent/src/handlers/wsBrowserAgentHandler.ts, cloud-agent/src/handlers/wsBrowserAgentHandler.test.ts
Adds approval-token verification to the auth observer and passes the verifier from the browser agent websocket handler.
Expo Push fallback from live voice session
cloud-agent/src/handlers/wsLiveAgentHandler.ts, cloud-agent/src/handlers/wsLiveAgentHandler.test.ts
Extends live-session handling with optional Expo token lookup and fallback task-completion pushes when the voice session is already closed.
Scheduler trigger handler and tests
cloud-agent/src/handlers/schedulerTriggerHandler.ts, cloud-agent/src/handlers/schedulerTriggerHandler.test.ts
Implements scheduler request validation, authorization, task waiting, timeout handling, credit spend/refund behavior, and proactive notification delivery, with a comprehensive test suite.
Route wiring, deploy secret, and docs
cloud-agent/src/index.ts, cloud-agent/src/index.test.ts, cloud-agent/scripts/deploy.sh, AGENTS.md, CONTRIBUTING.md, README.md, docs/...
Adds the scheduler route and limiter, wires the deployment secret update, and updates checks, top-level docs, billing/docs, flowcharts, privacy-related docs, and implementation plans.

Extension CWS Readiness

Layer / File(s) Summary
Manifest, build split, and content bridge
extension/manifest.json, extension/esbuild.mjs, extension/src/content/bridge-listener.ts, extension/src/background/content-bridge.ts, extension/src/background/content-bridge.test.ts, extension/src/background/task-dispatcher.test.ts, extension/src/background/ws-client.test.ts, extension/src/content/executor.test.ts, extension/test/chrome-stub.ts
Adds manifest metadata and CSP, splits the esbuild passes, introduces the bridge listener content script, and replaces page-execution result reading with message-based action delivery.
Offscreen auth and GCM sequencing
extension/src/background/auth-bridge.ts, extension/src/offscreen/auth.ts, extension/src/background/service-worker.ts, extension/src/env.ts
Switches offscreen auth to the web-extension entrypoint, waits for auth readiness before token reads, sequences device registration after storing the GCM token, and requires extension environment injection at runtime.
Side panel auth and log rendering
extension/src/ui/side-panel/render-log.ts, extension/src/ui/side-panel/panel.ts, extension/src/ui/side-panel/panel.test.ts, extension/src/ui/side-panel/index.html
Reworks the side panel to use email/password sign-in, cached or polling device registration, and safe log rendering through a shared DOM helper.
Firestore, privacy, and CWS submission docs
firestore.rules, firestore.indexes.json, src/config/privacyConfig.ts, tsconfig.json, docs/cws-submission-artifacts.md, docs/superpowers/specs/2026-06-30-cws-extension-readiness-design.md, docs/superpowers/plans/2026-06-30-cws-extension-readiness.md
Tightens Firestore approval updates, adds composite indexes, updates privacy policy metadata and browser-extension data usage text, excludes the extension from root typecheck, and adds the CWS submission, spec, and implementation-plan documents.

Sequence Diagram(s)

sequenceDiagram
  participant CloudScheduler
  participant indexts as index.ts
  participant SchedulerHandler as schedulerTriggerHandler
  participant Firestore
  participant FcmDispatcher
  participant ExpoPush
  CloudScheduler->>indexts: POST /agent/browser/scheduler-trigger (Bearer secret)
  indexts->>SchedulerHandler: authorize and create handler
  SchedulerHandler->>SchedulerHandler: validate request, block host, check approval
  SchedulerHandler->>SchedulerHandler: spendCredit
  SchedulerHandler->>Firestore: create session and task intent
  SchedulerHandler->>FcmDispatcher: wake browser bridge
  SchedulerHandler->>Firestore: wait for terminal task
  SchedulerHandler->>ExpoPush: sendProactive on completion
  SchedulerHandler->>indexts: 200 or 504 JSON response
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Poem

🐇 I hop through clouds and browser skies,
With secret keys and careful ties.
A bridge wakes up, then drifts to rest,
While clean DOM logs pass every test.
If voice goes quiet, pushes sing—
A tidy hop for everything!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.90% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too vague to convey the actual change set and doesn't help a teammate understand the primary update. Use a specific title like 'Harden Clanker Desktop Bridge for Chrome Web Store review' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description directly matches the extension readiness, docs, manifest, and test changes in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

Comment thread cloud-agent/src/handlers/schedulerTriggerHandler.test.ts Fixed
Move scheduler secret verification into middleware mounted after the
rate limiter so CodeQL no longer flags missing rate limiting on the
handler and its unit-test route setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
@equationalapplications

Copy link
Copy Markdown
Owner Author

/fix-pr follow-up

Commit: 484c5fd0

Review resolution

  • CodeQL / Missing rate limiting (scheduler-trigger): Fixed — moved SCHEDULER_SECRET bearer verification into createRequireSchedulerSecret middleware mounted after schedulerTriggerLimiter in production and test routes; removed duplicate auth from the handler body; wrapped intentRequiresAuth as scheduledActionNeedsApproval to avoid the false-positive auth heuristic. (files: cloud-agent/src/handlers/schedulerTriggerHandler.ts, cloud-agent/src/handlers/schedulerTriggerHandler.test.ts, cloud-agent/src/index.ts)

Verification

  • typecheck — pass (cd cloud-agent && npm run typecheck)
  • lint — N/A (no lint script in cloud-agent/package.json)
  • tests — pass (cd cloud-agent && npm test, 192 passed / 1 skipped)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
extension/src/background/service-worker.ts (1)

36-38: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Silent failure on GCM registration error.

The combined guard if (chrome.runtime.lastError || !registrationToken) return now drops the error without any logging (the prior implementation logged lastError). A failed registration will leave the device silently unregistered with no diagnostic signal. Consider logging chrome.runtime.lastError before returning.

🔧 Suggested logging
-  chrome.gcm.register([FIREBASE_SENDER_ID], (registrationToken) => {
-    if (chrome.runtime.lastError || !registrationToken) return
-    void chrome.storage.local.set({ gcmToken: registrationToken }).then(() => registerDevice(registrationToken))
+  chrome.gcm.register([FIREBASE_SENDER_ID], (registrationToken) => {
+    if (chrome.runtime.lastError || !registrationToken) {
+      console.error('GCM register failed', chrome.runtime.lastError?.message)
+      return
+    }
+    void chrome.storage.local.set({ gcmToken: registrationToken }).then(() => registerDevice(registrationToken))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@extension/src/background/service-worker.ts` around lines 36 - 38, The GCM
registration path in service-worker.ts is swallowing failures because the
callback in chrome.gcm.register returns early when chrome.runtime.lastError is
set without recording it. Update the chrome.gcm.register callback to log
chrome.runtime.lastError before the return, then keep the existing
registrationToken handling and registerDevice flow so failures are visible for
debugging.
extension/src/ui/side-panel/panel.ts (1)

23-23: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider clearing gcmToken on sign-out too.

Sign-out removes deviceId but leaves the cached gcmToken in chrome.storage.local. After signing in as a different account, registerThisDevice() mints a fresh deviceId but reuses the stale gcmToken. Likely harmless since the token is device-bound, but clearing both keeps storage consistent.

♻️ Optional cleanup
-$('signout').addEventListener('click', () => { void signOut(auth); void chrome.storage.local.remove('deviceId') })
+$('signout').addEventListener('click', () => { void signOut(auth); void chrome.storage.local.remove(['deviceId', 'gcmToken']) })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@extension/src/ui/side-panel/panel.ts` at line 23, Signing out in the side
panel currently clears only `deviceId` and leaves `gcmToken` behind, so update
the click handler in `panel.ts` to remove both keys from `chrome.storage.local`
when `signOut(auth)` runs. Use the existing `signOut` listener on `$('signout')`
as the entry point and extend the storage cleanup alongside the current
`deviceId` removal.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cloud-agent/src/handlers/schedulerTriggerHandler.ts`:
- Around line 27-32: The scheduler trigger flow currently accepts any valid
request and can create new IDs and spend credit repeatedly, so add an
idempotency key to schedulerBodySchema and validate it in
schedulerTriggerHandler before any credit spend or task creation. Reserve/check
the scheduler run key transactionally in the same path that handles the request,
then short-circuit duplicate retries so the later task-enqueue and credit logic
only runs once for each run key.

In `@cloud-agent/src/handlers/wsLiveAgentHandler.ts`:
- Around line 397-416: The live tool delivery path in wsLiveAgentHandler should
not stop on a failed sendToolResponse call, because the current try/catch in the
sessionOpen branch swallows the error and returns before the Expo Push fallback
can run. Update the browser_action handling so sendToolResponse failures are
detected and the code continues into the existing fallback flow that uses
bridgeBase.fcmDispatcher, firebaseUid, and getExpoPushToken; only return early
when delivery truly succeeds.

In `@docs/browser-bridge.md`:
- Around line 51-60: The fenced block in the browser bridge docs is missing a
language tag, so update the markdown fence to use an appropriate label such as
text. Make the change in the unlabeled code block that shows the FCM
WAKE_AND_CONNECT flow so the markdown stays lint-clean and renders correctly.

In `@docs/superpowers/plans/2026-06-29-phase3-proactive-scheduler.md`:
- Around line 963-977: Add the missing Content-Type header to the Cloud
Scheduler example for the scheduler-trigger POST so the request is explicitly
sent as JSON. Update the example near the scheduler-trigger job details to
include Content-Type: application/json alongside the existing Authorization
header, matching the req.body JSON validation expected by the handler.

In `@src/config/privacyConfig.ts`:
- Around line 72-95: Render the privacy copy as markdown instead of plain text:
the content in privacyConfig is written with heading and bold syntax, but
app/privacy.tsx passes PRIVACY.privacy directly into Text, so it should be
parsed/rendered with a markdown-aware component or converted before display.
Update the privacy screen rendering path in app/privacy.tsx (and any related
privacy text component) so the existing markdown in PRIVACY.privacy is formatted
correctly without changing the copy itself.

---

Nitpick comments:
In `@extension/src/background/service-worker.ts`:
- Around line 36-38: The GCM registration path in service-worker.ts is
swallowing failures because the callback in chrome.gcm.register returns early
when chrome.runtime.lastError is set without recording it. Update the
chrome.gcm.register callback to log chrome.runtime.lastError before the return,
then keep the existing registrationToken handling and registerDevice flow so
failures are visible for debugging.

In `@extension/src/ui/side-panel/panel.ts`:
- Line 23: Signing out in the side panel currently clears only `deviceId` and
leaves `gcmToken` behind, so update the click handler in `panel.ts` to remove
both keys from `chrome.storage.local` when `signOut(auth)` runs. Use the
existing `signOut` listener on `$('signout')` as the entry point and extend the
storage cleanup alongside the current `deviceId` removal.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 45a5e37e-8c78-44c2-9e3a-5e39264bb8f3

📥 Commits

Reviewing files that changed from the base of the PR and between 65a9b5d and 024069a.

📒 Files selected for processing (54)
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • cloud-agent/scripts/deploy.sh
  • cloud-agent/src/handlers/authApprovalObserver.test.ts
  • cloud-agent/src/handlers/authApprovalObserver.ts
  • cloud-agent/src/handlers/schedulerTriggerHandler.test.ts
  • cloud-agent/src/handlers/schedulerTriggerHandler.ts
  • cloud-agent/src/handlers/wsBrowserAgentHandler.test.ts
  • cloud-agent/src/handlers/wsBrowserAgentHandler.ts
  • cloud-agent/src/handlers/wsLiveAgentHandler.test.ts
  • cloud-agent/src/handlers/wsLiveAgentHandler.ts
  • cloud-agent/src/index.test.ts
  • cloud-agent/src/index.ts
  • cloud-agent/src/services/fcmDispatcher.test.ts
  • cloud-agent/src/services/fcmDispatcher.ts
  • cloud-agent/src/services/liveToolAdapter.ts
  • cloud-agent/src/tools/browserAction.test.ts
  • cloud-agent/src/tools/browserAction.ts
  • docs/ai-and-chat.md
  • docs/architecture-and-data.md
  • docs/billing-and-credits.md
  • docs/browser-bridge.md
  • docs/cws-submission-artifacts.md
  • docs/edge-agent.md
  • docs/flowcharts/README.md
  • docs/flowcharts/c4/containers.md
  • docs/flowcharts/c4/system-context.md
  • docs/real-time-voice-chat.md
  • docs/superpowers/plans/2026-06-29-phase3-proactive-scheduler.md
  • docs/superpowers/plans/2026-06-30-cws-extension-readiness.md
  • docs/superpowers/specs/2026-06-29-mv3-browser-extension-bridge-design.md
  • docs/superpowers/specs/2026-06-30-cws-extension-readiness-design.md
  • extension/esbuild.mjs
  • extension/manifest.json
  • extension/src/background/auth-bridge.ts
  • extension/src/background/content-bridge.test.ts
  • extension/src/background/content-bridge.ts
  • extension/src/background/service-worker.ts
  • extension/src/background/task-dispatcher.test.ts
  • extension/src/background/ws-client.test.ts
  • extension/src/content/bridge-listener.ts
  • extension/src/content/executor.test.ts
  • extension/src/env.ts
  • extension/src/offscreen/auth.ts
  • extension/src/ui/side-panel/index.html
  • extension/src/ui/side-panel/panel.test.ts
  • extension/src/ui/side-panel/panel.ts
  • extension/src/ui/side-panel/render-log.ts
  • extension/test/chrome-stub.ts
  • firestore.indexes.json
  • firestore.rules
  • src/config/privacyConfig.ts
  • tsconfig.json

Comment thread cloud-agent/src/handlers/schedulerTriggerHandler.ts
Comment thread cloud-agent/src/handlers/wsLiveAgentHandler.ts
Comment thread docs/browser-bridge.md Outdated
Comment thread docs/superpowers/plans/2026-06-29-phase3-proactive-scheduler.md
Comment thread src/config/privacyConfig.ts
…backs

Add scheduler runKey reservation before credit spend, fall back to Expo Push
when live tool delivery fails, render privacy markdown, and fix doc lint gaps.

Co-authored-by: Cursor <cursoragent@cursor.com>
@equationalapplications

Copy link
Copy Markdown
Owner Author

/fix-pr follow-up

Commit: d12ad209

Review resolution

  • schedulerTriggerHandler idempotencyFixed: Added required runKey to request schema; reserveSchedulerRun / getSchedulerRun in Firestore session atomically reserve a run before credit spend or task creation; duplicate retries join the existing session/task without double-charging. (files: cloud-agent/src/handlers/schedulerTriggerHandler.ts, cloud-agent/src/services/firestoreSession.ts, tests)
  • wsLiveAgentHandler Expo Push fallbackFixed: pushToLive now continues to Expo Push when sendToolResponse throws while the voice session is still open. (files: cloud-agent/src/handlers/wsLiveAgentHandler.ts)
  • browser-bridge.md fenced blockFixed: Added text language tag to Wake-and-Connect lifecycle fence. (files: docs/browser-bridge.md)
  • Cloud Scheduler example Content-TypeFixed: Documented Content-Type: application/json and runKey in scheduler job body example. (files: docs/superpowers/plans/2026-06-29-phase3-proactive-scheduler.md)
  • privacy markdown renderingFixed: Added PolicyMarkdown component and wired app/privacy.tsx to render ## headings and **bold** labels. (files: src/components/PolicyMarkdown.tsx, app/privacy.tsx)

Verification

  • typecheck — pass (cd cloud-agent && npm run typecheck; npm run typecheck)
  • lint — pass (npm run lint:check)
  • tests — pass (cd cloud-agent && npm test)

@equationalapplications
equationalapplications merged commit 28e8516 into main Jun 30, 2026
6 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 1, 2026
3 tasks
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.

2 participants