Repository navigation
refactor(ui): use native menus for device actions - #170784
Merged
Merged
Conversation
Keep device action ordering, pairing permission reasons, trigger accessibility, callbacks, and focus across inventory refreshes while moving Devices onto the shared Menu owner.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 13, 2026 07:30
Contributor
Codex Review SummaryThis 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. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 14, 2026
* refactor(ui): use native menus for device actions Keep device action ordering, pairing permission reasons, trigger accessibility, callbacks, and focus across inventory refreshes while moving Devices onto the shared Menu owner. * test(ui): use native device menu selectors * test(ui): add context to device action assertions
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Devices row action menu still depended on Web Awesome after the shared native menu became available.
User Impact
Device actions now use the shared native menu while preserving action order, pairing permission explanations, clipboard feedback, alias editing, and removal. Focus stays on Copy device ID when an inventory refresh inserts approval actions before it.
Why This Change Was Made
Use the existing Menu owner for rendering, navigation, and activation. The Devices consumer retains its callbacks and live pairing-permission check. Update the two unit files and three directly coupled E2E callers to activate the native menu items.
Production menu code shrinks from 124 to 116 lines. The two unit files grow by 41 lines to exercise actual trigger/item buttons; the four E2E selector replacements add no lines.
Evidence
pnpm tsgo:uipnpm test ui/src/pages/devices/devices-page.test.tsx --maxWorkers=1pnpm test ui/src/pages/devices/view.devices.test.ts --maxWorkers=1ab20301e7e49e3a9067d75991b24cabb07989fc1ab20301e7e49e3a9067d75991b24cabb07989fc1ff17aa266869db483aa30a9bc9f0bc7281f716ec; lint, core test types,security-fast, andopenclaw/ci-gateall passed, with no failed jobsCI on
ab20301e7e49e3a9067d75991b24cabb07989fc1found two missing requiredexpectDefineddiagnostic-context arguments and formatting in the touched test file. The follow-up commit adds those two messages and applies the repository formatter; it changes no production behavior. The formatter check passed, and the repair received a separate managed review. Runtime, build, and screenshot results above were recorded atab20301e7e49e3a9067d75991b24cabb07989fc1, before the later main integration. The Devices implementation itself is unchanged; the successful exact-head CI run covers the integrated graph.The branch also merges main at
e400b3a727c18ba13cd3edf80bf3adf83513ecc8, including the unrelated Subagents dialog test locator fix. The final head isff17aa266869db483aa30a9bc9f0bc7281f716ec. Its six-file authored patch is byte-identical to the independently reviewed patch; the integration was conflict-free.The local proof uses one private frozen install. The baseline build reuses its dependencies from a separate source checkout. Its first attempt exposed a missing package-local dependency link; after adding those dependency links, the unchanged baseline built successfully.
The desktop capture opens the actual row menu, focuses Copy device ID, publishes a mocked node-inventory refresh that inserts approval actions, and verifies retained item identity/focus, all six actions, clipboard output, menu closure, and trigger focus restoration. The narrow read-only capture verifies the disabled pairing actions and their reasons while Copy stays available. All four screenshots were inspected and contain synthetic data only.
The before/after desktop and narrow read-only screenshots are attached below.