Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA new useChannelParticipants hook supplies accessors for channel users and their ids. Channel and thread inputs call this hook and pass participants into ChannelInput. ChannelInput and the configured markdown editor accept an optional users provider to drive mention behavior. buildPostMessageRequest now takes an options object ({ snapshot, threadId?, participantIds? }) and expands group mentions (e.g., here) into per-participant user mentions while de-duplicating users. New tests cover Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/app/packages/channel/Input/tests/message-payload.test.ts`:
- Around line 11-55: Add a test to verify deduplication when `@here` appears
before an explicit user mention by creating a new it block that calls
buildPostMessageRequest with snapshot: snap([...]) where a group { itemType:
'group', itemId: 'here', groupAlias: 'here' } comes before a { itemType: 'user',
itemId: 'user-a' } entry and participantIds includes ['user-a','user-b']; assert
that result.mentions contains only the expanded users (entity_type: 'user'
entity_id: 'user-a' and 'user-b') and that the explicit user mention is skipped,
matching the other tests' style and expectations.
In `@js/app/packages/channel/Thread/ThreadReplyInput.tsx`:
- Around line 28-35: Duplicate participant query and memo logic
(participantsQuery, channelParticipants, participantIds using
useChannelParticipantsQuery and createMemo) appears in ThreadReplyInput.tsx and
Channel.tsx; extract a reusable hook (e.g.,
useChannelParticipantsData(channelId)) that encapsulates calling
useChannelParticipantsQuery and deriving channelParticipants and participantIds,
return both values from the hook, then replace the inline logic in
ThreadReplyInput.tsx and Channel.tsx with calls to
useChannelParticipantsData(props.channelId) so both components consume the
shared implementation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c6a23c12-2293-484e-ba02-9e607363c5ba
📒 Files selected for processing (6)
js/app/packages/channel/Channel/Channel.tsxjs/app/packages/channel/Input/ChannelInput.tsxjs/app/packages/channel/Input/configured-markdown-editor.tsjs/app/packages/channel/Input/message-payload.tsjs/app/packages/channel/Input/tests/message-payload.test.tsjs/app/packages/channel/Thread/ThreadReplyInput.tsx
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/app/packages/channel/Input/message-payload.ts`:
- Around line 34-41: The code expands every mention with mention.itemType ===
'group' to all participantIds; restrict this by validating the group alias
before expanding—modify the block that checks mention.itemType in
message-payload.ts to also check mention.groupAlias === 'here' (or a whitelist
of allowed aliases) before iterating participantIds, keeping the existing
seenUserIds and result.push logic unchanged so only `@here` groups are expanded.
In `@js/app/packages/channel/use-channel-participants.ts`:
- Around line 15-23: The memos users and ids only check query.isLoading but
ignore query.isError, so surface or log errors: update the hook that defines
users and ids to detect query.isError and either (a) log the error (e.g.,
console.error or a logger) including query.error for debugging, and/or (b)
expose the error state to consumers by returning it alongside the arrays (e.g.,
return { users: createMemo(...), ids: createMemo(...), error: query.error,
isError: query.isError }), and keep the existing graceful fallback using
(query.data ?? []). Ensure you reference the existing symbols users, ids,
channelParticipantInfo and query when making the changes so consumers can react
to query.isError.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1a9fd7ba-68b3-4206-a592-4a874d5ab72a
📒 Files selected for processing (7)
js/app/packages/channel/Channel/Channel.tsxjs/app/packages/channel/Input/ChannelInput.tsxjs/app/packages/channel/Input/configured-markdown-editor.tsjs/app/packages/channel/Input/message-payload.tsjs/app/packages/channel/Input/tests/message-payload.test.tsjs/app/packages/channel/Thread/ThreadReplyInput.tsxjs/app/packages/channel/use-channel-participants.ts
No description provided.