Skip to content

Make preview-to-apply configuration flow explicit - #16

Merged
BenCodez merged 3 commits into
mainfrom
codex/fix-preview-apply-flow
Sep 17, 2026
Merged

BenCodez merged 3 commits into
mainfrom
codex/fix-preview-apply-flow

Conversation

@BenCodez

@BenCodez BenCodez commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • make every successful configuration preview state explicitly say that nothing has been saved yet
  • focus the enabled Approve and apply action immediately after a successful preview
  • cover proxy routing, full YAML, Quick Setup, dedicated setup controls, and reward builder
  • clarify that Ctrl/⌘+S in the YAML editor previews only and does not save
  • add static WebUI regression coverage for each preview-to-apply handoff

Root cause

Control intentionally separates PREVIEW from APPLY. VotingPlugin only writes YAML for APPLY tasks, but the WebUI currently ends the first step with “preview ready”, which can look like a completed save while no write has occurred.

This keeps the existing one-time approval/revision safety model intact; it makes the required write step unmistakable and immediately actionable.

Validation

  • JavaScript syntax validated with V8 parsing after the app.js changes
  • branch is 3 commits ahead of main with only app.js, index.html, and ControlHttpServerTest.java changed
  • GitHub CI is expected to run the full Maven/static WebUI suite on the PR

Summary by CodeRabbit

  • New Features

    • Preview confirmations now display the complete operation summary with a clear preview-only warning.
    • The “Approve and apply” button is automatically focused when available.
    • Configuration, file, setup, synchronization, and reward previews now consistently use the updated confirmation experience.
  • Documentation

    • Updated editor guidance clarifies that Ctrl/⌘+S only previews changes; applying changes requires selecting “Approve and apply.”

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: dc618473-c0da-48da-a8f7-3ff2c7164962

📥 Commits

Reviewing files that changed from the base of the PR and between 15cf0ee and 206c408.

📒 Files selected for processing (3)
  • src/main/resources/web/app.js
  • src/main/resources/web/index.html
  • src/test/java/com/bencodez/votingplugin/control/http/ControlHttpServerTest.java

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Recent review details
🔇 Additional comments (3)
src/main/resources/web/app.js (1)

3470-3474: LGTM!

Also applies to: 3991-3991, 4136-4136, 4379-4381, 4394-4394, 4585-4586, 4647-4648, 5183-5184

src/main/resources/web/index.html (1)

338-338: LGTM!

src/test/java/com/bencodez/votingplugin/control/http/ControlHttpServerTest.java (1)

413-418: LGTM!


📝 Walkthrough

Walkthrough

The web UI now presents successful previews as unsaved, identifies “Approve and apply” as the apply action, and focuses the relevant apply button. The editor text and route tests reflect this behavior.

Changes

Preview readiness presentation

Layer / File(s) Summary
Shared preview presentation and apply controls
src/main/resources/web/app.js
Added presentPreviewReady to show preview-only status, display the operation summary, and focus the available apply button. Dedicated setup wiring now includes its apply controls.
Preview flow integrations
src/main/resources/web/app.js
Routing, file configuration, synchronization, guided setup, dedicated setup, and reward previews use the shared presentation after approval details are created.
Preview-only text and validation
src/main/resources/web/index.html, src/test/java/com/bencodez/votingplugin/control/http/ControlHttpServerTest.java
The footer states that Ctrl/⌘+S previews changes only. Route tests verify the preview-only message and readiness presentation.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 206c4

The preview presentation and apply handoffs are consistently wired across the inspected flows, with no merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the preview-to-apply configuration flow explicit across the WebUI.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-17T23:57:04.260390Z 206c408 PR opened
🔒 Security Review ✅ Completed 2026-09-17T23:57:15.180300Z 206c408 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BenCodez
BenCodez merged commit 87ebd3b into main Sep 17, 2026
2 checks passed
@BenCodez
BenCodez deleted the codex/fix-preview-apply-flow branch September 17, 2026 23:59
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.

1 participant