Skip to content

sync(macos): cherry-pick v2026.3.22 to Cat A cluster A2 — 31 files (#2583)#2596

Merged
alexey-pelykh merged 1 commit intomainfrom
sync/v2026.3.22-cluster-A2
Apr 26, 2026
Merged

sync(macos): cherry-pick v2026.3.22 to Cat A cluster A2 — 31 files (#2583)#2596
alexey-pelykh merged 1 commit intomainfrom
sync/v2026.3.22-cluster-A2

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

Process Cat A cluster A2 of the v2026.3.22 upstream sync backlog: 35 fork files under apps/macos/ requiring per-file disposition. Mirrors the approach of merged Wave 1 PR #2595 (A1 Android cluster).

Action Count Notes
CHERRY-PICK applied (rebrand transform → fork content changes) 27 git diff shows real content changes
CHERRY-PICK no-op (already in sync after rebrand transform) 4 CanvasWindowController.swift, GatewayDiscoverySelectionSupport.swift, NodeServiceManager.swift, GatewayDiscoveryModel.swift
EXCLUDE-DIVERGENT (registered in hq/upstream/disposition.tsv) 4 All pre-classified by triage; see table below
Sub-total — issue scope 35 ✓ matches issue scope
Helper files imported (net-new upstream additions referenced by cluster cherry-picks) 15 See "Net-new helper files"
PairingAlertSupport refresh (refactored upstream — fork's older version replaced) 1 See "PairingAlertSupport refresh"

Closes #2583.

EXCLUDE-DIVERGENT classifications

File Reason
ContextUsageBar.swift gut #2277 removed vestigial contextTokens config and display denominator on fork; upstream still references contextTokens.
SessionMenuLabelView.swift gut #2277 (same).
SessionsSettings.swift gut #2277 (same).
UsageMenuLabelView.swift gut #2277 (same).

All four were pre-classified by triage. Per-file inspection confirmed the classifications; 0 reclassifications during execution (vs Wave 1's 2 reclassifications). Issue body anticipated 5–10% — actual: 0%.

Net-new helper files (15)

These are upstream-side additions referenced by the cluster's cherry-picked files but not present in fork. Adding them is necessary for the cherry-picks to compile. Each is a one-shot import (with rebrand transforms applied) — no fork-divergent specialization. None are in the Cat A audit clusters because the audit only flagged "rebrand-below-threshold renames" (paths with content drift), not net-new additions.

In apps/macos/Sources/RemoteClaw/:

  1. PlatformLabelFormatter.swift — extracted by upstream from inline parsePlatform/prettyPlatform in InstancesSettings.swift and NodePairingApprovalPrompter.swift.
  2. SettingsRefreshButton.swift — extracted by upstream from inline refresh-button logic in InstancesSettings.swift.
  3. GatewayPushSubscription.swift — used by CronJobsStore.swift, InstancesStore.swift.
  4. JSONObjectExtractionSupport.swift — used by GatewayLaunchAgentManager.swift.
  5. TextSummarySupport.swift — used by GatewayLaunchAgentManager.swift.
  6. SimpleTaskSupport.swift — used by InstancesStore.swift, NodesStore.swift, VoiceWakeGlobalSettingsSync.swift.
  7. TrackingAreaSupport.swift — used by MenuBar.swift.
  8. MicRefreshSupport.swift — used by MenuContentView.swift, VoiceWakeSettings.swift.
  9. AgentWorkspaceConfig.swift — used by OnboardingView+Workspace.swift.
  10. SystemSettingsURLSupport.swift — used by PermissionManager.swift.
  11. PermissionMonitoringSupport.swift — used by SettingsRootView.swift.
  12. VoiceOverlayTextFormatting.swift — used by VoicePushToTalk.swift, VoiceWakeRuntime.swift.
  13. VoiceWakeRecognitionDebugSupport.swift — used by VoiceWakeRuntime.swift, VoiceWakeTester.swift.

In apps/macos/Sources/RemoteClawMacCLI/:
14. CLIArgParsingSupport.swift — used by ConnectCommand.swift.

In apps/shared/RemoteClawKit/Sources/RemoteClawKit/:
15. CaptureRateLimits.swift — used by ScreenRecordService.swift.

PairingAlertSupport refresh

The fork's PairingAlertSupport.swift (46 lines) is older than upstream's refactored version (277 lines). Upstream introduced PairingAlertState, PairingResolution, PairingResolvedEvent, plus methods (approveRequest, presentPairingAlert, rejectRequest, startPairingPushTask, stopPairingPrompter, endActiveAlert(state:) overload) referenced by cherry-picked NodePairingApprovalPrompter.swift.

Upstream's version is a strict superset — fork's prior content (PairingAlertHostWindow, endActiveAlert(activeAlert:activeRequestId:), requireAlertHostWindow) is preserved verbatim. Replacing fork's version with upstream's (with rebrand transforms applied) is necessary for the cluster cherry-pick to compile. No fork specialization is lost (git log apps/macos/Sources/RemoteClaw/PairingAlertSupport.swift shows fork only had a rebrand commit on this file).

Approach

  1. Read upstream@v2026.3.22 content via git show v2026.3.22:{path}.
  2. Apply token-based rebrand transforms per hq/upstream/rebrand-tokens.tsv:
    • OpenClaw → RemoteClaw, openclaw → remoteclaw, OPENCLAW → REMOTECLAW, OPENCLAW_ → REMOTECLAW_
    • Reverse-domain: ai.openclaw → org.remoteclaw, com.openclaw → org.remoteclaw
    • Repo URLs: github.com/openclaw/openclaw → github.com/remoteclaw/remoteclaw, openclaw/openclaw → remoteclaw/remoteclaw
    • Domain: openclaw.io → remoteclaw.com, openclaw.ai → remoteclaw.com
    • Config dir: ~/.openclaw → ~/.remoteclaw, .openclaw → .remoteclaw
    • Misc: openclaw-mac → remoteclaw-mac, @openclaw/ → @remoteclaw/
  3. Cross-class API audit detected 16 net-new types referenced by cherry-pickees — 15 helper files imported (with rebrand transforms applied), plus PairingAlertSupport refreshed.
  4. Symbol audit (post-import) verified zero unresolved cross-class references in cluster diffs.

Disposition.tsv updates

Four EXTRACT entries added at /Users/alexey-pelykh/RemoteClaw/hq/upstream/disposition.tsv (HQ companion, not in repo):

EXTRACT  apps/macos/Sources/OpenClaw/ContextUsageBar.swift        fork-divergent: gut #2277 removed vestigial contextTokens config and display denominator on fork; upstream still references contextTokens (#2583)
EXTRACT  apps/macos/Sources/OpenClaw/SessionMenuLabelView.swift   fork-divergent: gut #2277 removed vestigial contextTokens config and display denominator on fork (#2583)
EXTRACT  apps/macos/Sources/OpenClaw/SessionsSettings.swift       fork-divergent: gut #2277 removed vestigial contextTokens config and display denominator on fork (#2583)
EXTRACT  apps/macos/Sources/OpenClaw/UsageMenuLabelView.swift     fork-divergent: gut #2277 removed vestigial contextTokens config and display denominator on fork (#2583)

Validation

Gate Result
pnpm format:check (oxfmt)
pnpm tsgo (TypeScript)
pnpm lint (oxlint)
pnpm lint:tmp:no-random-messaging
pnpm lint:no-remoteclaw-ai
pnpm lint:ui:no-css-class-drift
bash scripts/ci/check-rebrand-leakage.sh --staged
node scripts/check-no-zombie-imports.mjs
node scripts/check-stub-debt.mjs ✓ (126 == baseline)
node scripts/check-throwing-stub-callers.mjs ✓ (0 stubs)
node scripts/check-obsolescence-audit.mjs ✓ (49 == baseline)

Bulk verification: re-running cherry-pick script post-execution → WROTE=0 NOOP=31 SKIP=4 → A2 residual = 0.

Note: Fork CI does not build macOS (per CLAUDE.md). Local Xcode build NOT verified — same caveat as merged Wave 1 PR #2595.

Polish review

workflow-polish ran in fresh subprocess context (session 0647e3ea-8b4c-463f-b66e-29a64cb6782a). Verdict: 🟢 CLEAN ENOUGH — no actionable findings. One informational note:

  1. PeekabooBridgeHostCoordinator.swift cherry-pick adds compatibility code creating symlinks for upstream's pre-rebrand brand directory names (clawdbot, clawdis, moltbot). For fresh fork users these are no-op ghost directories. Reviewer agreed this is acceptable as literal upstream-parity (per CLAUDE.md "User state boundary": fork users have no pre-rebrand state to migrate). Optional follow-up if desired: gate symlink creation behind fileExists check. Not required for this PR.

Test plan

  • pnpm check passes locally
  • Fork-integrity gates pass locally
  • Per-file inspection: 27 CHERRY-PICK + 4 NOOP + 4 EXCLUDE-DIVERGENT = 35 covered
  • Polish review: CLEAN ENOUGH
  • CI green (pending)

🤖 Generated with Claude Code

…2583)

Process Cat A cluster A2 of the v2026.3.22 upstream sync backlog: 35 fork
files under apps/macos/ requiring per-file disposition.

Disposition outcome:

| Action | Count |
|--------|------:|
| CHERRY-PICK applied (rebrand transform → fork content changes) | 27 |
| EXCLUDE-DIVERGENT (registered in hq/upstream/disposition.tsv) | 4 |
| Total | 31 issue-listed |
| Helper files imported (net-new upstream additions referenced by cluster cherry-picks) | 15 |
| PairingAlertSupport refresh (refactored upstream — fork's older version replaced) | 1 |

Issue body listed 31 CHERRY-PICK + 4 EXCLUDE-DIVERGENT = 35. After per-file
inspection, all 4 of the 4 EXCLUDE-DIVERGENT entries were pre-classified by
triage and were not reclassified (rate: 0% reclassification — within the
5-10% the issue body anticipated). The 27/31 CHERRY-PICK count reflects
upstream content that genuinely diverges; the remaining 4 of 31 were NOOP
(fork already in sync after rebrand transform).

EXCLUDE-DIVERGENT classifications (all 4):

- apps/macos/Sources/OpenClaw/ContextUsageBar.swift
- apps/macos/Sources/OpenClaw/SessionMenuLabelView.swift
- apps/macos/Sources/OpenClaw/SessionsSettings.swift
- apps/macos/Sources/OpenClaw/UsageMenuLabelView.swift

All four trace to fork commit f7e9156 — gut(session): remove vestigial
contextTokens config and display denominator (#2277). Upstream still
references the gutted contextTokens symbols.

Approach:

1. Read upstream@v2026.3.22 content via `git show v2026.3.22:{path}`.
2. Apply token-based rebrand transforms per hq/upstream/rebrand-tokens.tsv —
   `OpenClaw → RemoteClaw`, `openclaw → remoteclaw`, `OPENCLAW → REMOTECLAW`,
   `OPENCLAW_ → REMOTECLAW_`, `ai.openclaw → org.remoteclaw`,
   `com.openclaw → org.remoteclaw`, `~/.openclaw → ~/.remoteclaw`,
   `.openclaw → .remoteclaw`, `openclaw-mac → remoteclaw-mac`,
   `@openclaw/ → @remoteclaw/`, `github.com/openclaw/openclaw → github.com/remoteclaw/remoteclaw`,
   `openclaw/openclaw → remoteclaw/remoteclaw`, `openclaw.io|openclaw.ai → remoteclaw.com`.
3. Cross-class API audit detected upstream extracted helper logic into
   13 net-new Swift files (PlatformLabelFormatter, SettingsRefreshButton,
   GatewayPushSubscription, JSONObjectExtractionSupport, TextSummarySupport,
   SimpleTaskSupport, TrackingAreaSupport, MicRefreshSupport,
   AgentWorkspaceConfig, SystemSettingsURLSupport, PermissionMonitoringSupport,
   VoiceOverlayTextFormatting, VoiceWakeRecognitionDebugSupport) plus
   1 in RemoteClawMacCLI (CLIArgParsingSupport) and 1 in shared kit
   (CaptureRateLimits). All 15 imported with rebrand transforms applied —
   they're net-new upstream additions referenced by cluster cherry-picks
   (not in audit's rebrand-below-threshold cluster lists because audit
   only flagged renames, not additions).
4. PairingAlertSupport.swift was refactored upstream — fork's older
   46-line version is replaced with upstream's 277-line refactor (with
   rebrand transforms applied) so cherry-picked NodePairingApprovalPrompter
   compiles. Fork's prior content (PairingAlertHostWindow, endActiveAlert,
   requireAlertHostWindow) is preserved verbatim by upstream's superset.

Notes:

- PeekabooBridgeHostCoordinator cherry-pick adds compatibility code that
  creates symlinks for upstream's pre-rebrand brand directory names
  (clawdbot, clawdis, moltbot). For fresh fork users these are no-op
  ghost directories. Polish reviewer agreed this is acceptable as
  literal upstream-parity (fork users have no pre-rebrand state per
  CLAUDE.md "User state boundary"). Optional follow-up: gate symlink
  creation behind fileExists check.
- Fork CI does not build macOS (per CLAUDE.md). Local Xcode build and
  swift test NOT verified — same caveat as merged Wave 1 PR #2595.

Closes #2583.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh merged commit f1f8422 into main Apr 26, 2026
16 checks passed
@alexey-pelykh alexey-pelykh deleted the sync/v2026.3.22-cluster-A2 branch April 26, 2026 18:10
alexey-pelykh added a commit that referenced this pull request Apr 26, 2026
#2584) (#2597)

Process Cat A cluster A3 of the v2026.3.22 upstream sync backlog: 10 fork
files under apps/shared/RemoteClawKit/ and apps/ios/Tests/. Mirrors merged
Wave 1 PR #2595 (A1 Android) and Wave 2 PR #2596 (A2 macOS).

Per-file dispositions:
- 7 CHERRY-PICK applied: ChatMarkdownPreprocessor.swift, ChatMessageViews.swift,
  ChatView.swift, Capabilities.swift, GatewayTLSPinning.swift,
  AssistantTextParserTests.swift, ChatMarkdownPreprocessorTests.swift
- 2 NOOP (already-synced after rebrand transform): ChatComposer.swift,
  GatewayNodeSession.swift
- 1 ALREADY-SYNCED reclassification: apps/ios/Tests/TalkConfigParsingTests.swift —
  cluster TSV's basename-search heuristic false-positive mapped fork's iOS path
  to upstream's shared-Kit variant; fork's existing content was already byte-
  identical to upstream apps/ios/Tests/Logic/TalkConfigParsingTests.swift +
  rebrand (and that upstream file is unchanged v2026.3.8 → v2026.3.22). No
  fork code change needed for this row. Discovered by polish.

0 EXCLUDE-DIVERGENT classifications (issue body anticipated 5–10%).

Net-new helper imports (2 files, transitive deps for cluster cherry-picks):
- AssistantTextParser.swift refresh — strict superset of fork's prior version,
  adds includeThinking parameter and visibleSegments helper. Fork's prior
  version had only a single rebrand: commit at #124. Required by the new
  ChatView/ChatMessageViews/AssistantTextParserTests cherry-picks.
- GenericPasswordKeychainStore.swift net-new import — pure utility, no fork-
  divergent specialization. Required by the new GatewayTLSPinning cherry-pick
  (UserDefaults → Keychain migration).

Mirrors Wave 2's 16 helper imports (15 net-new + PairingAlertSupport refresh).

Validation:
- pnpm format:check ✓
- pnpm tsgo ✓
- pnpm lint ✓
- pnpm lint:tmp:no-random-messaging ✓
- pnpm lint:no-remoteclaw-ai ✓
- pnpm lint:ui:no-css-class-drift ✓
- bash scripts/ci/check-rebrand-leakage.sh --staged ✓
- node scripts/check-no-zombie-imports.mjs ✓
- node scripts/check-stub-debt.mjs ✓ (126 == baseline)
- node scripts/check-throwing-stub-callers.mjs ✓ (0 stubs)
- node scripts/check-obsolescence-audit.mjs ✓ (49 == baseline)

Bulk verification: re-running cherry-pick script post-execution → WROTE=0
NOOP=9 → A3 residual = 0.

Note: Fork CI does not build Swift targets (per CLAUDE.md). Local Xcode/SPM
build NOT verified — same caveat as merged Wave 1 (#2595) and Wave 2 (#2596).

Polish review: workflow-polish ran in fresh subprocess context (session
cdca14ed-c46d-4540-b78d-77b5b53a46d3). Initial verdict 🟡 STALLED with
finding F1 (TalkConfigParsingTests basename misclassification). After
applying F1 Option A (revert + reclassify ALREADY-SYNCED), effectively 🟢
CLEAN with no remaining findings.

Closes #2584.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Process Cat A cluster A2 (macOS, 35 files) — cherry-pick + EXCLUDE-DIVERGENT for v2026.3.22 sync backlog

1 participant