fix(zalouser): fix setup-only onboarding flow#49219
Conversation
Greptile SummaryThis PR correctly fixes the Zalouser setup-only onboarding flow by: (1) introducing a dedicated
Confidence Score: 4/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/zalouser/src/shared.ts
Line: 27
Comment:
**`quickstartAllowFrom: true` may be stale**
This flag previously drove `forceAllowFrom: true` into `finalize`, where `promptZalouserAllowFrom` was called. Now that `finalize` is `async ({ cfg }) => ({ cfg: ensureZalouserPluginEnabled(cfg) })` and no longer inspects `forceAllowFrom`, any framework logic that reads `meta.quickstartAllowFrom` and passes `forceAllowFrom` to `finalize` will silently no-op.
The new quickstart DM/allowFrom prompting lives entirely in `prepare` via `promptZalouserQuickstartDmPolicy` (guarded by `options?.quickstartDefaults`). Keeping `quickstartAllowFrom: true` here signals the opposite of the actual control flow, and may confuse future readers or tooling that inspects this flag.
Consider setting it to `false` (or removing the field entirely) to accurately reflect that quickstart allowFrom is now managed explicitly in `prepare`.
```suggestion
quickstartAllowFrom: false,
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: bf29eee |
extensions/zalouser/src/shared.ts
Outdated
| blurb: "Zalo personal account via QR code login.", | ||
| aliases: ["zlu"], | ||
| order: 85, | ||
| quickstartAllowFrom: true, |
There was a problem hiding this comment.
quickstartAllowFrom: true may be stale
This flag previously drove forceAllowFrom: true into finalize, where promptZalouserAllowFrom was called. Now that finalize is async ({ cfg }) => ({ cfg: ensureZalouserPluginEnabled(cfg) }) and no longer inspects forceAllowFrom, any framework logic that reads meta.quickstartAllowFrom and passes forceAllowFrom to finalize will silently no-op.
The new quickstart DM/allowFrom prompting lives entirely in prepare via promptZalouserQuickstartDmPolicy (guarded by options?.quickstartDefaults). Keeping quickstartAllowFrom: true here signals the opposite of the actual control flow, and may confuse future readers or tooling that inspects this flag.
Consider setting it to false (or removing the field entirely) to accurately reflect that quickstart allowFrom is now managed explicitly in prepare.
| quickstartAllowFrom: true, | |
| quickstartAllowFrom: false, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/zalouser/src/shared.ts
Line: 27
Comment:
**`quickstartAllowFrom: true` may be stale**
This flag previously drove `forceAllowFrom: true` into `finalize`, where `promptZalouserAllowFrom` was called. Now that `finalize` is `async ({ cfg }) => ({ cfg: ensureZalouserPluginEnabled(cfg) })` and no longer inspects `forceAllowFrom`, any framework logic that reads `meta.quickstartAllowFrom` and passes `forceAllowFrom` to `finalize` will silently no-op.
The new quickstart DM/allowFrom prompting lives entirely in `prepare` via `promptZalouserQuickstartDmPolicy` (guarded by `options?.quickstartDefaults`). Keeping `quickstartAllowFrom: true` here signals the opposite of the actual control flow, and may confuse future readers or tooling that inspects this flag.
Consider setting it to `false` (or removing the field entirely) to accurately reflect that quickstart allowFrom is now managed explicitly in `prepare`.
```suggestion
quickstartAllowFrom: false,
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf29eeecec
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (options?.quickstartDefaults) { | ||
| next = await promptZalouserQuickstartDmPolicy({ | ||
| cfg: next, |
There was a problem hiding this comment.
Preserve forceAllowFrom behavior when not using quickstart
This change makes Zalouser’s allowlist prompt conditional on options?.quickstartDefaults, and the old finalize fallback that handled forceAllowFrom was removed. As a result, callers that set forceAllowFrom without enabling quickstart defaults (which setupChannels supports via forceAllowFromChannels independently of quickstartDefaults) no longer get the forced DM allowlist step for this channel, so the setup can silently skip the intended allowlist enforcement.
Useful? React with 👍 / 👎.
* main: (142 commits) fix(zalouser): fix setup-only onboarding flow (openclaw#49219) CI: add built plugin singleton smoke (openclaw#48710) update contributing focus areas docs(providers): clarify provider capabilities vs public capability model docs(refactor): align plugin SDK plan with public capability model docs(cli): add plugins inspect command reference docs(plugins): document public capability model, plugin shapes, and inspection Plugins: internalize diagnostics OTel imports Plugins: internalize diffs SDK imports Plugins: internalize more extension SDK imports Plugins: add local extension API barrels Plugins: add inspect matrix and trim export Plugins: add inspect command and capability report fix(telegram): unify transport fallback chain (openclaw#49148) Plugins: add binding resolution callbacks (openclaw#48678) fix(gateway): clear trusted-proxy control ui scopes refactor: narrow extension public seams test: stabilize memory async search close docs(hooks): clarify trust model and audit guidance feat(mattermost): add retry logic and timeout handling for DM channel creation (openclaw#42398) ...
* zalouser: extract shared plugin base to reduce duplication * fix(zalouser): bump zca-js to 2.1.2 and fix state dir resolution * fix(zalouser): allow empty allowlist during onboarding and add quickstart DM policy prompt * fix minor review * fix(zalouser): restore forceAllowFrom setup flow * fix(zalouser): default group access to allowlist
* zalouser: extract shared plugin base to reduce duplication * fix(zalouser): bump zca-js to 2.1.2 and fix state dir resolution * fix(zalouser): allow empty allowlist during onboarding and add quickstart DM policy prompt * fix minor review * fix(zalouser): restore forceAllowFrom setup flow * fix(zalouser): default group access to allowlist
* zalouser: extract shared plugin base to reduce duplication * fix(zalouser): bump zca-js to 2.1.2 and fix state dir resolution * fix(zalouser): allow empty allowlist during onboarding and add quickstart DM policy prompt * fix minor review * fix(zalouser): restore forceAllowFrom setup flow * fix(zalouser): default group access to allowlist
* zalouser: extract shared plugin base to reduce duplication * fix(zalouser): bump zca-js to 2.1.2 and fix state dir resolution * fix(zalouser): allow empty allowlist during onboarding and add quickstart DM policy prompt * fix minor review * fix(zalouser): restore forceAllowFrom setup flow * fix(zalouser): default group access to allowlist (cherry picked from commit b31b681)
* zalouser: extract shared plugin base to reduce duplication * fix(zalouser): bump zca-js to 2.1.2 and fix state dir resolution * fix(zalouser): allow empty allowlist during onboarding and add quickstart DM policy prompt * fix minor review * fix(zalouser): restore forceAllowFrom setup flow * fix(zalouser): default group access to allowlist (cherry picked from commit b31b681)
* zalouser: extract shared plugin base to reduce duplication * fix(zalouser): bump zca-js to 2.1.2 and fix state dir resolution * fix(zalouser): allow empty allowlist during onboarding and add quickstart DM policy prompt * fix minor review * fix(zalouser): restore forceAllowFrom setup flow * fix(zalouser): default group access to allowlist
Summary
Describe the problem and fix in 2–5 bullets:
zca-jslockfile bump to 2.1.2.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
Yes, explain risk + mitigation: None.Repro + Verification
Environment
Steps
allowlistfor DM policy and leave the allowlist blank; optionally configure groups and leave that blank too.zca-jsbump.Expected
Actual
zca-jsmanifest/lockfile mismatch broke frozen installs.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm test -- extensions/zalouser/src/setup-surface.test.ts extensions/zalouser/src/channel.setup.test.ts;pnpm build;pnpm install --frozen-lockfile --ignore-scripts.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Failure Recovery (if this breaks)
plugins.entries.zalouser.enabled false.channels.zalouser.*andplugins.entries.zalouser.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.zca-js2.1.2 could change QR/session behavior in ways not covered by local setup tests.extensions/zalouser, and local verification covered setup, build, and frozen-lockfile installation paths.