fix(slack): preserve custom identity while streaming - #100084
Conversation
|
Codex review: stale review; fresh review needed. Summary Next step Review history (7 earlier review cycles)
|
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a15c855ac
ℹ️ 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".
| : "dark"; | ||
| return html`<openclaw-terminal-panel | ||
| .client=${state.client} | ||
| .agentId=${chatAgentId} |
There was a problem hiding this comment.
Omit unresolved agent id when opening terminals
When the terminal panel is restored/opened as soon as the gateway connects, this new binding can run before loadControlUiBootstrapConfig or agents.list has populated assistantAgentId/agentsList; in that window chatAgentId falls back to literal "main" (ui/src/ui/app-render.ts:1726-1730) and is sent as an explicit terminal.open agent. For installs whose configured default/only agent is not main, the server treats that explicit id as unknown instead of applying the server-side default, so persisted-open or quick terminal opens fail until the user retries after agents load. Pass no agentId until a real agent id is known, or otherwise let the server resolve the default.
Useful? React with 👍 / 👎.
Use supported chat.startStream authorship and avoid edit-based previews when custom identity cannot stream. Co-authored-by: MoerAI <friendnt@g.skku.edu>
cc4f44e to
e856345
Compare
|
Landed as Verification:
Live Slack mutation proof was not captured because the approved desktop 1Password session timed out; no Slack message was sent during that attempt. Contract proof uses Slack's documented |
Use supported chat.startStream authorship and avoid edit-based previews when custom identity cannot stream. Co-authored-by: MoerAI <friendnt@g.skku.edu>
What Problem This Solves
Slack agent replies posted with a configured display name/avatar lose that custom identity when draft or final preview updates use
chat.update. Closes #58737. Supersedes the implementation in #93972 while preserving contributor credit for @MoerAI.Why This Change Was Made
Slack does not support
username,icon_url, oricon_emojionchat.update; the public method contract and current@slack/web-apitype omit them, and the SDK maintainer confirms there is no update workaround. Slack now supports those authorship fields onchat.startStream.This replacement therefore:
chat.postMessagepath instead;missing_scopestream-start failures into the existing post fallback so short replies are not lost.User Impact
Custom Slack agent names and avatars remain intact. Threaded/native-stream replies retain streaming UX; contexts that cannot use native streaming trade the edit preview for one correctly attributed final message.
Evidence
node scripts/run-vitest.mjs extensions/slack/src/streaming.test.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts— 2 files, 106 tests passed.tbx_01kwq9kbv377k5mhe81ghmsjja— changed extension production/test typecheck, lint, guards, and import-cycle checks passed (run).pnpm buildandpnpm checkpassed during native prepare after rebase.chat.update,chat.startStream, and@slack/web-apirequest types.Known proof gap: a disposable live Slack canary was prepared but desktop 1Password authorization timed out; hosted exact-head CI remains required before merge.