fix: correct abort-signal import in nextcloud-talk extension#32835
fix: correct abort-signal import in nextcloud-talk extension#32835kevinsong0 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0e8d60aeb
ℹ️ 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".
| type ChannelSetupInput, | ||
| } from "openclaw/plugin-sdk"; | ||
| import { waitForAbortSignal } from "../../../src/infra/abort-signal.js"; | ||
| import { waitForAbortSignal } from "openclaw/plugin-sdk"; |
There was a problem hiding this comment.
Import a valid abort helper from plugin SDK
openclaw/plugin-sdk does not export waitForAbortSignal (checked src/plugin-sdk/index.ts), so this import either fails module loading or yields undefined at runtime depending on loader mode, and startAccount will break when it reaches await waitForAbortSignal(ctx.abortSignal) for Nextcloud Talk accounts. This change therefore introduces a runtime regression for channel startup instead of fixing the original pathing issue.
Useful? React with 👍 / 👎.
Greptile SummaryThis PR correctly replaces a fragile internal relative import (
Confidence Score: 5/5
Last reviewed commit: 2c015a6 |
| type ChannelSetupInput, | ||
| } from "openclaw/plugin-sdk"; | ||
| import { waitForAbortSignal } from "../../../src/infra/abort-signal.js"; | ||
| import { waitForAbortSignal } from "openclaw/plugin-sdk"; |
There was a problem hiding this comment.
waitForAbortSignal is not exported from openclaw/plugin-sdk
The import introduced in this PR will fail at runtime or build time because waitForAbortSignal is not part of the public plugin-sdk API. The plugin-sdk's src/plugin-sdk/index.ts only exports waitUntilAbort (and keepHttpServerTaskAlive) from ./channel-lifecycle.js — there is no waitForAbortSignal in those exports.
The original import from "../../../src/infra/abort-signal.js" pointed to an internal helper that exists but is not re-exported through the SDK. This PR replaces a path that works with one that will produce a "module has no export named 'waitForAbortSignal'" error.
Two valid remedies:
- Export
waitForAbortSignalfrom the plugin-sdk — add it tosrc/plugin-sdk/index.tsand keep this import as-is. - Use the already-exported
waitUntilAbort— if the semantics are equivalent, replace the import and call site withwaitUntilAbort(fromopenclaw/plugin-sdk).
Until one of these is done, the extension will not compile/run correctly.
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/nextcloud-talk/src/channel.ts
Line: 15
Comment:
`waitForAbortSignal` is not exported from `openclaw/plugin-sdk`
The import introduced in this PR will fail at runtime or build time because `waitForAbortSignal` is not part of the public plugin-sdk API. The plugin-sdk's `src/plugin-sdk/index.ts` only exports `waitUntilAbort` (and `keepHttpServerTaskAlive`) from `./channel-lifecycle.js` — there is no `waitForAbortSignal` in those exports.
The original import `from "../../../src/infra/abort-signal.js"` pointed to an internal helper that exists but is not re-exported through the SDK. This PR replaces a path that works with one that will produce a "module has no export named 'waitForAbortSignal'" error.
Two valid remedies:
1. **Export `waitForAbortSignal` from the plugin-sdk** — add it to `src/plugin-sdk/index.ts` and keep this import as-is.
2. **Use the already-exported `waitUntilAbort`** — if the semantics are equivalent, replace the import and call site with `waitUntilAbort` (from `openclaw/plugin-sdk`).
Until one of these is done, the extension will not compile/run correctly.
How can I resolve this? If you propose a fix, please make it concise.
Additional Comments (1)
There are now two separate Prompt To Fix With AIThis is a comment left during a code review.
Path: extensions/nextcloud-talk/src/channel.ts
Line: 1-15
Comment:
Consolidate duplicate `openclaw/plugin-sdk` imports
There are now two separate `import` statements from `"openclaw/plugin-sdk"` (lines 1–14 and line 15). These should be merged into a single import block to follow idiomatic TypeScript module style and avoid confusion for future readers.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
|
@greptile-apps[bot] Re-review requested: Fixed import to use |
|
@greptile-apps[bot] Please re-review - all issues have been addressed. |
|
@greptile-apps[bot] Please re-review this PR. |
|
@greptile-apps[bot] Please scan commit 2c015a6 (latest). The duplicate import issue has been resolved - there is now only ONE import statement from openclaw/plugin-sdk (line 15). Please re-review. |
| resolveAllowlistProviderRuntimeGroupPolicy, | ||
| resolveDefaultGroupPolicy, | ||
| setAccountEnabledInConfigSection, | ||
| waitUntilAbort, |
There was a problem hiding this comment.
Fixed: Now using waitUntilAbort which is exported from openclaw/plugin-sdk (line 152 of src/plugin-sdk/index.ts). The function is correctly imported and used on line 337.
✅ Ready to Merge
@cpojer @sebslight @vincentkoc Could you please review and merge? Thanks! 🦞 |
|
Please don’t spam-ping multiple maintainers at once. Be patient, or join our community Discord for help: https://discord.gg/clawd |
|
@greptile-apps[bot] Please re-scan. The imports are already consolidated (single import from openclaw/plugin-sdk at line 1-15). Previous comment may be stale. |
- Add waitUntilAbort to plugin-sdk/nextcloud-talk.ts exports - Replace waitForAbortSignal with waitUntilAbort in channel.ts - Use SDK-provided function instead of internal import
2c015a6 to
0f87ade
Compare
Fixes #32662 - correct import path for waitForAbortSignal