Repository navigation
fix(plugin-profiles): refuse a second /plugin-profile while its picker pane is open - #17071
Conversation
…r pane is open The picker kept whether its pane was open in a module variable, which a reload of the mod reset, and nothing refused a second /plugin-profile while the pane was up, so a named profile could arm a second switch beside the open pick. The command now asks Claude Code whether the pane is open ($.ui.panes(), which outlives a reload), refuses a second run with a line saying a pick is already open, and a pick in the pane is refused while a switch from before waits for its reload. The person's own close is told apart by the close's origin instead of the variable. Closes #16816 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VcupooMdcrBzDGnAi3Mejz
|
Owned by the hub session Plugin Presets; it watches checks and review threads and merges. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec39443207
ℹ️ 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".
Two row presses could both read settling as false while the first pickerOpen lookup was pending, so both closed the pane and ran a switch. The guard is now set before that lookup and released in finally, including when the pane is already closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
claude-security-review reviewed Security review: PR #17071, plugin-profiles picker guardI found no security issues. I read every hunk of all 3 changed files: the changelog fragment, What the change does. It changes how the local
What I checked:
Spend. The change starts no charge and spends no extra credits. critical-findings: 0 |
|
claude-review reviewed Code review: PR #17071, fix(plugin-profiles): refuse a second /plugin-profile while its picker pane is openNo blocking or advisory findings. I read all 3 changed files in full: the changelog fragment, Closing issue #16816
Other checks
Checks that loosen None: the PR only adds tests and changes no existing assertion. Loosened-check verdict: fail (default; no Verifier dropped 0 of 0 candidates. |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Closes #16816
Summary
A second
/plugin-profilewhile the picker pane is open is now refused with a line saying a pick is already open, and the pick in the pane still completes. This fix also covers the two edge cases pr-verify noted on #16827, both listed in the issue's comments: a pick that ignored a switch already waiting for its reload, and an open-pane flag that a reload of the plugin's code reset.Fix
plugins/plugin-profiles/hooks/register.tsx:switchProfilefirst asks$.ui.panes()whether the picker pane is open. If it is,/plugin-profileis refused with or without a profile name, so a named profile can no longer arm a second switch beside the open pick. The refusal line:A profile pick is already open in its pane; pick there, or press Cancel and run /plugin-profile again.pickingflag is removed, because a reload of the plugin's code reset it. Whether the pane is open now comes from$.ui.panes(), which is Claude Code's own record and outlives a reload. A short-livedsettlingflag is kept only so a double press settles once.pickedchecks for a switch waiting for its reload again before it switches, and reports the same waiting line/plugin-profilegives.ui.closehook reports "No profile chosen" only when the close'sorigin.kindisperson. A row press or Cancel closes the pane throughpicked, which reports the outcome itself./plugin-profile.CI already runs the mod tests
The issue asked to check this. The Check Catalog job runs
scripts/validate-plugins.sh, which runsscripts/test-plugin-mods.sh, which runsclaude plugin test plugins/plugin-profiles. Evidence: Check Catalog run on #17045, job 134605969292, log line=== claude plugin test plugins/plugin-profiles ===followed by34 pass. No workflow namesclaude plugin testdirectly, which is why the comment on the issue found none. Like the other test lanes, Check Catalog skips draft PRs.Verification
claude plugin test plugins/plugin-profiles: 37 pass, 0 fail. The three new tests:claude plugin validate plugins/plugin-profilespassed. Its only warnings are the existing missing-icon and README install-line notes.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VcupooMdcrBzDGnAi3Mejz