Repository navigation
refactor(ui): derive gateway types from protocol and consolidate navigation/error helpers - #120348
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 7, 2026, 5:25 PM ET / 21:25 UTC. ClawSweeper reviewWhat this changesThe branch derives repeated Gateway types from protocol schemas and centralizes Control UI navigation, error-redaction, and Gateway lifecycle helpers. Merge readinessKeep open for maintainer review: the PR repairs real protocol/UI ownership drift and no concrete patch defect was found, while the protected Priority: P3 Review scores
Verification
How this fits togetherGateway schemas define data exchanged with the server; Control UI pages consume that data and react to connection changes. The PR moves duplicated type and lifecycle policy to their existing shared owners. flowchart LR
A[Gateway protocol schemas] --> B[Gateway server responses]
B --> C[Control UI API types]
C --> D[Shared UI helpers]
D --> E[Navigation and page views]
F[Gateway connection changes] --> D
Decision needed
Why: The protected maintainer label and member authorship prohibit automated cleanup; the remaining decision is merge ownership rather than a mechanical patch repair. Before merge
Agent review detailsSecurityNone. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the coherent owner-boundary refactor after a maintainer confirms the refreshed merge result; retain page-specific reset callbacks while sharing only Gateway connection lifecycle mechanics. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a refactor; the relevant evidence is behavior-preservation coverage for protocol typing, navigation, and connection lifecycle handling. Is this the best way to solve the issue? Yes: existing Gateway schemas and GatewayPageController are the narrowest canonical owners, avoiding further UI-local type copies and page-local subscription loops. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 87156bab23d0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…gation/error helpers (openclaw#120348) * refactor(protocol): derive shared gateway types * refactor(ui): consolidate navigation click handling * refactor(ui): centralize UI state and error helpers
What Problem This Solves
The Control UI independently mirrored several Gateway protocol types and repeated the same navigation, error-formatting, and Gateway lifecycle policy across many call sites. Those copies had already drifted: presence omitted tags and treated its timestamp as optional, session rows omitted three protocol fields and required an optional timestamp, and agent scope widened a closed wire union to any string.
Why This Change Was Made
User Impact
There is no visual redesign. The UI now receives the complete protocol session/presence shape and shares one consistent policy for normal navigation clicks, redacted error messages, and Gateway identity changes.
Intentional behavior fixes
Evidence
Research Re-verification Notes