Skip to content

refactor(whatsapp): move channel settings into the plugin - #176129

Merged
vincentkoc merged 3 commits into
mainfrom
refactor/whatsapp-plugin-settings-20261018
Oct 18, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
refactor/whatsapp-plugin-settings-20261018

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Closes #176127

What Problem This Solves

WhatsApp is the remaining channel-specific Settings card implemented in the core Control UI. This moves its presentation and logout confirmation copy to the WhatsApp plugin.

User Impact

The Settings layout, status formatting, configuration controls, account selection, and shared setup QR flow remain the same. Pending confirmation now closes when its view or connection lifetime ends; retained actions cannot affect a replacement account, client, or permission scope.

Why This Change Was Made

The existing channel-detail presenter now exposes guarded actions for the existing shared login owner and host confirmation dialog. The plugin owns the card, DTO, and local copy; the core card and logout helper are removed. The setup wizard retains its real shared controller.

Production TypeScript changes are +474/−248 (net +226); tests are +387/−103 (net +284). Necessary growth is the explicit host capability, plugin mount, and native Settings markup. Most remaining additions are the relocated verified locale catalog; no workflow or publishing change.

Evidence

  • Independent source/boundary reviews completed. Native Astra/high autoreview is scoped-clean through P2 (static review).
  • Exact standalone formatter and diff checks pass. Canonical comparison preserves all 23 English keys and 460 verified translations across 21 locales, with the existing Swedish English fallback.
  • Canonical pinned lockfile generation changes only the WhatsApp importer.
  • Exact-head full CI run 39109141068, attempt 1, passed for 556d16d5394926ef6ac287d20bf8be983d7dc70a: 52 successful jobs, 21 skipped, no failures. This includes all UI unit/browser/real-Gateway shards, production and test types, lint, i18n, and artifact build.
  • Actual execution logs confirm the packaged WhatsApp suite 7/7, plugin Settings suite 4/4, and Channels page suite 32/32. These cover emitted assets, real host phone formatting/configuration, QR and wizard behavior, initial read-only denial, captured account/link changes, and confirmation/action retirement.
  • Exact-head ClawSweeper review reports no findings and sufficient scoped boundary proof. This is production-owner and mocked-Gateway browser evidence, not live WhatsApp or backend authorization proof.
  • Local project tests, build, and i18n verification were not run because the managed checkout has no qualified dependency graph. The execution results above are hosted exact-head evidence, not local test passes.

@vincentkoc vincentkoc added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 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 self-assigned this Oct 18, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: whatsapp-web Channel integration: whatsapp-web app: web-ui App: web-ui size: XL labels Oct 18, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 18, 2026 07:24
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Oct 18, 2026
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 556d16d5394926ef6ac287d20bf8be983d7dc70a
  • Maintainer: @vincentkoc
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • extensions/whatsapp/package.json

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves WhatsApp Settings presentation and confirmation copy into the plugin while retaining host-owned configuration and shared login operations.

Example: An administrator opens logout confirmation for WhatsApp account work, then the Gateway reconnects.

  • Before: The account-bound callback rejects the stale operation, but the confirmation remains open.
  • After: The confirmation closes and no logout request is dispatched.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A coherent, approved extraction with no actionable findings and green exact-head CI; behavioral confidence rests on scoped production-owner and mock-Gateway harness evidence.
Proof confidence 🦐 gold shrimp (3/6) ✨ media proof bonus Sufficient (linked_artifact): For this maintainer-authored PR, the permitted production-owner harness exercises allowed login/logout and rejects initially read-only or retired account, client, permission, connection, and page authority before RPC dispatch; packaged browser coverage supports presentation and reconnect cancellation. The supplied execution report and green exact-head CI support these scenarios; this is scoped mock-Gateway boundary evidence, not live WhatsApp or backend authorization proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: WhatsApp Settings presentation remains coupled to the core UI rather than its channel plugin.
Reason: The maintainer-authored direction follows the existing packaged presentation architecture and removes the competing core presentation path without duplicating shared login state.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR completes an approved ownership extraction still absent from current main; no concrete introduced defect was found, and exact-head CI is green.

Priority: P3
Reviewed head: 556d16d5394926ef6ac287d20bf8be983d7dc70a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Channels page supplies status, locale, configuration mounting, and guarded actions to a packaged plugin view; the shared channel owner sends login and logout RPCs to the Gateway.

flowchart LR
  A[Channels Settings] --> B[Packaged view loader]
  B --> C[WhatsApp plugin card]
  C --> D[Host capability guards]
  D --> E[Shared channel owner]
  E --> F[Gateway RPC]
  D --> G[Host confirmation dialog]
Loading

Technical review

Best possible solution:

Complete the plugin cutover while retaining the existing host owners for configuration, shared login state, and account-bound confirmation.

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

This is an ownership refactor rather than a reported runtime bug; current main directly confirms that WhatsApp presentation still resides in core.

Is this the best way to solve the issue?

The smallest complete extraction moves the card, DTO, and copy through the existing packaged Settings owner while retaining shared login and configuration operations, which this diff does.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 16d0f91a97af.

Provenance checked

  • WhatsApp card rendering keeps the original intent (f49b7cd: The Solid migration preserved the channel card's status, configuration, and QR presentation; this commit establishes the current TSX renderer, not the feature's original introduction.)
  • Account-bound logout confirmation keeps the original intent (1c46d51: Require explicit confirmation before deleting credentials and revalidate account selection and Gateway ownership after the awaited decision.)
  • Page-retained packaged channel presentation keeps the original intent (0a80f9e: Move channel presentation into its plugin while retaining host configuration, authenticated operations, and page-owned editor lifetime.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 0a80f9e adds ui/src/pages/channels/channel-settings-presentation.tsx:114 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0a80f9e0b10e; files: ui/src/pages/channels/channel-settings-presentation.tsx)

PR surface

Source +915, Tests +284, Docs +12, Config +12, Other +12. Total +1235 across 25 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 17 1169 254 +915
Tests 5 387 103 +284
Docs 1 12 0 +12
Config 1 12 0 +12
Generated 0 0 0 0
Other 1 12 0 +12
Total 25 1592 357 +1235

Review metrics

Metric Value Why it matters
Production versus test TypeScript Production +474/-248; tests +387/-103 The growth supports plugin-owned markup and locale integration plus guarded host capabilities; the shared login controller remains singular and superseded renderers are removed.

Labels

Label changes:

  • add P3: This is an internal ownership refactor with no intended configuration or layout change.
  • add merge-risk: 🚨 compatibility: The public channel Settings SDK gains optional snapshot fields and host callbacks; the maintainer-authored direction accepts this additive expansion while preserving existing callers.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • 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:

  • P3: This is an internal ownership refactor with no intended configuration or layout change.
  • merge-risk: 🚨 compatibility: The public channel Settings SDK gains optional snapshot fields and host callbacks; the maintainer-authored direction accepts this additive expansion while preserving existing callers.
  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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 October 18, 2026, 4:05 AM ET / 08:05 UTC.

@vincentkoc
vincentkoc merged commit b15a454 into main Oct 18, 2026
156 checks passed
@vincentkoc
vincentkoc deleted the refactor/whatsapp-plugin-settings-20261018 branch October 18, 2026 16:25
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: whatsapp-web Channel integration: whatsapp-web ci:full Keep ordinary native-locale CI selection on the next PR run. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: move WhatsApp Settings presentation into its plugin

1 participant