Skip to content

fix(ui): align sidebar controls and respect status filters - #178980

Merged
vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/sidebar-filter-empty-groups
Oct 21, 2026
Merged

vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/sidebar-filter-empty-groups

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Closes #178972

What Problem This Solves

With All owners, Active status, and Hide empty groups set to When filtering, the sidebar kept blank headings for archived or snoozed sessions. Filter & sort also sat apart from the Close sidebar control.

User Impact

When filtering applies to Active, Snoozed, and Archived status. Choose All status or Never to keep empty destinations available. On desktop, Filter & sort now sits next to Close sidebar with the existing 6px gap; All owners stays on the left. Mobile keeps the filter on the right without adding a close control.

Why This Change Was Made

The existing projection uses both owner and status filters and waits for the initial list before deciding a group is empty. One scoped CSS rule removes the close button's competing automatic margin. Icons, keyboard order, handlers, catalog and team sections remain unchanged.

Evidence

  • Original status defect reproduced on desktop and mobile; the repaired status flow passes.
  • Eight focused E2E scenarios and all 17 projection tests passed on the original fix; these remain unchanged.
  • Header proof passes in light and dark themes on desktop and mobile, including menu keyboard focus and collapse behavior. Desktop control spacing changed from 36.94px to 6px; the owner picker stayed at the same position.
  • Focused lint, formatting and independent P0–P2 reviews of the header and fixture changes pass.
  • Related CI fixture repairs pass: all 187 sidebar unit cases and the two affected group E2Es. Both changed test typecheck graphs, focused lint and formatting pass.
  • The earlier CI failures came from empty-group expectations under Active and one captured null element before a child group arrived; the fixtures now select their intended visibility and reacquire the group inside the existing wait.
  • Latest focused timings: sidebar sessions 5.47s (6.28s with the wrapper), group E2Es 9.10s, and the four-state header proof 9.08s. CI timings for the updated head are pending.

Risk and coverage

Active is the default, so empty native headings now hide with When filtering. All/Never recovery, initial loading, collapsed groups, owner filters and partial rosters are covered. Validation uses source-server Chromium with synthetic Gateway data. Native macOS behavior is outside this change.

Status filtering: before and current result

Same synthetic roster and viewport. The current result also includes the header alignment.

Surface Before Current
Desktop context Status before desktop Current desktop
Desktop detail Status before detail Current desktop detail
Mobile context Status before mobile Current mobile

Header alignment: before and after

Both sides already use the status-filter fix. The comparison isolates the header placement.

Surface Before After
Desktop, light Header before light Header after light
Desktop, dark Header before dark Header after dark
Mobile, dark Header before mobile dark Header after mobile dark

CI baseline attribution

Run39544378225 failed four test-type jobs on the same existing error: overlay-registry.ts:32 cannot see Document.openClawModalLayers in the extension and root tooling/script/E2E type graphs. The actual tested merge and its main parent contain identical overlay source, modal declaration, affected type configs and dependency files; this PR changes none of those inputs or their imports. The selected sidebar UI type graphs and all browser/unit jobs passed. The native pre-existing-failure landing route retains these failures and their source/checkout evidence rather than reporting CI as green.

@clawsweeper

clawsweeper Bot commented Oct 21, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui size: S labels Oct 21, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review October 21, 2026 03:19
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR extends automatic empty-group hiding to status filters after the initial session list loads.

Example: All owners, Active status, and Hide empty groups set to When filtering, with an archived-only Completed work group.

  • Before: Completed work remains as an empty heading.
  • After: Completed work disappears; selecting All status or Never restores the destination.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Direct browser evidence supports the intended behavior, but the consumer-test cutover is incomplete and the native documentation is inaccurate.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the real source-server Control UI with synthetic Gateway data: the Active view removes empty native headings while retaining Planning and its session.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Status-filtered sidebars retain blank headings for groups without matching sessions.
Reason: The existing documented behavior is owner-only, but this maintainer-authored PR explicitly approves broadening the existing policy and preserves visible recovery through All and Never.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep this maintainer-authored PR open: the focused policy change is useful, but existing consumer tests fail and the macOS documentation claims behavior the native implementation does not provide.

Priority: P3
Reviewed head: 52abf5f582ad5951523a882ed5ef0efdfda05e04

