Skip to content

feat(macos): add native sidebar filtering and grouping - #163164

Merged
steipete merged 2 commits into
mainfrom
steipete/mac-sidebar-filters
Oct 2, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/mac-sidebar-filters

Conversation

@steipete

@steipete steipete commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The native macOS sidebar lacks the Control UI's owner and archive filters, grouping choices, and persistent filter panel, making larger shared session rosters harder to navigate.

User Impact

Open View options beside Threads for a persistent Filters panel with searchable owners, Involving me, Active / Archived / All, automation/system toggles, Group by, People sort, empty-group choices, and message previews. Active membership filters show a count and can be reset. Owner/participant attribution and archived-by labels follow the selected view.

Preferences remain scoped to the app profile. Existing iOS and command-palette projection defaults are unchanged; no Gateway configuration or database migration is required.

Why This Change Was Made

The sidebar keeps the existing canonical roster and query owner. View options control projection and presentation rather than creating a second session cache. Grouping preserves pin order, curated child placement, archived-parent suppression, server section ordering, and the existing group route lease. During integration, search was found to discard its received owner facet; both browsing and search now publish that facet through the query owner after generation fencing, and scope changes clear it. Explicit owner filters preserve summaries from already-loaded linked children while hiding those navigation rows; search and involving-me membership remain unchanged.

Production: +819/-107 (net +712). Tests: +395/-7. Generated localization inventory: +42/-19. Docs: +10/-1. The production growth implements the new panel, grouping projection, and row attribution; it replaces the former options menu and inline section renderer rather than retaining parallel UI paths. Superseded public initializers are removed.

Evidence

  • Focused shared-kit suites: 85 sidebar tests plus 29 existing hovercard tests passed (114 total, 8 suites). Sidebar coverage includes ChatSessionSidebarFiltersTests, ChatSessionSidebarFiltersModelTests, ChatSessionSidebarModelTests, and ChatSessionSidebarQueryTests. The latest run also includes the existing hovercard data, decoding, projection, and interaction suites after their row integration landed. The final command took 62.97s including incremental compilation; tests executed in 0.134s.
  • Existing lane failing-before evidence: category/archive projection failed three assertions (76.61s); parser/header regressions failed four assertions (18.39s) before their fixes. Landing integration additionally reproduced the discarded search owner facet: the query suite failed one assertion (2.40s, 0.206s test execution), then passed after the owner repair. The initial rebased build exposed three reads of the removed result API; all now consume the canonical owner facet.
  • Native macOS product build: passed, 46.32s. Plain macOS product build: passed, 23.84s. Native test compilation: passed, 41.24s.
  • Shared OpenClawChatUI iOS simulator compile: passed, 20.88s after the integration repair.
  • Explicit changed-file SwiftLint: passed, 0.41s, warnings only. Explicit changed-file SwiftFormat: passed, 0.34s, no formatting changes. Localization baseline regenerated with pnpm native:i18n:baseline; pnpm native:i18n:verify passed, 2.57s. No interpolated String(localized:) additions. Docs formatting passed, 0.84s; git diff --check passed.
  • Fresh independent Codex autoreview at P2 completed in 523.55s and identified one actionable descendant-summary finding. It was reproduced with four failing assertions (15.92s) and corrected at the query/projection boundary: the roster supplies only already-loaded linked child context, and the outline filters navigation after canonical summary construction. The regression now passes; a separate read-only check of the correction found no remaining concrete issue. No child-fetch path or second mutable roster was added.
  • Running-app rig proof: supplied before/after captures inspected in full. The after image visibly shows the owner disclosure, status selector, automation/system controls, grouping, sort, empty-group policy, and preview toggle. All data is synthetic; the avatar is blurred. The before image uses light appearance and the after image uses dark appearance, so color differences are incidental to the feature.

Remaining scope: catalog-renderer suppression belongs to its separate integration lane. Native Coding grouping uses available Gateway metadata and ACP keys; the web's provisional prepared-work marker has no native counterpart. A pre-existing native heartbeat-classification difference remains a separate follow-up; this change preserves its existing visibility classification. The captures prove the rendered panel; they do not independently prove every profile-reopen or catalog interaction.

CI and review follow-through

The first exact-head CI run failed strict iOS SwiftLint and was then cancelled by fail-fast. The earlier direct, non-strict changed-file check had allowed those warnings. The corrective commit fixes the six affected source files; the exact CI-mode strict iOS lint now passes (0.27s, complexity remains advisory), and all 85 focused tests, both macOS builds, native test compilation, the shared-kit iOS simulator compile, formatting, and i18n checks were repeated successfully. No CI job was rerun.

