Skip to content

fix(ui): make DONE moves visibly reversible - #122303

Merged
vyctorbrzezowski merged 3 commits into
openclaw:mainfrom
vyctorbrzezowski:brzezowski/reversible-done-group
Aug 11, 2026
Merged

vyctorbrzezowski merged 3 commits into
openclaw:mainfrom
vyctorbrzezowski:brzezowski/reversible-done-group

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Allow a categorized group-conversation session to drop onto the built-in Groups section when clearing its category has that deterministic result.
  • Name the same outcome "Move back to Groups" in the session menu.
  • Keep the generic "Remove from group" label and the existing drop restrictions when clearing a category would lead somewhere else.

Closes #122270.

Problem

PR #110259 introduced Groups as a smart section for kind: "group" sessions, while custom categories continued to take precedence. PR #113948 intentionally kept built-in smart sections from becoming arbitrary persistence buckets.

That left a one-way interaction: a group-conversation session could be categorized as Done, but Groups rejected the inverse drag even though the existing { category: null } write would deterministically return that session to Groups. The menu's "Remove from group" label also described the data operation instead of the visible destination.

Design

This PR defines one category-clear predicate at the sidebar grouping owner. It returns true only when category grouping is active and the row is categorized, unpinned, and kind: "group".

The grouping owner, drag controller, and menu renderer consume that predicate:

  • Groups remains available as an empty return target when the sole group-conversation session is categorized.
  • Native dragover uses the session key recorded at dragstart; drop still reads the transfer payload and writes the existing { category: null } patch.
  • The menu says "Move back to Groups" for the same deterministic case.
  • Pinned rows, Threads, Coding, flat grouping, and mixed or otherwise ambiguous selections keep their existing behavior.

No persistence, protocol, smart-group classification, or color semantics change.

Evidence

Light theme

Before — the session is the sole group conversation, categorized as Done; Groups remains a visible inverse target and the menu names it:

Light theme before: Completed launch in Done with Move back to Groups visible

After — a native pointer drag clears the category and places the same session in Groups:

Light theme after: Completed launch in Groups

Dark theme

Before — the same deterministic action and empty return target are visible:

Dark theme before: Completed launch in Done with Move back to Groups visible

After — the same session is back in Groups:

Dark theme after: Completed launch in Groups

Verification

  • Red proof on the pre-change behavior: the focused component drag observed dropEffect: "none"; the menu still said "Remove from group". During review, replacing synthetic events with Playwright's native dragTo also produced no sessions.patch, exposing the protected-DataTransfer bug.
  • Green proof after review repair: the one-row Playwright scenario uses a native pointer drag, observes { category: null }, and passes in Chromium.
  • UI component suite: 8,531 passing tests, 50 skipped.
  • Focused browser suites: 12 existing group-management scenarios plus the one-row native return scenario pass.
  • Blacksmith Testbox browser proof: tbx_01kzsbr9phfmqecj0wz0mkvs3e.
  • Final-head Blacksmith Testbox path-scoped gate: UI/core-test typechecks, lint, formatting, i18n, dead-export, duplicate, dependency, and repository guards pass on tbx_01kzsef8c1y4qn0pyefa5pvn6p.
  • Post-review autoreview: clean, overall correctness 0.94.

Production code is +49 net lines; test and test-support code is +163 net lines. The production growth is the shared deterministic-destination predicate, its grouping/drag/menu consumers, and the outcome-specific copy. The controller removes its duplicated drag-acceptance guard so drag-over and drop cannot disagree.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 11, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 11, 2026, 6:06 PM ET / 22:06 UTC.

ClawSweeper review

What this changes

This PR lets a categorized group-conversation session return to the Groups smart section and names that menu action “Move back to Groups.”.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked by patch quality or review findings - 9 items remain

Keep open: the menu copy works, but the native drag path remains rejected and the sole categorized group session still has no Groups target.

Priority: P2
Reviewed head: 44e223bcfac9e6e3fc103b3676f7a50fc98c01c5

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful visual and browser-harness evidence exists, but two concrete native-drag defects block merge readiness.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 6 items Current-main behavior: Current main accepts a session drop only for Pinned, Threads, or a manual category, so Groups is not an inverse target today.
Native drag rejection: The new drag-over branch reads the session payload before deciding whether to prevent default; native drag data is protected during dragover, while the controller already records the session key at drag start.
Groups target is absent for a sole categorized group: Grouping applies a nonempty category before kind classification and emits Groups only when uncategorized group rows exist, so moving the only group row into Done removes the physical target.
Findings 2 actionable findings [P1] Use the tracked session key during dragover
[P2] Keep Groups available for the sole categorized group session
Security None None.

