Skip to content

Expand typed VotingPlugin configuration editing - #40

Open
BenCodez wants to merge 5 commits into
mainfrom
control-typed-configuration
Open

BenCodez wants to merge 5 commits into
mainfrom
control-typed-configuration

Conversation

@BenCodez

@BenCodez BenCodez commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Adds a shared allowlist of 70 typed fields across six existing VotingPlugin configuration files. The browser Full YAML workbench adds a typed field dialog. Scoped MCP tools list and read agent-visible fields and preview up to eight typed changes on one authorized node. The editor supports nested booleans, bounded integers, choices and lists while preserving bytes outside the selected spans.

Command strings, lore and database pool sizes are available through the browser. This feature saves configuration and has no command or reward execution action. The MCP catalog excludes those fields and credentials. Advanced structures and connection settings retain the existing masked browser workflow.

Previews bind the current session, revision, masked source and exact changed paths. Typed browser Apply requires the authenticated session and CSRF token. Its single-use approval stays internal. No connector protocol or server capability changes are required.

This follow-up is based on main after PR #39. Independent source and security review passed. Maven verification passed 361 tests and JavaScript syntax checks passed. Disposable packaged stdio and Codex App Server exercised the typed nested and list workflow, including browser-session review and approval. Graphical browser rendering and Claude Code runtime were not verified. The configuration coverage document records supported and excluded surfaces.

Follow-up for the Apply lifecycle review: successful Apply closes the typed editor and uses the shared invalidation reload. A delayed reread does not replace the status of a newly selected file. A changed input generation, selected file, node session or authentication context prevents this cleanup. The focused frontend regression executes the Apply handler and shared operation lifecycle. Frontend verification under Node 22.23.5: 187 of 194 tests pass. Seven workspace tests fail with the same missing navigation helper in the test harness on the PR base and the current head. The sign-out and expiry test now exercises the managed-fields teardown and passes; the base harness stopped at a missing agent credential helper.

Preview responses and polls retain their own operation ID. Only the current request can enable Apply or publish its approval, and stale responses are discarded by their own ID. Nine focused frontend tests pass, including overlapping requests, stale polling, context changes, Apply reload and authentication teardown.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f87b2cb4-b8b0-4113-8797-8fcd4d7dc551
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T05:44:33.696846Z c6c5f8c New commits
🔒 Security Review ✅ Completed 2026-11-19T02:19:23.474474Z dddf82f 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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dddf82f17f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +5019 to +5021
editor.generation = inputGeneration + 1;
const result = await startConfigurationOperation('/api/v1/configuration/managed-fields/apply', approval, typedFieldsStatus);
if (!typedFieldsCurrent(editor)) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle successful Apply invalidation before checking editor generation

After a successful typed-field Apply, waitForOperation() calls invalidateConfigurationReads(), which calls clearApprovals() and increments inputGeneration again. The editor anticipates only the increment at the start of Apply, so typedFieldsCurrent(editor) is false here even when the user has not changed anything. Consequently, every successful Apply skips the dialog-close and reload branch, leaving the modal open with both action buttons disabled and its original field values still displayed. Account for the completion-time invalidation without treating it as a user context change.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9e6a566c0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main/resources/web/app.js Outdated
Comment on lines +4990 to +4993
editor.approval = {previewOperationId: proposal.operation.operationId};
const requestCurrent = () => typedFieldsCurrent(editor) && key === typedFieldsKey.value && input === typedFieldsValue.value;
if (!requestCurrent()) {
discardTypedFieldApproval(editor);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate the preview request before replacing its approval

If a user previews one field, switches fields while that request is pending, and previews again, selecting the second field re-enables Preview and allows overlapping requests. If the second response arrives first, the older response subsequently overwrites editor.approval here, fails requestCurrent(), and clears the approval. The second preview can then finish with “Approve and apply” enabled but editor.approval === null, so clicking it does nothing. Check request currency before replacing shared approval state, and discard stale responses using their own operation IDs rather than the editor's current approval.

Useful? React with 👍 / 👎.

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