ClawSweeper's completed review found no actionable defect, rated readiness 4/6, accepted the inspected screenshot proof, and listed no before-merge or rank-up actions. The later review of the strict-lint head likewise found no findings, with proof confidence 5/6 and overall readiness 4/6. No re-review was requested.

GitHub subsequently reported a real conflict after the group-defaults lane landed. The first conflict rebase onto 31d7ba1c7a2e72681c54664e3b096c817fca184a resolved only apps/.i18n/native-source.json by regeneration. Source merged cleanly and preserves main's new group-defaults sheet integration; git range-diff shows the same FILTERS patch plus generated-inventory context. All affected local checks were rerun successfully; the timings above describe this rebased candidate. The pre-rebase CI run was replaced because of that conflict, not to obtain green.

A second real conflict followed the hovercard merge. Its only conflict was again the generated localization inventory; the source row hook and response additions merged cleanly. The final rebase is based on 81f65e98ad4ec5270c864d641950eb2067f84802, with main's hovercard and group-defaults behavior preserved. All affected checks passed again, including 114 tests across the sidebar and hovercard suites. The previous-head CI run was superseded for this actual conflict. No CI job was rerun or branch refreshed merely to obtain green.

Screenshots

Before: native sidebar without the Filters panel (light appearance; synthetic data)

After: persistent Filters panel (dark appearance; synthetic data and blurred avatar)

@clawsweeper

clawsweeper Bot commented Oct 2, 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 size: XL labels Oct 2, 2026
@steipete
steipete marked this pull request as ready for review October 2, 2026 01:59
@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: 🐚 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. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 11:20 PM ET / October 2, 2026, 03:20 UTC (Revision 5).

ClawSweeper review

What this changes

Adds a persistent macOS thread-filter panel, owner and archive filters, grouping and sorting choices, saved display preferences, and owner attribution.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main lacks the requested native controls, and the reviewed patch has no actionable correctness findings. The inspected before/after screenshots support the visual change.

Priority: P2
Reviewed head: fc9b45bd6d4dee96ebcfd8513efdb7c46b53d694

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful native proof, coherent ownership, focused regression coverage, and no concrete blocking defect support a normal good-quality rating.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected native running-app before/after screenshots demonstrate the new panel rendered through the sidebar header and Filters view. Interaction and reopen coverage is supplemental source/test evidence rather than screenshot proof. Preference compatibility is sufficient by inspection: existing keys and values remain unchanged, new keys are additive, and the existing profile defaults owner remains in use.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected native running-app before/after screenshots demonstrate the new panel rendered through the sidebar header and Filters view. Interaction and reopen coverage is supplemental source/test evidence rather than screenshot proof. Preference compatibility is sufficient by inspection: existing keys and values remain unchanged, new keys are additive, and the existing profile defaults owner remains in use.
Evidence reviewed 8 items Introduced production changes: Inspected the pinned merge-base-to-head changes and the filter, grouping, query, and rendering owners. Filters reuse the existing roster; loaded linked descendants supply summary facts while the outline separately filters navigation.
Current-main necessity: Current main offers Created/Last updated sorting and existing visibility toggles, but its view-options model lacks owner filters, grouping choices, and the new panel. The related-PR search was denied by the managed GitHub endpoint; no canonical replacement is established by the supplied context.
Inspected native screenshot proof: Opened both prepared images from the media manifest. The before image shows the previous sidebar; the after image shows the running native Filters popover with Owners, status, automation/system toggles, grouping, sorting, empty-group policy, and preview controls. Appearance differs between captures. These images demonstrate the rendered panel, not every interaction or profile-reopen scenario.
Findings None None.
Security None None.

How this fits together

The native macOS sidebar presents sessions received from the Gateway through its existing roster owner. Local view preferences control which threads appear and how they are grouped without changing session ownership or authorization.

flowchart TD
  A[Gateway sessions and owner facets] --> B[Canonical session roster]
  C[Profile view preferences] --> D[Filter and grouping projection]
  B --> D
  D --> E[Native thread sidebar]
  E --> F[Selected conversation]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs +9, Other +1123. Total +1132 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 10 1 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 17 1256 133 +1123
Total 18 1266 134 +1132

Review metrics

Metric Value Why it matters
Saved view settings 4 new profile-scoped preference keys The additions leave existing sort and visibility preferences intact.
Production versus test growth production +819/-107; tests +395/-7 The stated production growth implements the panel and projection while replacing the former menu and inline section renderer.