How this fits together

The Control UI sidebar groups gateway session rows into manual categories and smart Groups/Threads/Coding sections. Drag and menu actions patch session category metadata, then the grouping layer determines where the row appears.

flowchart LR
  A[Gateway session rows] --> B[Sidebar grouping]
  B --> C[Category or smart Groups section]
  C --> D[Native drag and session menu]
  D --> E[Category-null patch]
  E --> B
Loading

Before merge

  • Use the tracked session key during dragover (P1) - getData() is protected during native dragover, so this resolves no session, returns at the next guard, and never prevents the Groups drop. Use draggingSessionKey, which dragstart already records, for hover acceptance; retain transfer reads for drop and add a real pointer-drag regression.
  • Keep Groups available for the sole categorized group session (P2) - The new acceptance branch has no target when the moved row is the only group conversation: grouping categorizes it before kind classification and omits Groups when its uncategorized row list is empty. The new E2E adds an extra group row to avoid that case. Emit the deterministic Groups target and cover the one-row journey.
  • Resolve merge risk (P1) - Merging would advertise a drag reversal that native browser drag events still reject.
  • Resolve merge risk (P1) - The common one-group-session journey remains unable to expose a Groups drop target.
  • Resolve merge risk (P1) - Production code is +44 net lines for a bug fix; complete the grouping-owner refactor before accepting that growth.
  • Complete next step (P2) - Keep this maintainer-labeled PR open and repair the two native-drag blockers before merge.
  • Improve patch quality - Repair dragover to use controller state rather than protected drag data.
  • Improve patch quality - Keep Groups rendered for the eligible one-row return path and cover it.
  • Improve patch quality - Capture a real native pointer drag after the repair, redacting any private data.

Findings

  • [P1] Use the tracked session key during dragover — ui/src/components/session-organizer-controller.ts:625-627
  • [P2] Keep Groups available for the sole categorized group session — ui/src/components/session-organizer-controller.ts:600-602
Agent review details

Security

None.

PR surface

Source +76, Tests +142. Total +218 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 6 106 30 +76
Tests 2 142 0 +142
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 248 30 +218

Review metrics

Metric Value Why it matters
Production versus test delta production +44 net; tests and test support +174 net The bug-fix growth is only justified if one canonical grouping/drag path covers real browser interaction and target availability.

Stored data model

Persistent data-model change detected: serialized state: ui/src/components/session-menu.test.ts, serialized state: ui/src/components/session-menu.ts, serialized state: ui/src/components/session-organizer-controller.ts, serialized state: ui/src/e2e/session-management.group-return.e2e.test.ts, serialized state: ui/src/lib/sessions/grouping.ts, unknown-data-model-change: ui/src/components/session-organizer-controller.ts, and 2 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #122270
Summary: This PR is the candidate fix for the canonical report, but its two remaining interaction defects keep the report unresolved.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Repair the real drag path (recommended)
    Use tracked controller state for drag-over acceptance, keep Groups visible for an eligible sole categorized group row, and add a native pointer-drag regression before merge.

Technical review

Best possible solution:

Let sidebar grouping own deterministic Groups-target availability, use the controller’s tracked drag key during dragover, and prove the one-row native drag journey in a browser.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main rejects Groups drops, and the new drag-over path reads protected drag data before it can accept the native operation.

Is this the best way to solve the issue?

No: the shared predicate is a good direction, but the fix must also retain a deterministic Groups target and use drag-start state during dragover.

Full review comments:

  • [P1] Use the tracked session key during dragover — ui/src/components/session-organizer-controller.ts:625-627
    getData() is protected during native dragover, so this resolves no session, returns at the next guard, and never prevents the Groups drop. Use draggingSessionKey, which dragstart already records, for hover acceptance; retain transfer reads for drop and add a real pointer-drag regression.
    Confidence: 0.96
  • [P2] Keep Groups available for the sole categorized group session — ui/src/components/session-organizer-controller.ts:600-602
    The new acceptance branch has no target when the moved row is the only group conversation: grouping categorizes it before kind classification and omits Groups when its uncategorized row list is empty. The new E2E adds an extra group row to avoid that case. Emit the deterministic Groups target and cover the one-row journey.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 459c70e14a2c.

Labels

