Repository navigation
feat: session menu adds Open PR, Open in editor, and numbered group shortcuts - #104154
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 1:01 AM ET / 05:01 UTC. Summary PR surface: Source +395, Tests +197. Total +592 across 73 files. Reproducibility: yes. from source: sessions without managed worktrees return before PR lookup, and remote gateway paths are passed to browser-local editor schemes. The contributor has not demonstrated either path in a real setup. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Land Open PR and numeric group shortcuts against current main with PR lookup independent of worktree presence; defer editor opening unless an explicit same-host capability or owning-host dispatch makes the path valid, then prove the retained actions in a real setup. Do we have a high-confidence way to reproduce the issue? Yes from source: sessions without managed worktrees return before PR lookup, and remote gateway paths are passed to browser-local editor schemes. The contributor has not demonstrated either path in a real setup. Is this the best way to solve the issue? No. The session menu is an appropriate surface, but PR eligibility and editor host ownership need separate contracts; splitting editor opening is the narrowest safe current solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c47ceb0f3dcc. Label changesLabel justifications:
Evidence reviewedPR surface: Source +395, Tests +197. Total +592 across 73 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7ae085b38
ℹ️ 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".
| if (!row.worktree) { | ||
| this.sessionMenuWork = null; | ||
| return; | ||
| } |
There was a problem hiding this comment.
Don’t gate Open PR on managed worktrees
For sessions that have a GitHub PR but are not backed by a managed worktree (for example a normal agent workspace or legacy spawnedCwd on a feature branch), this returns before calling fetchSessionMenuWork, so the Sessions page menu never renders the new Open PR action. The existing chat PR chips call controlUi.sessionPullRequests for any session (ui/src/pages/chat/chat-pane.ts:320), and the gateway resolves PRs from spawnedCwd, spawnedWorkspaceDir, or the default agent workspace rather than requiring row.worktree (src/gateway/control-ui-session-prs.ts:146); the app sidebar has the same early guard at ui/src/components/app-sidebar.ts:644. Fetch the PR URL independently of worktreeId and only leave the editor path null when there is no managed worktree.
Useful? React with 👍 / 👎.
f7ae085 to
b58930d
Compare
|
Merged via squash.
|
…hortcuts (openclaw#104154) * feat(ui): add Open PR, Open in editor, and numbered group shortcuts to the session menu * fix(ui): lift session menu to popover top layer and use shadow tokens
Closes #104153
What Problem This Solves
Work sessions (sessions bound to a managed worktree) already detect their pull request (chat PR chips) and have a local checkout, but the session context menu offers no way to reach either: jumping to a session's PR or opening its worktree in an editor means opening the chat first or digging through the Worktrees page. The Move to group submenu is also mouse-only, while every other menu item has a single-letter shortcut.
Why This Change Was Made
The session list (app sidebar and Sessions page) is where session triage happens, so the per-session context menu is the natural home for these jump actions. All the data already exists behind gateway methods (
controlUi.sessionPullRequests,worktrees.list) and the editor URL schemes already power the chat file sidebar's "Open in editor" button, so the menu only needed the surface, not new backend capability.User Impact
For sessions bound to a worktree, the session context menu now shows:
G) — opens the pull request detected on the session's branch (active PRs preferred over merged/closed). Rendered disabled until the lazy lookup resolves so the menu never shifts under the pointer; stays disabled when no PR exists.For every session, the Move to group submenu entries are now numbered (1-9): existing groups first, then Remove from group, then New group…, matching the order users scan. Pressing a digit files the session immediately. Plain chat sessions see no new items.
Dark mode: menu · groups · editors
Evidence
f7ae085b389): the menu now promotes itself to the browser popover top layer — sidebar-hosted menus render inside the nav stacking context (z-index 10) which paints below the sidebar resizer divider (z-index 20), so the divider line used to bleed through the menu. Same pattern asopenclaw-native-link-menu. The four menu surfaces sharing the hardcoded0 18px 40pxdrop shadow now use the theme tokenvar(--shadow-lg)(much softer in light mode). Screenshots above are regenerated with these fixes.ui/src/test-helpers/control-ui-e2e.ts) with a worktree session, a detected open PR, and four groups.node scripts/run-vitest.mjs ui/src/components/session-menu.test.ts ui/src/components/session-menu-work.test.ts ui/src/pages/chat/components/chat-sidebar.test.ts— 32 tests passed (new coverage: numbered digit shortcuts and ordering, Open PR loading/enabled dispatch, editor submenu dispatch, PR-pick preference, worktree path resolution incl. removed worktrees).node scripts/run-vitest.mjs ui/src/pages/sessions/sessions-page.test.ts ui/src/pages/sessions/view.test.ts ui/src/components/app-sidebar.test.ts— 54 tests passed.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.ui.jsonclean; oxlint/oxfmt clean on touched files.control-ui-i18n.ts sync --writetranslated the two new strings across all 20 locales withfallbacks=0.Implementation notes for reviewers:
editorOpenUrlmoved fromui/src/pages/chat/components/chat-sidebar.tstoui/src/lib/editor-links.ts(shared by the chat file sidebar and both menu hosts); the old export is deleted.ui/src/components/session-menu-work.tsand drop stale responses when the menu closes or switches sessions. The menu items carry their payload in the action, so no host state is read after close.activateMenuShortcutnow accepts digits; digit targets only exist in the DOM while a submenu is open, so closed menus ignore them.