mock-policy-server: move Product Overrides to the Policies sidebar - #333696
Draft
joshspicer wants to merge 1 commit into
Draft
mock-policy-server: move Product Overrides to the Policies sidebar#333696joshspicer wants to merge 1 commit into
joshspicer wants to merge 1 commit into
Conversation
Move the Code OSS product.overrides.json deploy action out of the Setup dialog into a compact Product Overrides widget in the Policies sidebar: a status pill plus a single Apply Overrides / Restore Original button, with the full instructions tucked behind a hoverable and keyboard-focusable (i) popover (Escape dismisses it while keeping focus on the trigger). With only the system proxy method left, simplify the Setup dialog by dropping the radio-based method picker and its now-dead selection logic. Update the README to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
scripts/mock-policy-server/public/index.html — The newly always-visible action is enabled before /api/state initializes overridesWired, and it… |
|
scripts/mock-policy-server/public/app.ts — Escape is only observed when the trigger owns keyboard focus. If the panel was opened by hover… |
|
scripts/mock-policy-server/public/style.css — The popover's new translate/fade transition still runs for users who request reduced motion; the… |
What changed in this PR
Moves Product Overrides from Setup into the Policies sidebar and simplifies Setup to system proxy configuration.
Changes:
- Adds a sidebar override-status widget and informational popover.
- Simplifies the Setup dialog.
- Updates supporting styles, behavior, and documentation.
| File | Description |
|---|---|
README.md |
Documents the revised connection workflows. |
public/style.css |
Styles the simplified dialog and sidebar popover. |
public/index.html |
Relocates Product Overrides and simplifies Setup. |
public/app.ts |
Removes method selection and adds popover behavior. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| </div> | ||
| </span> | ||
| </div> | ||
| <button id="overrides-action" type="button" class="btn-primary btn-full">Apply Overrides</button> |
Comment on lines
+944
to
+948
| trigger.addEventListener('keydown', event => { | ||
| if (event.key === 'Escape') { | ||
| popover.classList.add('dismissed'); | ||
| } | ||
| }); |
Comment on lines
+875
to
+881
| .info-popover:hover .info-popover-panel, | ||
| .info-popover:focus-within .info-popover-panel { | ||
| opacity: 1; | ||
| visibility: visible; | ||
| transform: translateY(0); | ||
| transition: opacity 0.15s ease, transform 0.15s ease; | ||
| } |
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
Moves the Product overrides action (the "deploy as a file" that writes
product.overrides.json) out of the Setup modal and into a compact widget in the Policies right sidebar, and simplifies the surrounding UX. Scope is limited to the dev-only, non-shippedscripts/mock-policy-server/GUI.What changed
Applied/Not applied) and a single full-width Apply Overrides / Restore Original button, sitting above Live Requests. Applying still wires/unwiresproduct.overrides.jsonand updates the global connection indicator exactly as before.selectSetupMethodlogic are removed, leaving one clean card. The intro now points at the sidebar for the one-click Code OSS option.No changes to
server.tsor the control API — the/api/wireand/api/unwirebehavior is unchanged; the element IDs (overrides-action,override-status) were only relocated.Verification
Driven end-to-end in a headless browser against the running server:
Applied ✓, and updates the header toCode OSS overrides active; the override files are cleaned up on restore.tsconpublic/app.tsis clean.Screenshots