Repository navigation
refactor(ui): share channel status type definitions - #140331
Conversation
|
🦞👀 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. Reviewed September 6, 2026, 2:09 PM ET / 18:09 UTC. ClawSweeper reviewWhat this changesThe PR shares common Control UI channel status and probe types while preserving all six exported channel shapes and their existing fields. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, maintainer-directed cleanup absent from fetched main. No actionable correctness or security findings were identified. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI receives channel status snapshots from the Gateway and projects them into channel-specific types. The channel detail renderer uses those projections to display lifecycle status, probe results, and configuration details. flowchart LR
A[Gateway channel status] --> B[UI snapshot request]
B --> C[Channel status types]
C --> D[Select channel details]
D --> E[Lifecycle and probe display]
D --> F[Channel configuration details]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -77. Total -77 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Retain the shared local type definitions and unchanged channel-specific projections without adding runtime abstractions or compatibility machinery. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes repeated type declarations rather than repairing a reported runtime defect. Is this the best way to solve the issue? Yes: private shared aliases preserve the existing structural contracts and active consumers without changing the Gateway protocol or plugin APIs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3967d9b6df1f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
4eefe2b to
411d380
Compare
|
Merged via squash.
|
* origin/main: (25 commits) docs(releases): keep the release-notes nav group to version routes (#140353) fix(ui): hide trust wrappers in imported chat history fix(subagents): subagent list building decodes unrelated saved prompts in large session stores (#139540) test(process): share relay startup fixtures (#140345) refactor(doctor): inline GitHub skill discovery inputs (#140343) refactor(ui): share channel status type definitions (#140331) refactor: simplify queue state and infrastructure dispatch (#140311) fix: require saved agent turns before update verification succeeds (#140274) fix(update): keep the service profile when switching to Git (#140263) fix(ui): prevent image avatars overlapping mobile chat (#140341) fix(test): accept release subpages in docs route shape (#140337) refactor(plugins): share uninstall mutation ownership (#140322) refactor(agents): use canonical tool execution arguments (#140280) perf(cli): keep inference metadata and domain help lazy (#140327) refactor(plugins): simplify self-hosted setup results (#140332) refactor(config): reuse parent lookup for unset operations (#140326) fix(plugins): preserve exact installed-index mutation receipts (#140328) test(agents): simplify MCP and LSP boundary fixtures (#140312) fix(ui): preserve literal source previews and copied whitespace (#140306) fix: OpenCode Go/Zen requests are missing the required x-opencode-session header (#137464) ...
…prior run, seen on other unrelated PRs openclaw#140331/openclaw#133565/openclaw#133580, passes locally on current main)
Related: #135868
What Problem This Solves
The Control UI repeats the same lifecycle and probe fields across six channel status types. This creates avoidable maintenance debt in the maintainer-directed deletion campaign following the #135868 split.
Why This Change Was Made
Share the common lifecycle/probe definitions and the identical Slack bot/team identity shape. Keep all six exported channel types and every existing field, requiredness, nullability, and channel-specific probe detail. The types are actively read through the detail renderer's computed channel key, so none of those runtime projections are removed.
User Impact
No user-visible change. This removes 77 production lines (+21/−98) from one file, with no test, tooling, or documentation delta. No tests or coverage are removed. UI rendering, styles, requests, and emitted JavaScript are unchanged.
Evidence
node scripts/run-vitest.mjs --config ui/vitest.config.ts ui/src/pages/channels ui/src/lib/channels: 8 files, 120 tests passed. Existing localized status/probe cases remain inui/src/pages/channels/view.test.ts:507; missing-status distinctions remain at:557.node scripts/check-changed.mjs: passed the full selected gate (core-test types, UI types, i18n, dead exports, lint).Resolved CI blocker
The first head exposed an unrelated main failure in
test/scripts/docs-sync-publish.test.ts:377, where the route guard rejected release subpages from #140319. The separate repair #140337 is now merged. Landing this unchanged type refactor requires fresh exact-head CI against the repaired main.ClawSweeper reviewed the original type patch with no actionable findings, before-merge requests, or rank-up moves. The rebased patch remains identical. All 120 focused channel tests and the 10 docs-sync tests pass on the repaired-main branch.