feat(home-feed): persona avatar for assistant-sent notifications#31060
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fromAssistant: booleantoFeedItem(Zod + TS); populate fromsignal.sourceChannel === \"assistant_tool\"inhome-feed-side-effect.ts.fromAssistant: Bool?toFeedItem(Codable init + Equatable). Hash is identifier-only so untouched.HomeRecapRowgainsshowsPersonaAvatarflag — when true, the 26pt leading slot renders the persona avatar (custom image, animated character, or static fallback) instead of the tinted category icon.HomePageViewpassesitem.fromAssistant == truethrough.Shape choice: went with B (
fromAssistant?: boolean) over A (sourceChannel?: enum). This field is a UI-driver flag — clients don't need to route on every possibleNotificationSourceChannelvalue, they only need to know "did the assistant emit this herself". Carrying the full enum would leak a daemon-internal taxonomy onto the wire with no consumer for the extra values. If a future client needs finer-grained source data we can widen then.System-generated rows (heartbeat, job failures, watchers —
sourceChannel != \"assistant_tool\") keep the existing category icons. The 26pt frame is preserved on both branches so toggling the flag never shifts row layout.Test plan
bun test src/notifications/__tests__/home-feed-side-effect.test.ts— 24 pass (2 new: assistant_tool → true, scheduler → false)bunx tsc --noEmitcleanassistant notifications sendand confirm the row renders the persona avatar; trigger a watcher/heartbeat and confirm the bell icon stays.Original prompt
Velissa's critique #2 — when a feed item originated from the assistant herself (sourceChannel=assistant_tool), the row should show her persona avatar instead of a generic bell icon. Calls out this as the highest identity-shift per LOC in the home feed. Sidd wants all six critique items shipped in parallel; this PR ships #2 (the avatar work, which spans daemon → Swift).