Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…6 tests) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…rdDetailView Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…s + Console integration complete Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…tion for reaction persistence Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add unit tests and console integration for Feed/Chatter component
Feed/Chatter: comprehensive tests + Console RecordChatterPanel integration
Feb 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR completes the Feed/Chatter component initiative (issue #706, #727) by adding comprehensive unit test coverage for all 6 core Feed/Chatter components and migrating the Console's RecordDetailView from the legacy CommentThread to the new spec-aligned RecordChatterPanel. The PR adds ~45 new tests across 6 test files and updates the Console to use the new FeedItem[] data model with support for reactions, threading, and field changes.
Changes:
- Added comprehensive unit tests for RecordActivityTimeline, RecordChatterPanel, FieldChangeItem, ReactionPicker, ThreadedReplies, and SubscriptionToggle components (~45 tests total)
- Migrated Console RecordDetailView from
CommentThread(collaboration package) toRecordChatterPanel(plugin-detail package) with fullFeedItem[]data model support - Updated ROADMAP.md to reflect test count increase (5,618+ total tests) and mark P1.5 checklist items as complete
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/plugin-detail/src/tests/ThreadedReplies.test.tsx | Added 8 tests covering aria-expanded states, avatar rendering (URL vs fallback), Ctrl+Enter submission, input disable/clear during submission |
| packages/plugin-detail/src/tests/SubscriptionToggle.test.tsx | Added 4 tests for title attributes, loading states during toggle, and reactive aria-label updates |
| packages/plugin-detail/src/tests/RecordChatterPanel.test.tsx | Added 8 tests for left/right border styles, width propagation, collapsible=false behavior, inline collapse/expand buttons, and timeline styling passthrough |
| packages/plugin-detail/src/tests/RecordActivityTimeline.test.tsx | Added 14 tests covering all 7 item types, avatar rendering, Ctrl+Enter submit, input states, load more spinner, controlled/uncontrolled filters, reactions toggle, and threading by parentId |
| packages/plugin-detail/src/tests/ReactionPicker.test.tsx | Added 6 tests for disabled state without callback, custom emojiOptions, aria-label content, bg-muted styling, and picker auto-close |
| packages/plugin-detail/src/tests/FieldChangeItem.test.tsx | Added 5 tests for arrow icon rendering, line-through on old values, fieldLabel priority, and empty state handling |
| apps/console/src/components/RecordDetailView.tsx | Replaced CommentThread with RecordChatterPanel; migrated from Comment[] to FeedItem[] model; added reaction mapping from sys_comment response; implemented handleAddReply and handleToggleReaction with optimistic UI updates |
| ROADMAP.md | Updated test count from 5,177+ to 5,618+ and marked P1.5 Feed/Chatter test coverage and Console integration as complete |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
New Feed/Chatter components (#706) shipped without dedicated tests and Console still used the old
CommentThread. This PR closes both gaps.Unit Tests (+43 tests across 6 files)
collapsible=false,border-0 shadow-nonepassthrough, callback forwarding, inline collapse/expand buttonsline-throughon old value,fieldLabelpriority, both-null empty stateemojiOptions, aria-label content, picker auto-closearia-expandedstates,actorAvatarUrlvs initial fallback, Ctrl+Enter, submit disable/cleartitleattribute, loading state, aria-label reactivityConsole
RecordDetailViewMigrationReplaced
CommentThread(from@object-ui/collaboration) →RecordChatterPanel(from@object-ui/plugin-detail):Comment[]→FeedItem[]with mapping fromsys_commentresponse shapehandleAddReplyfor threading,handleToggleReactionwith atomic$toggleReactionpersistenceCommentThread,MessageSquare,threadResolvedstateROADMAP
Original prompt
This section details on the original issue you should resolve
<issue_title>Feed/Chatter 组件:补充测试 + Console 集成 + 完成收尾工作</issue_title>
<issue_description>
背景
#706 的 P0/P1/P2 核心组件代码已全部完成,放置在
packages/plugin-detail/src/,Roadmap P1.5 已更新标记完成。但经评估发现三个关键收尾缺口:
CommentThread)本 Issue 跟踪所有需要开展的细项工作。
任务清单
🔴 Task 1 — 补充新组件单元测试
现有测试覆盖的是旧版
ActivityTimeline和RecordComments,新的消费@objectstack/specFeed 协议的 6 个核心组件均无专项测试。RecordActivityTimeline.test.tsx—packages/plugin-detail/src/__tests__/unifiedTimeline模式:评论与字段变更混排filterMode切换:all / comments_only / changes_only / tasks_onlyfilterMode和非受控内部 filter 两种模式showFilter可通过config.showFilterToggle控制隐藏onAddComment提供时)onAddComment未提供时或config.showCommentInput === false)hasMore=true时显示 "Load more" 按钮edited标记显示 "(edited)"pinned标记显示 "📌 Pinned"source字段显示 "via {source}"SubscriptionToggle在config.showSubscriptionToggle=true且subscription存在时渲染config.enableReactions=true时渲染config.enableThreading=true时按parentId分组RecordChatterPanel.test.tsx—packages/plugin-detail/src/__tests__/position='right'):正确宽度、border-l 样式position='left'):border-r 样式position='bottom'):无 border 样式collapsible=true+defaultCollapsed=true初始折叠collapsible=false时不显示折叠按钮RecordActivityTimeline正确传递config.feed配置border-0 shadow-noneclassFieldChangeItem.test.tsx—packages/plugin-detail/src/__tests__/fieldLabel优先于自动生成oldDisplayValue/newDisplayValue优先于原始值ReactionPicker.test.tsx—packages/plugin-detail/src/__tests__/onToggleReaction(emoji)onToggleReaction(emoji)并关闭 pickeronToggleReaction时不显示 "Add reaction" 按钮onToggleReaction时已有 reaction 按钮 disabledemojiOptions渲染对应 emojiThreadedReplies.test.tsx—packages/plugin-detail/src/__tests__/aria-expanded=false,展开态aria-expanded=trueshowReplyInput=true且onAddReply存在)onAddReply(parentId, text)replies=[]且showReplyInput=false时返回 nullSubscriptionToggle.test.tsx—packages/plugin-detail/src/__tests__/subscribed=true显示 Bell 图标(text-primary 样式)subscribed=false显示 BellOff 图标(text-muted-foreground 样式)onToggle(!subscription.subscribed)onToggle时按钮 disabled🔴 Task 2 — Console RecordDetailView 集成
当前
apps/console/src/components/RecordDetailView.tsx使用旧版CommentThread(来自@object-ui/collaboration)。需要替换为新的 spec 协议组件。替换 CommentThread → RecordChatterPanel
@object-ui/plugin-detail导入RecordChatterPanelCommentThread导入<CommentThread>替换为<RecordChatterPanel>并传入RecordChatterPanelPropsposition: 'bottom'(保持当前内联布局)或改为position: 'right'(Airtable 风格侧边栏)接入 FeedItem 数据模型
commentsstate 从Comment[]改为FeedItem[]FeedItem接口字段:id,type,actor,actorAvatarUrl,body,createdAt,reactions,parentId,replyCountdataSource.find('sys_audit_log', ...)或client.feed.list())🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.