Repository navigation
fix(apple): remove two unused chat UI declarations that fail the dead-code scan - #202835
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR removes two unused Apple chat UI declarations and their obsolete localization inventory entry. Example: A pull request triggers the shared OpenClawKit Periphery scan.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherOpenClawChatUI 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]
Technical reviewBest 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
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -43. Total -43 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 20, 2026, 8:55 PM ET / November 21, 2026, 01:55 UTC. |
|
Merged via squash.
|
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.
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:
ChatObscuredPresentationwas replaced by theChatPresentationActivitymodifier inChatView.swift. That modifier readsopenClawChatIsObscureditself and applies the same stream pacing and composer presentation, plus scene activity. TheopenClawChatIsObscuredenvironment entry stays; the iOS root tabs still set it.OpenClawSessionColorDotwas 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
struct OpenClawSessionColorDotandstruct ChatObscuredPresentation.apps/shared/OpenClawKit/Sources/, which is in the scan scope, so its own Periphery run and the Apple build and test jobs in CI are the proof that the scan passes and nothing depended on the removed code. I did not build the Swift package locally.