Skip to content

Improve mock policy server troubleshooting - #333930

Merged
joshspicer merged 2 commits into
mainfrom
improve-mock-policy-server-ux
Sep 2, 2026
Merged

joshspicer merged 2 commits into
mainfrom
improve-mock-policy-server-ux

Conversation

@joshspicer

Copy link
Copy Markdown
Contributor

Summary

  • redesign the mock policy server UI around clearer setup, troubleshooting, live requests, schema validation, and file deployment workflows
  • add durable browser and atomic server-side response persistence, including recovery across server restarts
  • expand the control API and documentation for agents, file deployment, configurable ports, proxy probes, and actionable route errors
  • remove the misleading product-overrides workflow and document system-proxy behavior across supported clients
  • improve the JSON editor with formatting, indentation, smart newlines, and keyboard escape behavior

Validation

  • repository pre-commit hygiene hook
  • editor diagnostics for the changed TypeScript, HTML, and CSS files
  • git diff --check
  • browser interaction checks for endpoint visibility, disclosures, tooltips, JSON editing, draft storage, and setup guidance
  • isolated process-restart tests for disk persistence and browser-to-server recovery without reloading the page

Copilot AI balanced review requested due to automatic review settings September 2, 2026 03:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Stale browser drafts can overwrite newer server state, and configurable-upstream guidance remains hardcoded to api.github.com.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 High severity · 3 Low severity

New issues introduced by this change (4)
Severity Finding
High severity scripts/​mock-policy-server/​public/​app.ts — A persisted browser value is always preferred over the server value here and, when they differ, is…
Low severity scripts/​mock-policy-server/​README.md — This absolute probe example conflicts with the newly documented configurable upstream: the GUI…
Low severity scripts/​mock-policy-server/​public/​app.ts — This tooltip becomes incorrect when the newly supported --upstream/MOCK_POLICY_UPSTREAM option…
Low severity scripts/​mock-policy-server/​public/​index.html — The probe target is not always api.github.com now that the server supports a configurable upstream;…
What changed in this PR

Improves the mock policy server’s persistence, troubleshooting UI, control API, and documentation.

Changes:

  • Adds atomic endpoint-state persistence, configurable ports, and file-deployment APIs.
  • Redesigns setup, troubleshooting, validation, and deployment workflows.
  • Enhances JSON editing and browser draft recovery.
File Description
server.ts Adds persistence and API capabilities.
README.md Documents revised workflows.
public/​style.css Styles redesigned UI surfaces.
public/​index.html Restructures setup and troubleshooting UI.
public/​app.ts Implements persistence and editor behavior.
endpoints.ts Updates proxy workflow documentation.
local-testing.md Updates contributor testing guidance.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/mock-policy-server/README.md Resolved
@joshspicer
joshspicer enabled auto-merge (squash) September 2, 2026 04:07
@joshspicer
joshspicer merged commit f6258c4 into main Sep 2, 2026
40 checks passed
@joshspicer
joshspicer deleted the improve-mock-policy-server-ux branch September 2, 2026 04:26
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 2, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants