Skip to content

feat(P1.5): Console — Comments & Collaboration#718

Merged
hotlong merged 3 commits intomainfrom
copilot/complete-roadmap-dev-p1-5-console
Feb 22, 2026
Merged

feat(P1.5): Console — Comments & Collaboration#718
hotlong merged 3 commits intomainfrom
copilot/complete-roadmap-dev-p1-5-console

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

Implements the four P1.5 roadmap items: @mention notification delivery, cross-record comment search, comment pinning, and activity feed filtering.

Types (@object-ui/types)

  • Extended CommentEntry with pinned, mentions, objectName, recordId
  • Added MentionNotification type (recipient, channels, read state)
  • Added CommentSearchResult type (comment + highlight snippet)

Hooks (@object-ui/collaboration)

  • useMentionNotifications — notification state management with onDeliver callback for email/push dispatch, mark-as-read, dismiss
  • useCommentSearch — case-insensitive text/author search across a flat comment list, returns CommentSearchResult[] with highlighted snippets

UI Changes

  • CommentThread — new onMentionNotify(userIds, content) callback, fires on submit when @mentions are detected
  • RecordCommentssearchable prop adds search input with clear; onTogglePin enables pin/unpin per comment; pinned comments sort first with visual indicator
  • ActivityTimelinefilterable prop renders filter pills (All / Comments / Field Changes / Creates / Deletes / Status Changes); defaultFilter sets initial state
// Activity feed with filtering
<ActivityTimeline activities={entries} filterable defaultFilter="comment" />

// Record comments with search + pinning
<RecordComments comments={comments} searchable onTogglePin={handlePin} />

// Mention notification delivery
<CommentThread
  onMentionNotify={(userIds, text) => deliverNotifications(userIds, text)}
  {...otherProps}
/>

Tests

40 new tests across 5 files. All 291 existing tests in affected packages pass.

Original prompt

完成roadmap开发 P1.5 Console — Comments & Collaboration

@mention notification delivery (email/push)
Comment search across all records
Comment pinning/starring
Activity feed filtering (comments only / field changes only)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 22, 2026 7:13am
objectui-demo Ready Ready Preview, Comment Feb 22, 2026 7:13am
objectui-storybook Ready Ready Preview, Comment Feb 22, 2026 7:13am

Request Review

Copilot AI and others added 2 commits February 22, 2026 07:04
- Add MentionNotification, CommentSearchResult types to @object-ui/types
- Extend CommentEntry with pinned, mentions, objectName, recordId fields
- Create useMentionNotifications hook in @object-ui/collaboration
- Create useCommentSearch hook in @object-ui/collaboration
- Add onMentionNotify callback to CommentThread
- Add comment pinning/starring and search to RecordComments
- Add activity type filtering to ActivityTimeline

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ing, and activity filtering

- 40 new tests across 5 test files
- All 291 tests in affected packages pass
- ROADMAP.md updated to mark P1.5 items as complete

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement comments and collaboration features for roadmap P1.5 feat(P1.5): Console — Comments & Collaboration Feb 22, 2026
Copilot AI requested a review from hotlong February 22, 2026 07:12
@hotlong hotlong marked this pull request as ready for review February 22, 2026 07:29
Copilot AI review requested due to automatic review settings February 22, 2026 07:29
@hotlong hotlong merged commit 9d193ed into main Feb 22, 2026
4 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements the P1.5 Comments & Collaboration roadmap items, adding mention notifications, comment search, pinning, and activity filtering to the ObjectUI collaboration suite. The implementation follows ObjectUI's SDUI architecture by extending type definitions, adding React hooks for state management, and enhancing UI components with new interactive features.