Before merge

  • Update the remaining empty-destination consumer tests (P2) - Including default Active in this predicate makes existing fixtures lose the empty headings they require. Exact-head CI reports four component failures in session-list-sections.ts, session-ownership-filtering.ts, and section-reordering.ts, plus two bundled browser failures in session-management.groups.e2e.test.ts. The recovered empty group stays hidden, and Gamma disappears after reload once its fixture rows reset. Set All status or Never explicitly in scenarios testing empty destinations, preserve their original assertions, and rerun these consumers; the two adaptations already included do not complete the cutover.
  • Keep the native macOS guide aligned with its implementation (P3) - This paragraph describes the native Threads sidebar, but the patch changes only the web projection. ChatSessionSidebarGrouping.swift:114–115 still hides empty groups in filtering mode only when ownerFilter is nonempty. A native user selecting All owners and Active will therefore still see empty headings despite the new documentation. Restore the owner-only wording here and keep the status-aware documentation change in the Control UI guide.
  • Explain or restore the original intent of Native macOS sidebar documentation - 86cbfea: feat(macos): add native sidebar filtering and grouping #163164 introduced native filters and grouping through the Swift roster projection, whose empty-group filtering remains owner-only.

Findings

  • [P2] Update the remaining empty-destination consumer tests — ui/src/components/app-sidebar-session-projection.ts:509-510
  • [P3] Keep the native macOS guide aligned with its implementation — docs/platforms/mac/webchat.md:188

Provenance

Agent review details

How this fits together

The Control UI sidebar projection receives filtered session rows, group definitions, loading state, and personal display preferences, then produces visible sections for the renderer.

flowchart TD
  A[Gateway session roster] --> B[Session navigation projection]
  C[Status and owner filters] --> B
  B --> D[Sidebar section projection]
  E[Personal empty group preference] --> D
  D --> F[Visible sidebar groups]
Loading

Technical review

Best possible solution:

Keep the existing projection change, adapt empty-destination consumer fixtures to explicit All or Never, and restore accurate owner-only native macOS documentation.

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

Current main's owner-only predicate establishes the reported empty-heading behavior, and the supplied before screenshots show it in the browser; this review ran no target code.

Is this the best way to solve the issue?

Extending the existing projection predicate is the smallest complete implementation of the approved policy, with loading and section-owner boundaries preserved.

Full review comments:

  • [P2] Update the remaining empty-destination consumer tests — ui/src/components/app-sidebar-session-projection.ts:509-510
    Including default Active in this predicate makes existing fixtures lose the empty headings they require. Exact-head CI reports four component failures in session-list-sections.ts, session-ownership-filtering.ts, and section-reordering.ts, plus two bundled browser failures in session-management.groups.e2e.test.ts. The recovered empty group stays hidden, and Gamma disappears after reload once its fixture rows reset. Set All status or Never explicitly in scenarios testing empty destinations, preserve their original assertions, and rerun these consumers; the two adaptations already included do not complete the cutover.
    Confidence: 0.99
  • [P3] Keep the native macOS guide aligned with its implementation — docs/platforms/mac/webchat.md:188
    This paragraph describes the native Threads sidebar, but the patch changes only the web projection. ChatSessionSidebarGrouping.swift:114–115 still hides empty groups in filtering mode only when ownerFilter is nonempty. A native user selecting All owners and Active will therefore still see empty headings despite the new documentation. Restore the owner-only wording here and keep the status-aware documentation change in the Control UI guide.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/components/app-sidebar.sessions.test.ts src/components/app-sidebar.interactions.test.ts src/components/app-sidebar-session-projection.test.ts --maxWorkers=1
  • pnpm test:ui:e2e ui/src/e2e/session-management.groups.e2e.test.ts ui/src/e2e/session-owner-filter-empty-section.e2e.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7e8412e adds ui/src/components/app-sidebar-session-projection.ts:216 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7e8412e080e9; files: ui/src/components/app-sidebar-session-projection.ts)

PR surface

Source +2, Tests +130, Docs 0. Total +132 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 2 +2
Tests 3 130 0 +130
Docs 2 3 3 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 137 5 +132

Labels

Label changes:

  • add P3: This is a recoverable sidebar presentation improvement; session access and stored data are unaffected.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is a recoverable sidebar presentation improvement; session access and stored data are unaffected.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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.

Reviewed October 20, 2026, 11:34 PM ET / October 21, 2026, 03:34 UTC.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as draft October 21, 2026 03:41
@vyctorbrzezowski vyctorbrzezowski changed the title fix(ui): hide empty sidebar groups when filtering by status fix(ui): align sidebar controls and respect status filters Oct 21, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the app: macos App: macos label Oct 21, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review October 21, 2026 04:30
@vyctorbrzezowski
vyctorbrzezowski merged commit 5954604 into main Oct 21, 2026
150 of 157 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/sidebar-filter-empty-groups branch October 21, 2026 04:42
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…178980)

* fix(ui): hide empty sidebar groups when filtering by status

* fix(ui): align sidebar filter with close control

* test(ui): honor empty-group visibility in sidebar fixtures
@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 25, 2026
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 docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S 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.

Control UI: status filters leave empty sidebar group headings

1 participant