openclaw: pending approvals a2ui reply#5939
Conversation
Adds an a2ui reply for pending-approval prompts so the owner can act on queued approvals directly from the card. Migrated from tloncorp/openclaw-tlon#154 (authored by Dan Brewster). Cherry-picked onto the rebased a2ui-v1 (#5938), relocated to packages/openclaw. Integration note (a2ui x context-lens): #154 attaches an a2ui reply blob and #161/context-lens stamps a reference blob — both on the same outbound reply. The deliver path now merges both into one post-blob field via combineBlobFields() (post-blob fields are entry arrays), so a reply can carry the a2ui card AND the context-lens reference. Confirmed as the intended composition. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2355b34b78
ℹ️ 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".
| return { | ||
| text: '', | ||
| channelData: { tlon: { blob: pending.blob } }, |
There was a problem hiding this comment.
Preserve text fallback for non-DM /pending replies
When the owner runs /pending from a channel/group with 1–4 active approvals, this returns an empty text response whose only useful payload is the A2UI blob. The app only renders A2UI for DM posts and filters it out for non-DM posts (packages/app/ui/components/ChatMessage/StaticChatMessage.tsx:145-153), so the command response becomes blank in those contexts, whereas it previously showed the text list. Keep pending.text as fallback here or only switch to the blob-only card when the command was invoked from a DM.
Useful? React with 👍 / 👎.
Summary
Adds an a2ui reply for pending-approval prompts so the owner can act on queued approvals directly from the card.
Stacking / migration
packages/openclaw.Integration note (a2ui × context-lens)
#154 attaches an a2ui reply blob; context-lens (#5936) stamps a reference blob — both on the same outbound reply. The deliver path now merges both into one post-blob field via a new
combineBlobFields()helper (post-blob fields are JSON entry arrays), so a reply carries the a2ui card and the context-lens reference. This composition was confirmed as intended (neither original PR had to reconcile it, since they were developed independently).Test plan
pnpm tsc --noEmitclean