Changes:

  • Extended CommentEntry, added MentionNotification and CommentSearchResult types in @object-ui/types
  • Added useMentionNotifications and useCommentSearch hooks in @object-ui/collaboration for notification and search state management
  • Enhanced RecordComments with search input and pinning controls, ActivityTimeline with type filters, and CommentThread with mention notification callbacks
  • Added 40 new tests across 5 test files covering all new features
  • Marked all P1.5 roadmap items as complete

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/types/src/views.ts Extended CommentEntry with pinned/mentions/objectName/recordId fields; added MentionNotification and CommentSearchResult interfaces
packages/types/src/index.ts Exported new MentionNotification and CommentSearchResult types
packages/plugin-detail/src/index.tsx Exported ActivityFilterType for activity filtering
packages/plugin-detail/src/RecordComments.tsx Added searchable prop with search input UI and onTogglePin callback for comment pinning
packages/plugin-detail/src/ActivityTimeline.tsx Added filterable prop with filter pills UI and defaultFilter for initial state
packages/collaboration/src/CommentThread.tsx Added onMentionNotify callback that fires when @mentions are detected on submit
packages/collaboration/src/useMentionNotifications.ts New hook for managing mention notifications with delivery, read/unread state, and dismissal
packages/collaboration/src/useCommentSearch.ts New hook for searching comments across records with highlighted snippets
packages/collaboration/src/index.ts Exported new hooks and types
packages/plugin-detail/src/tests/RecordCommentsPinSearch.test.tsx Tests for comment pinning and search functionality
packages/plugin-detail/src/tests/ActivityTimelineFiltering.test.tsx Tests for activity timeline filtering
packages/collaboration/src/tests/useMentionNotifications.test.ts Tests for mention notification hook
packages/collaboration/src/tests/useCommentSearch.test.ts Tests for comment search hook
packages/collaboration/src/tests/CommentThreadMentionNotify.test.tsx Tests for CommentThread mention callback
ROADMAP.md Marked all P1.5 items as complete
Comments suppressed due to low confidence (1)

packages/collaboration/src/useCommentSearch.ts:43

  • The JSDoc comment at line 32 states "Returns the match wrapped in tags for display" but the function does not actually wrap the match in any HTML tags. It only returns a plain text snippet with ellipsis. Either update the documentation to accurately reflect what the function does, or implement actual highlighting by wrapping the matched portion in tags or similar markup.
/**
 * Build a highlighted snippet around the first match of `query` in `text`.
 * Returns the match wrapped in <mark> tags for display.
 */
function buildHighlight(text: string, query: string): string {
  if (!query) return text;
  const idx = text.toLowerCase().indexOf(query.toLowerCase());
  if (idx === -1) return text;
  const start = Math.max(0, idx - 30);
  const end = Math.min(text.length, idx + query.length + 30);
  const before = start > 0 ? '…' : '';
  const after = end < text.length ? '…' : '';
  return `${before}${text.slice(start, end)}${after}`;
}

Comment on lines +52 to +63
export {
useMentionNotifications,
type MentionNotificationsConfig,
type MentionNotificationsResult,
} from './useMentionNotifications';

export {
useCommentSearch,
type CommentSearchConfig,
type CommentSearchReturn,
} from './useCommentSearch';

Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the Documentation Driven Development guideline (Rule #2), every feature implemented or refactored must update the corresponding documentation, including the package README.md. The new hooks useMentionNotifications and useCommentSearch should be documented in packages/collaboration/README.md with usage examples similar to the existing hooks. Additionally, the new props for RecordComments and ActivityTimeline should be documented. The task is not complete until documentation reflects the new code/architecture.

Copilot generated this review using guidance from repository custom instructions.
export type { RelatedListProps } from './RelatedList';
export type { RecordCommentsProps } from './RecordComments';
export type { ActivityTimelineProps } from './ActivityTimeline';
export type { ActivityTimelineProps, ActivityFilterType } from './ActivityTimeline';
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the Documentation Driven Development guideline (Rule #2), the new props added to RecordComments (searchable, onTogglePin) and ActivityTimeline (filterable, defaultFilter), as well as the new exported type ActivityFilterType, should be documented in packages/plugin-detail/README.md with usage examples. The task is not complete until documentation reflects the new features.

Copilot generated this review using guidance from repository custom instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants