openclaw: add approval source message links#5940
Conversation
Adds source-message navigation links to approval cards so the owner can jump to the originating message, plus a small a2ui component helper module (urbit/a2ui.ts). Migrated from tloncorp/openclaw-tlon#158 (authored by Dan Brewster). Cherry-picked onto the rebased a2ui stack (#5939), relocated to packages/openclaw. blob.ts merged cleanly with the context-lens/a2ui union from earlier in the stack. 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: bcce3dc8d3
ℹ️ 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".
| type: 'message' as const, | ||
| postId: messageId, | ||
| authorId: approval.requestingShip, | ||
| parentId: approval.originalMessage?.parentId, |
There was a problem hiding this comment.
Include parent authors for reply source links
When the approval came from a thread reply and the owner taps View message, the app's A2UI handler needs target.parentAuthorId if the parent post is not already in the local DB; otherwise it logs missing parent post author and returns before navigating (see packages/app/hooks/useA2UINavigation.ts:80-90). This target only carries parentId, so reply-source approvals from restricted channels/DMs can render a button that does nothing in that common uncached-parent case.
Useful? React with 👍 / 👎.
Summary
Adds source-message navigation links to approval cards so the owner can jump to the originating message, plus a small a2ui component helper module (
src/urbit/a2ui.ts).Stacking / migration
packages/openclaw.src/urbit/blob.tsmerged cleanly with the context-lens/a2ui union established earlier in the stack.Test plan
pnpm tsc --noEmitclean