Repository navigation
fix(ui): keep keyboard focus after removing a plugin - #161111
Conversation
Confirmed removal retires the Uninstall control that the shared confirmation returned focus to, so keyboard focus fell back to the document body on both the Plugins hub detail and the Settings detail. The plugins page now remembers the control that started the removal and, once the latest removal has settled and re-rendered, moves focus that fell to the body onto the remaining view's heading. Cancel still returns focus to Uninstall, and focus the user moved elsewhere is left alone. Real Gateway run with the rebuilt Control UI and a synthetic local plugin: after keyboard removal from Settings, focus is on the Plugins heading (main: document body).
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR restores keyboard focus to the surviving page heading after successful plugin removal. Example: Remove Demo Removal using the keyboard from /settings/plugins/demo-removal.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a current accessibility bug with a focused patch and sufficient refreshed behavior proof; no actionable findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI plugin page initiates removal through the shared confirmation and mutation owners, then restores presentation focus after authoritative inventory refresh. flowchart TD
A[Keyboard user] --> B[Plugin detail page]
B --> C[Shared confirmation dialog]
C --> D[Plugin mutation owner]
D --> E[Gateway uninstall and inventory refresh]
E --> F[Surviving page heading]
Technical reviewBest possible solution: Land the focused page-owned focus handoff after the remaining required checks pass. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the failing removal path, and contributor-supplied baseline results show BODY focus after confirmation; this read-only review did not execute target code. Is this the best way to solve the issue? The plugin page owns the disappearing view and its surviving heading, so this handoff complements the shared modal without introducing a competing dialog or mutation owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 26a40f394894. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +23, Tests +69. Total +92 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed October 11, 2026, 11:48 PM ET / October 12, 2026, 03:48 UTC (Revision 4). |
…l-focus main's openclaw#168758 rewrote the plugins page on Solid with PluginsPageController. This merge takes main's plugins-page.ts; the next commit ports the post-removal focus repair onto the controller's uninstall flow.
…gins page (openclaw#127327) main's openclaw#168758 moved the plugins page to PluginsPageController, so the merge took main's plugins-page.ts. Re-apply the removal focus repair in the controller's uninstall flow: remember the focused control inside the page before confirmation, and after the latest mutation's catalog refresh move focus that fell to the document body onto the remaining view's heading.
|
Refreshed onto current Heads-up: |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…l-focus Picks up da8802b, which restores the reactive projections main's Control UI build needs. No conflicts; the fix is unchanged.
|
Added real-Gateway proof for the Solid integration. Current head With the Control UI rebuilt from this head and served by an isolated Gateway, a keyboard-only removal of a synthetic Demo Removal plugin on |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Removing a plugin from Settings > Plugins retired the focused Uninstall button and left keyboard focus on the page body. Focus now moves to the Plugins heading after removal; Cancel returns focus to Uninstall on both the Settings page and the Plugins hub, and focus the user moved elsewhere while removal was pending is left alone. Proof: real isolated Gateway and browser. On main Settings removal left document.activeElement on BODY; with the PR it is the Plugins heading, and the Cancel and moved-focus controls passed. Known follow-up: removing a local or pack-installed plugin from the Plugins hub still drops focus, because the retired route shows Unknown local plugin discovery identity; tracked separately. Fixes openclaw#127327. Thanks @MoerAI. Co-authored-by: Ayaan Zaidi <[email protected]>
Fixes #127327
What problem this solves
After keyboard-confirmed removal in Settings > Plugins, the focused Uninstall control disappears and focus falls to the page body. Keyboard and screen-reader users lose their place.
User-visible change
Focus moves to the remaining Plugins heading after successful removal in Settings. Canceling removal restores Uninstall on both the Settings page and Plugins hub. If the user moves focus elsewhere while removal is pending, the handoff leaves that focus alone.
The page captures the initiating control and, after the latest mutation settles and renders, focuses the surviving heading only when the initiating control has disconnected and focus is on the body. There are no Gateway, configuration, or stored-data changes.
Evidence
Real Chromium browser, rebuilt Control UI, isolated real Gateway, and a throwaway installed Demo Removal plugin:
37aefbf936a9576e91181630BODYH1PluginsBaseline after removal:
This head after removal:
The diagnostic labels display the observed
document.activeElement; screenshots contain only isolated synthetic state.Focused checks
plugins-lifecycle.e2e.test.ts: 9/9 passed, 21.45 s wall; keyboard cases 635 ms (catalog-backed hub fixture) and 806 ms (Settings).gpt-5-minismoke returnedP161111_LIVE_OK, without fallback.openclaw/ci-gateis successful; ClawSweeper reports ready with no findings.Known follow-up: Plugins hub removal of local/packed installs still drops focus because the retired route shows Unknown local plugin discovery identity. This is a separate pre-existing route-retirement bug, tracked separately; it is not repaired or claimed by this PR. No GitHub issue was opened for it.
Thanks to @steipete for the report and @MoerAI for the implementation and original proof. The contributor's commits are preserved, including the port to the Solid plugins page.
No overlap with Pash/Sarah changes.
Merge risk
Two-way door: reverting removes only the UI focus handoff. No persisted-state, schema, permission, or public API changes. Blast radius is keyboard focus during Control UI plugin removal.