Skip to content

Fix Server AI backend config and DevTools probe handling - #1

Draft
gardinermichael wants to merge 21 commits into
Rohit-Nehate:mainfrom
gardinermichael:agent/fix-devtools-csp-probe
Draft

Fix Server AI backend config and DevTools probe handling#1
gardinermichael wants to merge 21 commits into
Rohit-Nehate:mainfrom
gardinermichael:agent/fix-devtools-csp-probe

Conversation

@gardinermichael

@gardinermichael gardinermichael commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • Add lightweight root response for the local backend so opening http://localhost:8787/ does not fall through to the default Express 404 page.
  • Answer Chrome DevTools localhost workspace discovery probe at /.well-known/appspecific/com.chrome.devtools.json with 204 No Content.
  • Align /api/summarize validation with the extension background worker payload by removing the unused heuristicSummary requirement.
  • Add a real Server URL field in the popup and persist it to continueIt.ai.serverUrl.
  • Make the background worker use the configured Server URL instead of always posting to http://localhost:8787.
  • Clarify in the README that Server AI is not bundled into the extension: users need either a hosted backend with maintainer-provided secrets, a local backend with their own .env key, or BYOK.
  • Improve OpenRouter defaults and diagnostics: trim env values, expose non-secret config warnings in /health, warn when an OpenRouter URL is paired with a non-OpenRouter-looking key, and replace the unavailable meta-llama/llama-3.3-70b-instruct:free default with google/gemma-4-26b-a4b-it:free.

Why

Chrome DevTools probes localhost servers for automatic workspace discovery. When this backend did not handle the probe or root path, Express generated default error responses that could surface CSP noise in the browser console.

The Server AI docs also implied users could use the mode without supplying keys, but the repo does not ship a shared key and the extension should not bundle one. The keyless user experience only exists when users point the extension at a hosted backend that is already configured with provider secrets. For local use, the person running the backend must provide .env keys.

While testing Server AI, OpenRouter rejected the old default free model as no longer available for free. The new default was verified against OpenRouter and returns normal choices[0].message.content.

Validation

  • node --check server/server.js
  • node --check background.js
  • node --check shared-ai.js
  • node --check popup.js
  • GET / returns 200 OK
  • GET /.well-known/appspecific/com.chrome.devtools.json returns 204 No Content
  • GET /health returns the configured provider/model and non-secret warnings array
  • POST /api/summarize with the extension payload shape reaches provider configuration logic instead of failing request validation
  • Smoke-tested google/gemma-4-26b-a4b-it:free through the local backend and received ok: true with a summary

@gardinermichael gardinermichael changed the title Fix localhost DevTools probe handling Fix Server AI backend config and DevTools probe handling Aug 11, 2026
gardinermichael and others added 19 commits August 10, 2026 20:59
A slow summarization request left the page with no sign of activity, so a
working export was indistinguishable from a hung extension.

Adds ui.createProgress() in shared-ui.js: a progress light tracing the
viewport edge, a grey non-blocking scrim, a status chip with the current
phase, message count, animated ellipses and elapsed seconds, and a
progress fill inside the launcher button itself. All layers are
pointer-events: none, so the page stays usable while the export runs.

The export drives it in phases — scan (measured by how far the transcript
still has to scroll back), build, summarize, prepare review. The
summarize phase has no measurable progress, so it creeps toward its end
and adds a "still waiting on the model" note after 12s rather than
parking the bar. Terminal states turn the whole indicator green or red
with the failure reason.

Also guards against a second concurrent export on the same tab, and gives
the popup's Test connection button the same elapsed-time treatment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NYMeEC8y68JvPaQQLEiUKU
Correct the deprecated Chrome built-in AI surface in background.js. The
context-usage and overflow code used measureContextUsage(), contextWindow,
and the "contextoverflow" event, which are superseded by measureInputUsage(),
inputUsage/inputQuota, and "quotaoverflow" on current Chrome. Because the old
names no longer exist there, the guards silently skipped and the overflow ->
Server AI / BYOK fallback routing never fired. Prefer the current names with a
legacy fallback so overflow is detected across Chrome versions.

Stop versioning the generated per-tool skill mirrors (.bob, .bolt, .cline,
.cursor, .kilo, .roo, .github/skills, output/). They are machine-generated
copies of the canonical skills in .agents/skills/ and inflate the diff without
adding reviewable source. Add them to .gitignore and untrack them.

Add docs/Plans/2026-08-11-source-resweep-review.md (second-pass audit of the
session knowledge export spec across all 49 referenced repositories) and fold
its promoted requirements into session-knowledge-repo-spec.md: atomic
session-bundle write, Verify/Guard split, bounded loops, deterministic session
teardown, verifier-backend provenance, provenance backlinks on compiled layers,
anti-skimming density floor, and branch/DAG-aware capture. Reorder the first
implementation slice so capture-completeness comes first.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3mV9pSmnPevC7fx7Xskey
The context-usage and overflow code used measureContextUsage(), contextWindow,
and the "contextoverflow" event. Current Chrome supersedes these with
measureInputUsage(), inputUsage/inputQuota, and "quotaoverflow". Because the old
names no longer exist there, the typeof guard skipped silently and the overflow
listener never fired, so the overflow -> Server AI / BYOK fallback routing was
effectively dead on current Chrome. Prefer the current names with a legacy
fallback so overflow is detected and routed across Chrome versions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3mV9pSmnPevC7fx7Xskey
…icator-ya72c8

Add persistent progress indicator for long-running exports
…ummary

Add Chrome AI agent guidance and export spec
…view-b5mzt3

Untrack generated skill mirrors and add second-pass export-spec review
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