Technical review

Best possible solution:

Keep filtering and grouping as profile-scoped projections of the canonical roster, preserving existing preferences and shared-client defaults.

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

Not applicable as a feature proposal; current-main source establishes the missing native controls, and inspected screenshots show the added panel.

Is this the best way to solve the issue?

Yes: extending the existing roster projection and replacing its options menu avoids a competing session owner while preserving shared-client defaults.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded navigation improvement for larger native session rosters, with no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected native running-app before/after screenshots demonstrate the new panel rendered through the sidebar header and Filters view. Interaction and reopen coverage is supplemental source/test evidence rather than screenshot proof. Preference compatibility is sufficient by inspection: existing keys and values remain unchanged, new keys are additive, and the existing profile defaults owner remains in use.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected native running-app before/after screenshots demonstrate the new panel rendered through the sidebar header and Filters view. Interaction and reopen coverage is supplemental source/test evidence rather than screenshot proof. Preference compatibility is sufficient by inspection: existing keys and values remain unchanged, new keys are additive, and the existing profile defaults owner remains in use.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected native running-app before/after screenshots demonstrate the new panel rendered through the sidebar header and Filters view. Interaction and reopen coverage is supplemental source/test evidence rather than screenshot proof. Preference compatibility is sufficient by inspection: existing keys and values remain unchanged, new keys are additive, and the existing profile defaults owner remains in use.

Evidence

What I checked:

  • Introduced production changes: Inspected the pinned merge-base-to-head changes and the filter, grouping, query, and rendering owners. Filters reuse the existing roster; loaded linked descendants supply summary facts while the outline separately filters navigation. (apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebarData+Queries.swift:91, fc9b45bd6d4d)
  • Current-main necessity: Current main offers Created/Last updated sorting and existing visibility toggles, but its view-options model lacks owner filters, grouping choices, and the new panel. The related-PR search was denied by the managed GitHub endpoint; no canonical replacement is established by the supplied context. (apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebarViewOptions.swift:4, 64fbbe87c10a)
  • Inspected native screenshot proof: Opened both prepared images from the media manifest. The before image shows the previous sidebar; the after image shows the running native Filters popover with Owners, status, automation/system toggles, grouping, sorting, empty-group policy, and preview controls. Appearance differs between captures. These images demonstrate the rendered panel, not every interaction or profile-reopen scenario.
  • Preference compatibility: Existing sort and toggle keys retain their defaults and raw values. Four new preferences use additive AppStorage keys. The native window already supplies AppDefaults.standard, whose unchanged owner selects the app-profile UserDefaults suite. No existing serialized value or database schema is rewritten, establishing a compatible no-migration path by source inspection. (apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebar.swift:41, fc9b45bd6d4d)
  • Regression coverage and reported validation: Inspected coverage for loaded descendant summaries, owner-facet generation fencing, grouping, archive behavior, pin ordering, attribution, and unchanged shared-caller defaults. The captured PR body reports 114 passing tests, macOS builds, iOS shared-kit compilation, strict lint, formatting, and localization checks. Those runs were contributor evidence; this read-only review did not execute tests or builds. (apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatSessionSidebarFiltersModelTests.swift:8, fc9b45bd6d4d)
  • Feature-history routing: Current-main history records Peter Steinberger's recent native roster, view-options, sidebar refactor, and group-defaults work. This supports routing to steipete independently of authorship of the proposed branch; it does not establish source-line introduction. (apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebarModel.swift, feb5cbd10c05)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (4 earlier review cycles)
  • reviewed 2026-10-02T02:05:36.264Z sha 5a4c5400c54ef410925eb58d6cc80ba1e410042e :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T02:11:49.888Z sha 5a4c5400c54ef410925eb58d6cc80ba1e410042e :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T02:21:45.015Z sha ce16bc5c8db5a96df3cfc80a65d4ee5352e84a81 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T02:39:25.631Z sha 1f7d1e14f6a123ce83eb381492f311e7b46741f0 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the steipete/mac-sidebar-filters branch from ce16bc5 to 1f7d1e1 Compare October 2, 2026 02:33
Add a persistent Filters panel with owner and archive controls, grouping,
People sort, empty-group choices, and row attribution. Keep profile-scoped
preferences and the existing canonical roster; iOS and palette defaults
remain unchanged.

