Skip to content

fix(console): show a reader the version draft's default plugin approvers - #3625

Merged
freeqaz merged 4 commits into
mainfrom
fix-reader-plugin-approvers
Oct 25, 2026
Merged

freeqaz merged 4 commits into
mainfrom
fix-reader-plugin-approvers

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A member who can read an Agent but not update it never sees the version draft's default plugin approvers on the Plugins tab. The approver field stays hidden until the plugin policy capabilities read answers, and since #3608 the page no longer sends that read to a caller whose permission answer denies Agent update (the route needs Agent update). The next deployment still uses those approvers, and the same reader opening an admitted version does see them in its snapshot.

The guide also says Open version draft shows only without Configuration update. Since #3611 it also shows when the caller lacks Secret operate on a Secret the Configuration binds.

Change

  • plugins.mts: when the permission answer refuses a save, the Plugins tab shows the saved default approvers as text under Default plugin approvers, the way the version snapshot does. One shared approverSummary helper now renders both. Editors and unknown permission answers keep the existing field and capabilities read.
  • configuration-plugins-and-files.md: the Open version draft sentence names the Secret operate case, and the read-only plugins sentence names the default approvers.
  • Storybook: the pluginsUpdateDenied story now has a saved default approver.

Verification

All browser runs used a remote test VM, each in a private network namespace.

  • New browser test A reader sees the version draft's default plugin approvers (console-agent-plugin-approvers.test.mjs): a namespace member with only read grants opens the draft's Plugins tab, sees the heading, the note and the saved approver, sees no approver field, and sends no capabilities read.
    • It fails on main (no approvers heading for the reader) and passes on this branch.
    • The whole file passes (9/9).
    • The new test, plus the two existing reader tests in console-agent-detail.test.mjs, pinned 20/20 at 2 CPUs.
  • tsc (repo and tests), ESLint and Prettier pass on the touched files.
  • Storybook (simulated UI proof): Pages/Agent detail → Plugin selections, viewer cannot update the Agent (pluginsUpdateDenied), from the prepared assets of each revision.

Before (main), 1440 wide: the reader sees no default approvers.

before-pluginsUpdateDenied-1440

After, 1440 wide:

after-pluginsUpdateDenied-1440

After, 390 wide:

after-pluginsUpdateDenied-390

Not verified: there is no video. The change adds static text with no controls, so the screenshots show the whole result. Storybook data is simulated; the browser test covers the real API path.

Risks

Low. This is a console read-only view; no API or permission change. Approvers show as raw channel: id text, with no Slack name lookup, the same as the version snapshot. A reader does not get the directory lookup, which needs Secret access.

Finding 2447: the approver field waits for the policy capabilities read,
which the Plugins tab skips for a caller who may not update the Agent, so a
reader never saw the draft's default approvers. Show them as text, as the
version snapshot does.

Finding 2445: the guide now says Open version draft also shows without
Secret operate on a bound Secret.
@freeqaz
freeqaz requested a review from a team as a code owner October 25, 2026 11:58
@clawsweeper

clawsweeper Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

The flow is at its 2500-word limit; the guide carries the reader approvers
note.
@freeqaz
freeqaz merged commit 9198a04 into main Oct 25, 2026
39 of 42 checks passed
@freeqaz
freeqaz deleted the fix-reader-plugin-approvers branch October 25, 2026 12:16
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