fix(matrix): move avatar setup into account config#61437
Conversation
Greptile SummaryThis PR fixes a bug where Confidence Score: 5/5Safe to merge — targeted bug fix with full regression coverage and no API-breaking changes. All findings are P2 or lower. The fix is narrowly scoped, correctly adds No files require special attention. Reviews (1): Last reviewed commit: "fix(matrix): move avatar setup into acco..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR fixes Matrix account promotion/setup so avatarUrl is treated as a first-class setup field and correctly migrates from legacy top-level config into channels.matrix.accounts.default when adding a second account.
Changes:
- Extend shared
ChannelSetupInputto includeavatarUrl. - Update Matrix setup + onboarding promotion to move/persist
avatarUrlunder the appropriate account. - Add focused regressions covering setup persistence, onboarding promotion, and CLI forwarding for
--avatar-url.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/channels/plugins/types.core.ts | Adds avatarUrl to the shared setup input contract used across CLI/onboarding/setup adapters. |
| extensions/matrix/src/setup-config.ts | Persists input.avatarUrl into Matrix account config and uses Matrix-local promotion helper. |
| extensions/matrix/src/onboarding.ts | Switches add-account onboarding promotion to Matrix-local promotion logic so Matrix-specific fields (like avatarUrl) move correctly. |
| extensions/matrix/src/setup-core.test.ts | Adds regression ensuring setup stores a trimmed avatarUrl on the target account. |
| extensions/matrix/src/onboarding.test.ts | Adds regression ensuring legacy top-level avatarUrl is promoted into accounts.default. |
| extensions/matrix/src/cli.ts | Removes ad hoc typing; CLI now passes avatarUrl via the shared setup input type. |
| extensions/matrix/src/cli.test.ts | Adds regression ensuring --avatar-url is forwarded through setup and profile sync. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec3d6a0ec9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ec3d6a0 to
a3f819f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3f819f3c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
f20d1bd to
96560a2
Compare
96560a2 to
4dd887a
Compare
|
Merged via squash.
Thanks @gumadeiras! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4dd887a474
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merged via squash. Prepared head SHA: 4dd887a Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 4dd887a Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 4dd887a Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 4dd887a Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Summary
channels.matrix.avatarUrlat the top level instead of moving it intochannels.matrix.accounts.default, and the account-add setup path had to treatavatarUrlas an ad hoc field.avatarUrlis part of sharedChannelSetupInput, setup persistsinput.avatarUrl, and focused regressions now cover onboarding, setup, and CLI account add.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
avatarUrlbelong to Matrix-local promotion rules. Separately, shared setup input omittedavatarUrl, so Matrix had to smuggle it through setup as an ad hoc field.avatarUrlduring second-account promotion ormatrix account add --avatar-url.Regression Test Plan (if applicable)
extensions/matrix/src/onboarding.test.ts,extensions/matrix/src/setup-core.test.ts,extensions/matrix/src/cli.test.tsavatarUrlintoaccounts.default, andmatrix account add --avatar-urlforwards the avatar through setup and profile sync.avatarUrlspecifically.User-visible / Behavior Changes
avatarUrlintochannels.matrix.accounts.defaultwith the rest of the promoted default-account fields.openclaw matrix account add --avatar-url ...now uses the typed shared setup contract instead of a Matrix-only ad hoc path.Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
channels.matrixwith legacy top-level default account plus a new named accountSteps
channels.matrix.avatarUrl.matrix account add.Expected
avatarUrlmoves with the rest of the promoted default-account config intochannels.matrix.accounts.default.Actual
avatarUrlstayed behind atchannels.matrix.avatarUrl.Evidence
Human Verification (required)
--name, trimmed avatar URL input.Review Conversations
Compatibility / Migration
Risks and Mitigations
avatarUrl.