Skip to content

fix(ui): prevent accidental archives after sidebar child removal - #167670

Closed
alkor2000 wants to merge 10 commits into
openclaw:mainfrom
alkor2000:codex/fix-sidebar-session-action-position
Closed

alkor2000 wants to merge 10 commits into
openclaw:mainfrom
alkor2000:codex/fix-sidebar-session-action-position

Conversation

@alkor2000

@alkor2000 alkor2000 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #167415.

What Problem This Solves

Fixes accidental session archives when the last child disappears and a user clicks again at the sidebar disclosure's previous position.

User Impact

In hover/fine-pointer layouts, Archive keeps its position as child membership changes. Childless rows reserve the missing disclosure space only while actions are surfaced, preserving full resting title width. Touch/mobile and team layouts retain their existing placement and always-visible action clearance.

Why This Change Was Made

The existing CSS owner keeps Archive outside the disclosure slot. The parent row supplies the missing inline space on hover/focus when there is no disclosure; no runtime state or new CSS variable is introduced. The rule applies only to rows with Archive, leaving pure catalog-menu rows to their owner.

This revision integrates official main 51420782b3810b4aa1230aa9621aec78f7dbbd3c. Main deliberately moved status indicators back to the leading side in f28de2e8e690e73a9be4c270c338a35d3a9d13bf; that cutover remains intact. Retired trailing-status rules and the removed unread-hover test block are not restored. The presentation test matches main exactly. This follow-through applies the contributor-approved +243 test-line allocation after an actual merge-ref CI budget failure. No further main integration or runtime change is included.

Evidence

Head c0969c6c3583904688101ec534e441392cd817b9; tree 1c97867c5a215e9431ea338c9a1be053612dac80. Node 24.22.1 / pnpm 12.15.0 match the branch, with the qualified dependency definitions and lock unchanged. Proof uses the production UI bundle, native Chromium and an owned synthetic Gateway, not an operator Gateway or physical touch device. The behavior runs and screenshots below belong to a07b994f/tree 45ef6729; the latest synchronization retains the Archive CSS block, regression and named owning renderers/fixtures. Compared with the previous qualified synchronization, only the package metadata changed among 20 named inputs; the Archive block, renderers, stylesheet and regression remain unchanged. The prior upstream People-list change remains outside this fix. These are qualified reused results, not a new browser execution.

  • Actual main before: the saved-coordinate regression fails with the exact official-main stylesheet. At (277, 99), hit-testing finds Archive, a trusted repeated click targets Archive, and the parent receives 1 archive RPC. The same scenario first exercises ordinary Archive as a positive control. The wrapper took 121.87 s; the test reaches the intended hit-target assertion.
  • Qualified a07 behavior: 3 cases pass: fine-pointer owner-title clearance, coarse-media owner-title clearance, and the original child-deletion point. The same saved point now hits/clicks a non-Archive element and produces 0 parent archive RPCs. Hover/focus title clearance and resting width are checked independently.
  • Coarse-media regression: review found that the first unpublished conflict candidate moved always-visible touch actions without matching resting clearance. Its actual wide, non-mobile coarse-pointer case failed with title end 141 px, actions start 113 px (28 px overlap). Restricting the new positioning to hover/fine media restores the original coarse placement; the final case has title end 141 px, actions start 159 px. This is Chromium media emulation, not hardware certification.
  • Retained failure: the final two-file selection has 3 passed, 1 failed, 5 unselected in 206.92 s. The unchanged first-line/title sibling fails at initial roster readiness before layout assertions. Diagnostics show an open mock socket, connected Gateway phase, successful route and a sessions.list request, without a page error. An exact-main-CSS control in the same ChildToggle→Presentation file order passes that sibling and fails the expected original Archive-point case (125.96 s wrapper). The readiness cause remains unclassified; a passing replay is not a repair. Earlier readiness failures retain their own scope. No wait limit, assertion or readiness guard was weakened.
  • Checks: Current integration consumer types, styles, formatting, line caps and whitespace pass again. The prior qualified type-aware lint retains its a07 scope. The current native budget gate passes at 6,301,879 against 6,302,243 (364 lines spare).
  • Independent review: The complete two-file P0–P2 review identified the coarse-pointer clearance finding. After the real before/after regression above, a fresh corrective-delta review is scoped-clean; both records form the review chain. A separate one-line allocation review is also scoped-clean. Static review does not certify the failed readiness case or pending CI.

Before repeated click: main places Archive at the old disclosure coordinate. The screenshot precedes that repeated click; its archive toast belongs to the ordinary-Archive positive control.

Before: Archive occupies the former disclosure coordinate

After: Archive stays left of the empty disclosure slot, while main's leading-status design remains intact. The a07 behavior capture is byte-identical to the inspected uploaded frame; its execution provenance is retained through this qualified synchronization.

After: the previous disclosure coordinate stays clear of Archive

Remaining Validation

The contributor approved at most 243 net-added test lines relative to official main, including future synchronizations. The previous revision used main's 6,302,000 ceiling because its fixed-main local total 6,301,879 fit by 121. Its real merge-ref CI 40684162642 subsequently failed only the test-lines ratchet: 6,302,034 / 6,302,000, over 34, with measured PR net +243. Native classification remains new / matching main job passed, selected scope not compared. No Vitest failure was selected for rerun.

