feat(activity): name bots and the system principal instead of "Automation" - #6237
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe change adds Merge Risk: ⚪ Minimal · up to Activity and side-panel rows now show System for platform actions, bot names for bot actions, and user names for user actions, replacing the Automation label. The implemented resolution paths and test coverage support merge readiness. 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
dfbd87b to
6085169
Compare
…tion" Every non-user actor read "Automation". Actor ids are now parsed once into user / bot / unknown, and names come from a table: the viewer is "You", users resolve through displayName, the system bot (bot_id 5759) reads "System", first-party bots read their constant names, team bots resolve through the bots list, and unparseable ids read "Unknown". The system bot also joins firstPartyBotName so channels stop showing "Bot" for it. Co-authored-by: teo <synoet@users.noreply.github.com>
… lazily, instead of per bot row Co-authored-by: teo <synoet@users.noreply.github.com>
6085169 to
6d6be1a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6d6be1a. Configure here.
…load, not blank Co-authored-by: teo <synoet@users.noreply.github.com>

What
Every non-user actor in the activity feed and the entity side panel read
Automation. Rows written by the platform now readSystem, rows by an agent read the bot's name (Macro,Macro Coder,Cursor, or a team bot's name), and the wordAutomationis gone.Demo
Before (
main) then after (this PR) for a fresh user whose onboarding rows were written by the system principal.mainrenders 18Automationrows; this branch renders the same 18 rows asSystemanddocument.body.innerTextcontains noAutomation.a5_attribution_before_after.mp4
How
core/actor.tsparses the wireactorIdonce into{ kind: 'user' } | { kind: 'bot' } | { kind: 'unknown' }.bot|<uuid>is the only non-user prefix the backend emits (Actor = ChannelSender).@core/constant/macroSystem.tsmirrorsbot_id::MACRO_SYSTEM_BOT_ID(…5759), the principal the backend uses for autonomous platform actions (onboarding seeds and the like). It joinsfirstPartyBotNameinmessage-sender.ts(renamed from the privatesystemBotDisplayNameand exported), so channels stop showingBotfor it too.ActivityContextgainsbotName(botId). The app implementation resolves first-party bots from constants immediately and team bots from the bots list once it succeeds (undefinedwhile loading,Botfor unknown ids). TheuseBotsQuery()subscription is created once per context consumer, lazily under the consumer's owner the first time a team-bot row asks for a name, and reused for every later call; first-party bots and user-only surfaces never create it.createActorNameis ats-patterntable over the parsed actor: viewerYou, user viadisplayName, bot viabotName, unknownUnknown.Tests
core/actor.test.ts: user, bot, and raw fallbacks (bot|,macro|no-at-sign,system:nightly).primitives/actor-name.test.ts: viewer, user, system, first-party bot, team bot, loading team bot, unparseable.context/activity-context.test.tsx: two team-bot rows share oneuseBotsQuery()subscription; a first-party bot never creates it.message-sender.test.ts: the system principal resolves without channel bot data.Part 3 of the activity feed polish program.
To show artifacts inline, enable in settings.