Repository navigation
refactor(status): share terminal report context - #134946
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 3:31 AM ET / 07:31 UTC. ClawSweeper reviewWhat this changesThe PR centralizes terminal table width and rendering context at the shared status-report section renderer, removing duplicate fields from normal and detailed status sections. Merge readiness✅ Ready for maintainer review Keep open. The introduced refactor preserves the status-section ordering and empty-section rules while moving one report-wide table context to its shared renderer; current main still uses per-section context and has not absorbed this change. Priority: P3 Review scores
Verification
How this fits togetherThe status commands collect runtime and channel health data, assemble typed report sections, and render those sections as terminal output for operators. This PR changes only the shared formatting boundary between section assembly and table rendering. flowchart LR
A[Runtime status data] --> B[Normal status builder]
A --> C[Detailed status builder]
B --> D[Shared section renderer]
C --> D
D --> E[Terminal table renderer]
E --> F[Operator status output]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -55, Tests +73. Total +18 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain this single shared report-rendering boundary and land it after the normal exact-head merge gates complete. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a presentation-plumbing refactor, not a report of broken existing behavior. Is this the best way to solve the issue? Yes. The two only production callers supply one renderer and width for all their table sections, so the shared renderer is the natural owner and avoids duplicated per-section context. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d9f3889e51de. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Removes repeated terminal-report setup in normal and detailed status output while preserving the reports operators see.
Why This Change Was Made
The report owner prepares terminal styling and rendering context once and passes it through the existing report renderers. This removes duplicated setup and lookup paths without changing status collection, diagnosis, ordering or JSON output.
User Impact
No intended behavior change. Production code decreases by 55 lines; focused test coverage adds 73 lines. This changes presentation plumbing only.
Evidence
All 18 focused status-report tests pass. An external baseline/candidate corpus compared 20,736 mixed-section compositions and 768 compact reports byte-for-byte, including ANSI and terminal-width cases. Detailed status rendering and asynchronous Diagnosis handoff are covered by the focused integration tests. Selected type, format, lint, dead-export, runtime-sidecar and architecture checks pass. Independent P2 review and deslop found no actionable issue. Rebase onto current main preserved all seven touched files exactly.
Review follow-through
The latest ClawSweeper review found no actionable issue. Exact-head CI 33480804343, including the required CI gate, is successful. Maintainer review confirms the shared section renderer is the existing owner for both report builders.