This revision applies exactly the approved +243, giving ceiling 6,302,243. The local fixed-main check passes at 6,301,879, leaving 364; applied to the observed failed CI count, the same ceiling would leave 209, equal to that CI base's derived headroom. The latter is arithmetic on the failed CI snapshot, not a new-head CI pass. All 20 qualified UI/fixture/runtime inputs match the previous revision. Only the budget scalar and its attribution comment change; main's existing explanatory comments remain intact, and the prior scoped-clean +243 allocation review retains its same-bound mechanical scope. No assertions, counting rules or other gates are waived.

New-head CI and current full UI/WebKit evidence are pending. Previous 51f65fa3 CI 40662304013 failed the budget ratchet and checks-ui (2/3) at chat-session-sharing-mobile.test.tsx / "keeps sharing busy through refresh and retires it for a same-key successor (event)". The native report labels the UI job pre-existing by job name only; failure signatures and selected scope were not compared, so that is not claimed as proven inherited. Its evidence remains separate from this revision. Prior a07 CI 40653062017 completed with failure only in the baseline-ratchet job; its UI performance gate passed. Native classification labels that budget job new because the matching main job passed without comparing selected scope; this is not claimed as a CI-approved inherited-failure exception. Earlier successful CI 40218695458 and the older native asset-budget comparison belong to 68776494, not this revision. Current readiness failure, performance scope and required maintainer/codeowner review remain visible; this is an author repair, not upstream merge approval.

@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR keeps desktop sidebar actions outside the child-disclosure position after the last child disappears.

Example: The last child of “Pointer parent” disappears while the pointer remains at disclosure coordinate (279, 75).

  • Before: Archive moves into that coordinate, so another click targets Archive.
  • After: Archive stays farther left, and the same-coordinate click targets a non-Archive element.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, useful CSS repair with directly inspected visual proof, a distinct browser regression, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected current before/after screenshots show the changed CSS geometry in the production UI bundle; the accompanying native Chromium trace records deletion of the final child and a trusted same-coordinate click changing from Archive to a non-Archive target, with ordinary Archive exercised as a positive control.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Another click at the former child disclosure position can unexpectedly archive the parent after its last child disappears.
Reason: A small layout correction prevents the demonstrated unintended action while preserving the established interaction design and defaults.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for landing: it fixes a current sidebar hit-target bug without changing Archive semantics, and no actionable findings remain; exact-head CI is still pending.

Priority: P2
Reviewed head: 71d029f917f529a443c466bbe98aa68044c9d788

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway roster updates determine child membership; the sidebar renderer mounts the disclosure, and shared CSS positions controls whose clicks invoke session operations.

flowchart LR
  A[Gateway roster update] --> B[Sidebar session projection]
  B --> C[Row and disclosure DOM]
  C --> D[Shared layout CSS]
  D --> E[Pointer click target]
  E --> F[Session action RPC]
Loading

Technical review

Best possible solution:

Land the focused CSS repair and saved-coordinate regression while retaining direct Archive, Undo, and full resting title width.

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

Current-main CSS and conditional disclosure rendering establish the target movement, supported by the supplied same-coordinate browser negative control; no reviewer-run execution was performed.

Is this the best way to solve the issue?

The existing CSS owner can stabilize the target directly, and the patch preserves mobile and team layout ownership without adding runtime state or changing archive policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against fab581e93950.

Provenance checked

  • Conditional action overlay and resting title width changes intended behavior with a stated reason (8ff1512: Give resting titles the full available width while placing surfaced actions beside an existing disclosure.)
  • Title-line vertical position and coarse-pointer alignment keeps the original intent (dea053e: Keep actions on the title line and preserve visible secondary metadata; replacing inset with top retains that vertical alignment without resetting the repaired horizontal position.)
  • Hover title clearance keeps the original intent (e9dfe8a: Reserve sufficient space for surfaced actions through the shared CSS width contract while avoiding extra lifecycle machinery.)
  • Sidebar presentation regression keeps the original intent (5c46872: Consolidate duplicate test setup and assertions; the patch retains the simplified fixture and checks actual non-overlap rather than deriving an expected width from CSS.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +15, Tests +148. Total +163 across 3 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 24 9 +15
Tests 2 154 6 +148
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 178 15 +163

Review metrics

Metric Value Why it matters
Production versus test growth Production +15 net lines; tests +148 net lines The browser regression exercises actual CSS hit-testing and trusted pointer input through existing suite owners, without adding production state or test hooks.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #167415
Summary: This PR repairs the disclosure-removal target swap clarified by the linked report.

Members:

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Unintended reversible archiving disrupts navigation when the final child disappears, with a bounded interaction scope and an existing Undo path.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-09T07:03:07.662Z sha 92a271d :: blocked before merge. :: none
  • reviewed 2026-10-09T07:56:50.203Z sha 0e49f44 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-15T20:08:48.007Z sha 698c3ff :: needs maintainer review before merge. :: none

Reviewed October 18, 2026, 12:53 PM ET / 16:53 UTC (Revision 4).

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 9, 2026
@alkor2000
alkor2000 marked this pull request as ready for review October 15, 2026 19:51
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 15, 2026
@alkor2000

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Thanks @alkor2000 for finding and proving this! The bug still reproduced on current main, and the credited replacement #189906 is now merged as 04d6904, with a red-before/green-after browser regression and green CI. Closing this in favor of that merged replacement.

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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: sidebar rows: expand/open and one-click Archive swap the same spot across hover states; overclick archives the session

2 participants