Repository navigation
fix(macos): restore Group badges for opaque session keys - #126807
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready proof for exact head
Proceeding through the mandatory native hosted/Testbox preparation and merge gates; no CI bypass or raw merge. |
|
Merged via squash.
|
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 3:12 PM ET / 19:12 UTC. ClawSweeper reviewWhat this changesThe PR replaces macOS’s private Gateway session decoder with the shared Swift response model so Threads badges use Gateway-provided session kind metadata. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: this is a focused, source-supported repair for the linked macOS badge defect, with no blocking correctness finding. It is maintainer-authored and needs the normal exact-head CI/merge review path. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherThe Gateway classifies session rows and returns them through its session-list response. The shared Swift model decodes that response, and the macOS Threads settings pane maps the result to Group, Cron, and other badges. flowchart LR
A[Gateway session classification] --> B[Session-list response]
B --> C[Shared Swift response model]
C --> D[macOS session loader]
D --> E[Threads badge presentation]
Before merge
Agent review detailsSecurityNone. PR surfaceOther -61. Total -61 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land the shared-model decoding path after exact-head macOS validation so native badges continue to reflect Gateway-owned classification rather than key spelling. Do we have a high-confidence way to reproduce the issue? Yes, by source: current main drops Gateway kind/classification before the macOS badge mapping, while the Gateway explicitly classifies opaque provider-owned group sessions. This read-only review did not execute the native test or app. Is this the best way to solve the issue? Yes. Reusing the existing shared response contract removes the duplicate decoder and preserves the Gateway as the classification owner; expanding key-shape heuristics would retain the bug class. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c0775c7f6dbb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Post-merge clarification for the ClawSweeper review, which was published after the native landing completed:
ClawSweeper reported no correctness or security findings; all actionable review requirements were satisfied. |
Closes #126805
Additional instructions
Maintainers can directly edit this repository-owned branch.
What Problem This Solves
Fixes an issue where macOS users inspecting the native Settings → Threads pane would see no Group badge for a group conversation when its provider-owned session key was opaque. The Gateway already identifies these sessions correctly, but the native macOS list was silently treating them as direct conversations. Existing green Cron badges must remain unchanged.
Why This Change Was Made
The native Threads loader owned a second private copy of the Gateway session-list response that dropped authoritative session kind/classification and then guessed the kind from key spelling. Reusing the existing shared Swift response model removes that duplicated decoding path, preserves the Gateway’s group classification, applies
cronclassification before its legacydirectwire kind, maps unsupported or missing kinds to Unknown, and continues rejecting a missing session-store path. Unused native-only session fields and their constructor noise are removed. No Gateway protocol, schema, configuration, persistence, authentication, or security behavior changes.User Impact
Group conversations with opaque provider-owned keys now display their orange Group badge in the native macOS Threads settings pane when native panes are enabled. Scheduled conversations continue displaying their green Cron badge, while direct, global, and unknown sessions retain their intended native presentation.
Evidence
directclassifications instead of the expected group/cron/unknown/direct/global results.swift test --package-path apps/macos --filter SessionDataTests— 4 tests passed, including opaque group, opaque cron with legacy direct wire kind, unsupported kind, missing kind, direct, global, and known unknown.ChatSessionSidebarModelTestspassed separately.swift build --package-path apps/macos --product OpenClaw --configuration releasepassed../scripts/lint-swift.sh macosand./scripts/format-swift.sh macospassed with zero violations.check:changedmacOS lane passed, including seven Vitest shards / 487 targeted Node tests, dependency guards, formatting, and the native state schema guard.+11/-68(net -57 lines). Tests:+19/-23(net -4 lines). Risk: low; native macOS session-list presentation only.Before
After
AI-assisted: yes