Publish owner facets from browsing and search after generation fencing.
Preserve loaded descendant summaries while filtering owner navigation.
Replace the old options menu and inline section rendering, and document
the native controls.

Validation: 85 focused shared-kit tests; native/plain macOS builds; native
test compilation; iOS simulator shared-kit compile; changed-file SwiftLint,
SwiftFormat, localization verification, and independent Codex review with
its P2 descendant-summary finding reproduced and corrected.
@steipete
steipete force-pushed the steipete/mac-sidebar-filters branch from 1f7d1e1 to fc9b45b Compare October 2, 2026 03:13
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Final reviewed head: fc9b45bd6d4dee96ebcfd8513efdb7c46b53d694.

Local proof is complete: 114 tests in 8 sidebar/hovercard suites pass; native/plain macOS builds, native test compilation, iOS shared-kit compilation, changed-file lint/format, and localization verification pass. The independent P2 owner-summary finding was reproduced and repaired at the canonical query/tree boundary. ClawSweeper reviewed this exact head with no findings or before-merge/rank-up actions (readiness 4/6, proof 5/6).

The first CI run failed strict iOS lint; those six-file style corrections were pushed once. Subsequent head replacements resolved two actual GitHub conflicts after the group-defaults and hovercard lanes landed. Both conflicts were confined to generated localization; the source hooks merged cleanly, the inventory was regenerated, and affected checks passed again. No CI job was rerun.

Current-head CI: passed — https://github.com/openclaw/openclaw/actions/runs/36959245759 (exact head above).

Commands run from the repository root, with DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer:

swift build --package-path apps/macos --build-system native --product OpenClaw
swift build --package-path apps/macos --product OpenClaw
swift build --package-path apps/macos --build-system native --build-tests
swift test --package-path apps/shared/OpenClawKit --filter 'ChatSession(Sidebar(Filters|FiltersModel|Query|Model)|HoverCard|HoverCardProjection|HoverInteraction)Tests'
pnpm native:i18n:baseline
pnpm native:i18n:verify
node_modules/.bin/oxfmt --check docs/platforms/mac/webchat.md
git diff --check 81f65e98ad4ec5270c864d641950eb2067f84802 HEAD

Shared-kit iOS compile, from apps/shared/OpenClawKit:

xcodebuild -scheme OpenClawChatUI -destination 'generic/platform=iOS Simulator' -derivedDataPath .build-ios-filters CODE_SIGNING_ALLOWED=NO build

Changed-file checks used explicit Swift paths (zsh):

base=81f65e98ad4ec5270c864d641950eb2067f84802
files=(${(f)"$(git diff --name-only --diff-filter=AM "$base" HEAD -- '*.swift')"})
prod_files=(${(f)"$(git diff --name-only --diff-filter=AM "$base" HEAD -- 'apps/shared/OpenClawKit/Sources/**/*.swift')"})
swiftlint lint --no-cache --config config/swiftlint.yml --quiet "${files[@]}"
GITHUB_ACTIONS=true node scripts/run-swiftlint.mts --strict --no-cache --config apps/ios/.swiftlint.yml --quiet "${prod_files[@]}"
swiftformat --cache ignore --lint --config config/swiftformat "${files[@]}"

The two embedded synthetic screenshots were inspected in full. Both uploaded links return 200 image/png and are byte-identical to the inspected files. They prove the rendered Filters panel; profile-reopen and catalog interactions are not claimed as screenshot proof. Deferred catalog integration and the pre-existing heartbeat-classification difference remain documented in the PR body.

@steipete
steipete merged commit 86cbfea into main Oct 2, 2026
83 checks passed
@steipete
steipete deleted the steipete/mac-sidebar-filters branch October 2, 2026 03:52
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
* feat(macos): add native sidebar filtering and grouping

Add a persistent Filters panel with owner and archive controls, grouping,
People sort, empty-group choices, and row attribution. Keep profile-scoped
preferences and the existing canonical roster; iOS and palette defaults
remain unchanged.

Publish owner facets from browsing and search after generation fencing.
Preserve loaded descendant summaries while filtering owner navigation.
Replace the old options menu and inline section rendering, and document
the native controls.

Validation: 85 focused shared-kit tests; native/plain macOS builds; native
test compilation; iOS simulator shared-kit compile; changed-file SwiftLint,
SwiftFormat, localization verification, and independent Codex review with
its P2 descendant-summary finding reproduced and corrected.

* style(apple): satisfy strict shared-kit Swift lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos docs Improvements or additions to documentation 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

1 participant