fix(app-shell): map raw sys_activity rows in the inbox Activity tab (#2781)#2782
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…2781) The message-center bell's Activity tab rendered blank rows (only the relative time showed, e.g. `47m ·`). `AppHeader.fetchPresenceAndActivities` cast raw `sys_activity` rows straight to `ActivityItem` without renaming fields, so the popover read `user`/`description`/`objectName` while the rows only carry plugin-audit's `actor_name`/`summary`/`object_name` — every display field came out undefined. Map the rows onto `ActivityItem` (type normalization + timestamp fallback + empty-summary filter), mirroring `useHomeInbox` so the bell and Home stay in sync. Closes #2781. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
问题
顶栏消息中心的**「活动动态」** tab 每条只显示相对时间(
47m ·),操作人/摘要/对象名全空白。根因
packages/app-shell/src/layout/AppHeader.tsx的fetchPresenceAndActivities把sys_activity原始行直接 cast 成ActivityItem,没做字段改名:summarydescriptionactor_nameuserobject_nameobjectNameInboxPopover渲染{a.user} {a.description}与{timeAgo(a.timestamp)} · {a.objectName},除timestamp外全undefined→47m ·。hooks/useHomeInbox.ts做了正确映射,两者本应一致。修复
在 AppHeader 里按
useHomeInbox的方式映射:字段改名 +type归一化 +timestamp兜底 + 过滤空summary。单文件,+29 −3。验证
sys_activity数据完整非空(响应records键)。1m ·/7m ·空条目;打补丁后正常显示Created Semantic Zoo "activity probe row" · 7m showcase_semantic_zoo、Updated User "Dev Admin" · 7m sys_user等。main本就正常,不在本 PR 范围。Closes #2781.
🤖 Generated with Claude Code