Label changes:

  • add P2: This is a bounded Control UI organization bug with a visible workaround through the menu.
  • add merge-risk: 🚨 other: The proposed native drag behavior can remain unusable despite synthetic tests and visual menu proof.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Label justifications:

  • P2: This is a bounded Control UI organization bug with a visible workaround through the menu.
  • merge-risk: 🚨 other: The proposed native drag behavior can remain unusable despite synthetic tests and visual menu proof.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

  • Current-main behavior: Current main accepts a session drop only for Pinned, Threads, or a manual category, so Groups is not an inverse target today. (ui/src/components/session-organizer-controller.ts:602, 459c70e14a2c)
  • Native drag rejection: The new drag-over branch reads the session payload before deciding whether to prevent default; native drag data is protected during dragover, while the controller already records the session key at drag start. (ui/src/components/session-organizer-controller.ts:625, 44e223bcfac9)
  • Groups target is absent for a sole categorized group: Grouping applies a nonempty category before kind classification and emits Groups only when uncategorized group rows exist, so moving the only group row into Done removes the physical target. (ui/src/lib/sessions/grouping.ts:295, 44e223bcfac9)
  • Synthetic coverage masks both paths: The added browser test manually dispatches events with a constructed DataTransfer and includes an uncategorized “Existing group” row, so it does not prove a native pointer drag or the sole-group journey. (ui/src/e2e/session-management.group-return.e2e.test.ts:41, 44e223bcfac9)
  • Visual proof inspected: All four supplied screenshots visibly show the renamed menu item and the final row in Groups, but none shows a native drag operation.
  • Feature-history routing: Current Groups-section emission lines blame to Kevin Lin’s recent source commit; the supplied related PR context identifies steipete’s merged five-zone sidebar work as the feature origin. (ui/src/lib/sessions/grouping.ts:295, 2d0c30fd654e)

Likely related people:

  • steipete: The related merged five-zone sidebar work established the Groups smart-section behavior and its category-precedence rule. (role: feature owner; confidence: high; commits: 75e4103c5738, f90cef67c810; files: ui/src/lib/sessions/grouping.ts, ui/src/components/session-organizer-controller.ts)
  • Kevin Lin: Current Groups-section emission lines trace by blame to this recent source commit. (role: recent area contributor; confidence: medium; commits: 2d0c30fd654e; files: ui/src/lib/sessions/grouping.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

ClawSweeper findings are addressed on 06e3f6738ca:

  • native dragover now resolves eligibility from the session key recorded at dragstart; drop still reads the transfer payload;
  • the grouping owner keeps an empty Groups target visible when the sole categorized group session has a deterministic return path;
  • the browser regression now uses Playwright's native pointer drag in that one-row case, with refreshed light/dark evidence.

The requested grouping-owner refactor is complete. Production delta is +49 net lines for the shared predicate, its grouping/drag/menu consumers, and destination-specific copy; the review repair itself is net -6 lines. The stored-data warning is not applicable: this changes no schema, migration, protocol, or persistence shape and continues to write the existing { category: null } fact.

Passes are clean: local UI 8,531 passed / 50 skipped; native browser scenario 1/1; final-head Testbox gate tbx_01kzsef8c1y4qn0pyefa5pvn6p; autoreview clean at 0.94; exact-head hosted CI green; native prepare-run complete. The ClawSweeper review is under 12 hours old and the subsequent push only addresses its findings, so no blocking re-review is required by current policy.

@vyctorbrzezowski
vyctorbrzezowski merged commit 89df45c into openclaw:main Aug 11, 2026
108 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/reversible-done-group branch August 11, 2026 22:39
vincentkoc added a commit that referenced this pull request Aug 11, 2026
* origin/main: (1725 commits)
  fix(agents): preserve reply cleanup when cancellation throws (#122252)
  fix(ui): render disallowed link schemes as plain text (#122311)
  fix(test): isolate gateway helper env stubs (#122319)
  fix(ui): keep chat Markdown block rhythm consistent (#122289)
  test(cli): trim duplicate Hooks process cases (#122278)
  fix(ui): retain identity while agent roster loads
  fix(ui): preserve configured agent labels
  fix(plugins): keep startup convergence read-only (#122330)
  fix: preserve WebChat reply context after reloads (#122169)
  fix(ui): make DONE moves visibly reversible (#122303)
  fix(ui): keep inline-code punctuation attached (#122291)
  fix(google-meet): publish exports atomically (#122306)
  fix(channels): preserve failed agent run reactions (#122009)
  fix(ui): label patch file operations accurately (#122287)
  fix(windows): preserve Unicode LAN route aliases (#122263)
  test(media): synchronize transcode pool completion (#122279)
  fix(android): keep completed subagent activity visible for sixty seconds (#122089)
  fix(ui): humanize bare GitHub item links (#122285)
  refactor(qqbot): install plugin from Tencent package (#107295)
  chore: scope SQLite session lifecycle CI (#121917)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
* fix(ui): make group category moves reversible

* fix(ui): address native Groups drag review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: DONE sessions do not visibly move back to Groups

1 participant