fix: pin sessions dropped into Pinned#107854
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e895f367b0
ℹ️ 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".
| isPinned || | ||
| (this.sessionsGrouping === "category" && (section.id === "ungrouped" || Boolean(group))); |
There was a problem hiding this comment.
Render a Pinned drop target for first-time pins
This only makes an already-rendered Pinned section accept drops, but groupSidebarSessionRows() still emits the pinned section only when pinned.length > 0 (ui/src/lib/sessions/grouping.ts:190). In the common case where an agent has no pinned sessions yet, there is no [data-session-section="pinned"] in the sidebar, so users cannot perform the newly documented drag-to-pin action for the first pinned session; the new E2E covers only the case with an existing pinned row.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
* fix(ui): pin sessions dropped into pinned group * test(ui): capture pinned session drop proof * chore: keep release note in PR metadata
What Problem This Solves
Fixes an issue where dragging an unpinned session onto the Pinned sidebar group did nothing, leaving the session in its previous section.
Why This Change Was Made
The Pinned section now accepts session drops and applies the same persistent pin mutation used by the row action. The session's custom-group category is preserved, so unpinning can return it to that group; existing custom-group and Chats drop behavior stays unchanged.
User Impact
Users can drag a session directly into Pinned and see it move there immediately.
Evidence
sessions.patchrequest after the drop: https://github.com/openclaw/openclaw/actions/runs/29376584988pinned: true, no category mutation, and visible relocation from Research to Pinned: https://github.com/openclaw/openclaw/actions/runs/29377505438