Skip to content

fix(apple): remove two unused chat UI declarations that fail the dead-code scan - #202835

Merged
vincentkoc merged 1 commit into
mainfrom
fix/apple-remove-unused-chat-ui-declarations
Nov 21, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/apple-remove-unused-chat-ui-declarations

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The "macOS Periphery Dead Code" workflow fails on every pull request whose scope triggers the shared OpenClawKit scan, including pull requests that change no Swift file. Its "Intersect shared OpenClawKit dead code" job reports two declarations that are unused on main, so the failure is inherited rather than caused by the pull request under test. The workflow is not a required check, but the default auto-merge landing route refuses a pull request with a failing check, so routine landings stall.

User Impact

User impact: none. The two declarations have no callers, so no app behavior changes. Maintainers and contributors get a passing shared dead-code check again.

Why This Change Was Made

Both declarations lost their last use in c9285dd (#200592), which rebuilt the chat transcript:

  • ChatObscuredPresentation was replaced by the ChatPresentationActivity modifier in ChatView.swift. That modifier reads openClawChatIsObscured itself and applies the same stream pacing and composer presentation, plus scene activity. The openClawChatIsObscured environment entry stays; the iOS root tabs still set it.
  • OpenClawSessionColorDot was drawn only by the old sidebar row. The stripe and the color menu remain in use.

The dot held the only use of the "Session color" string, so the native string inventory drops that one entry. The locale refresh regenerates the string catalogs after merge.

Nothing else is touched: the job reports exactly these two declarations.

Evidence

ChatObscuredPresentation and OpenClawSessionColorDot lost their last
uses in c9285dd (#200592). The chat view now applies drawer and
scene visibility through ChatPresentationActivity, which reads
openClawChatIsObscured itself, and the sidebar no longer draws a
session color dot.

The shared OpenClawKit Periphery intersection reports both as dead
code, so every pull request whose scope triggers that scan fails
"Intersect shared OpenClawKit dead code".

The dot held the only "Session color" string, so the native string
inventory drops that entry.
@vincentkoc vincentkoc self-assigned this Nov 21, 2026
@clawsweeper

clawsweeper Bot commented Nov 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.

@vincentkoc
vincentkoc marked this pull request as ready for review November 21, 2026 01:39
@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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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 Nov 21, 2026
@clawsweeper

clawsweeper Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes two unused Apple chat UI declarations and their obsolete localization inventory entry.

Example: A pull request triggers the shared OpenClawKit Periphery scan.

  • Before: The intersection reports ChatObscuredPresentation and OpenClawSessionColorDot as dead code.
  • After: Neither declaration remains to trigger those findings; this PR’s scan is still running.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The minimal patch is supported by source and existing failure evidence; confidence in the final scan outcome remains limited until the running checks finish.
Proof confidence 🦐 gold shrimp (3/6) This unused-code cleanup has no user-visible behavior change; source and failure annotations support the repair, with final Swift and Periphery validation still pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Inherited dead-code failures stall routine PR landings.
Reason: The maintainer-authored direction is supported by unused-code evidence and preserves the active implementations.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR removes verified unused declarations reported by the shared dead-code check, with no actionable patch findings.

Priority: P2
Reviewed head: 78413cc658c258315b336e43723f2a5ca3ce70f7

Before merge

None.

Findings

None.

Agent review details

How this fits together

OpenClawChatUI supplies shared SwiftUI components to the Apple apps, while Periphery intersects iOS and macOS consumer scans to identify unused shared declarations.

flowchart TD
  A[Apple app consumers] --> B[Shared OpenClawChatUI]
  B --> C[iOS Periphery report]
  B --> D[macOS Periphery report]
  C --> E[Shared declaration intersection]
  D --> E
  E --> F[Dead code check result]
Loading

Technical review

Best possible solution:

Complete the existing cutover by removing these unused declarations and retaining the current presentation and color owners.

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

GitHub’s failed intersection annotations identify both declarations, and current-main reference searches confirm neither has a caller; no target code was executed.

Is this the best way to solve the issue?

The deletion is the smallest complete fix: it removes abandoned implementations without weakening the scanner or adding suppression rules.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a9978c1 adds apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionColor.swift:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a9978c1c6edd; files: apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionColor.swift)

PR surface

Source -43. Total -43 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 0 43 -43
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 0 43 -43

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: An inherited dead-code check failure obstructs routine contributor and maintainer landings without changing app runtime behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: An inherited dead-code check failure obstructs routine contributor and maintainer landings without changing app runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 November 20, 2026, 8:55 PM ET / November 21, 2026, 01:55 UTC.

@vincentkoc
vincentkoc merged commit c30d951 into main Nov 21, 2026
152 of 153 checks passed
@vincentkoc
vincentkoc deleted the fix/apple-remove-unused-chat-ui-declarations branch November 21, 2026 02:43
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
ChatObscuredPresentation and OpenClawSessionColorDot lost their last
uses in d8f4cfa (openclaw#200592). The chat view now applies drawer and
scene visibility through ChatPresentationActivity, which reads
openClawChatIsObscured itself, and the sidebar no longer draws a
session color dot.

The shared OpenClawKit Periphery intersection reports both as dead
code, so every pull request whose scope triggers that scan fails
"Intersect shared OpenClawKit dead code".

The dot held the only "Session color" string, so the native string
inventory drops that entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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