Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ed items Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates project documentation and roadmap status to reflect completion of several roadmap items, including new documentation for the Feed/Chatter (plugin-detail) package and updated milestone/status metadata.
Changes:
- Added new MDX documentation page for the Feed & Chatter system (
plugin-detail). - Registered the new plugin doc page in the plugins docs navigation (
meta.json). - Updated
ROADMAP.mdstatuses/metrics (marking items complete, refreshing dates and success metrics).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
content/docs/plugins/plugin-detail.mdx |
Adds documentation for Feed/Chatter components, usage, and Console integration examples. |
content/docs/plugins/meta.json |
Adds plugin-detail to the plugins docs sidebar ordering. |
ROADMAP.md |
Marks roadmap items complete and refreshes “success metrics” and priorities. |
| - [x] Add `inlineEdit`/`wrapHeaders`/`clickIntoRecordDetails`/`addRecordViaForm`/`addDeleteRecordsInline`/`collapseAllByDefault`/`fieldTextColor`/`prefixField`/`showDescription` to `NamedListView` and `ListViewSchema` types and Zod schema (Issue #719) | ||
| - [x] Update Console `renderListView` to pass all config properties in `fullSchema` | ||
| - [ ] Audit all `useMemo`/`useEffect` dependency arrays in `plugin-view/ObjectView.tsx` for missing `activeView` sub-properties | ||
| - [x] Audit all `useMemo`/`useEffect` dependency arrays in `plugin-view/ObjectView.tsx` for missing `activeView` sub-properties — all hooks correctly use whole `activeView` object reference; React shallow equality handles sub-property changes |
There was a problem hiding this comment.
This note is technically inaccurate: React dependency arrays use Object.is on each dependency, not “shallow equality”. Depending on the whole activeView object only works if updates always replace it with a new object reference when any sub-property changes; otherwise hooks will not re-run. Please rephrase to reflect reference equality semantics (and/or note the requirement that activeView must be immutable).
| - [x] Audit all `useMemo`/`useEffect` dependency arrays in `plugin-view/ObjectView.tsx` for missing `activeView` sub-properties — all hooks correctly use whole `activeView` object reference; React shallow equality handles sub-property changes | |
| - [x] Audit all `useMemo`/`useEffect` dependency arrays in `plugin-view/ObjectView.tsx` for missing `activeView` sub-properties — all hooks correctly depend on the whole `activeView` object reference; because React compares dependencies by reference with `Object.is`, this relies on `activeView` being updated immutably (new object reference whenever any sub-property changes) |
| | **Build Status** | 43/43 pass | 43/43 pass | `pnpm build` | | ||
| | **Test Count** | 6,700+ | 6,700+ | `pnpm test` summary | | ||
| | **Test Coverage** | 90%+ | 90%+ | `pnpm test:coverage` | | ||
| | **Storybook Stories** | 78 | 91+ (1 per component) | Story file count | | ||
| | **Storybook Stories** | 80 | 91+ (1 per component) | Story file count | |
There was a problem hiding this comment.
The roadmap now reports updated build/test/storybook metrics (e.g., “43/43 pass”, “6,700+” tests), but the PR description indicates the full test run hasn’t been completed yet. Please run the full CI-equivalent checks (at least pnpm test / pnpm build, and update these numbers based on the actual output) or mark these metrics as unverified until the run is done.
| title: "Plugin Detail — Feed & Chatter" | ||
| --- | ||
|
|
||
| import { InteractiveDemo } from '@/app/components/InteractiveDemo'; |
There was a problem hiding this comment.
InteractiveDemo is imported at the MDX top-level but never used in this document. Please remove the unused import (or add an actual InteractiveDemo section) to avoid unused-import warnings and keep the docs consistent with other plugin pages.
| import { InteractiveDemo } from '@/app/components/InteractiveDemo'; |
| const comments = await dataSource.find('sys_comment', { | ||
| $filter: { threadId }, | ||
| $orderby: 'createdAt asc', |
There was a problem hiding this comment.
The Console integration snippet shows dataSource.find('sys_comment', { $filter: { threadId } }), but the Console code uses a string filter expression and find() resolves to a response object (with data), not a raw array. Please update the snippet to match the real API usage so copy/paste works.
| const comments = await dataSource.find('sys_comment', { | |
| $filter: { threadId }, | |
| $orderby: 'createdAt asc', | |
| const { data: comments } = await dataSource.find('sys_comment', { | |
| filter: `threadId = "${threadId}"`, | |
| orderBy: 'createdAt asc', |
| // Map to FeedItem[] | ||
| const feedItems: FeedItem[] = comments.map(c => ({ | ||
| id: c._id, | ||
| type: 'comment', | ||
| actor: c.author, | ||
| body: c.body, | ||
| createdAt: c.createdAt, | ||
| reactions: c.reactions ?? [], |
There was a problem hiding this comment.
The mapping example for sys_comment → FeedItem[] doesn’t match the Console implementation: the record uses id (not _id), comment text is stored under content (not body), author is an object (so actor should be derived from author.name), and reactions are persisted as an emoji->userIds map that must be converted to Reaction[] (count + reacted) for the UI. Please adjust the example to reflect these field names and the reaction conversion logic.
| // Map to FeedItem[] | |
| const feedItems: FeedItem[] = comments.map(c => ({ | |
| id: c._id, | |
| type: 'comment', | |
| actor: c.author, | |
| body: c.body, | |
| createdAt: c.createdAt, | |
| reactions: c.reactions ?? [], | |
| // Current viewer's user id (from your auth/session layer) | |
| const currentUserId = /* get current user id */ ''; | |
| // Helper: convert emoji -> userIds map into Reaction[] | |
| const toReactions = ( | |
| reactionMap: Record<string, string[]> | undefined, | |
| userId: string, | |
| ): Reaction[] => { | |
| if (!reactionMap) return []; | |
| return Object.entries(reactionMap).map(([emoji, userIds]) => ({ | |
| emoji, | |
| count: userIds.length, | |
| reacted: !!userId && userIds.includes(userId), | |
| })); | |
| }; | |
| // Map to FeedItem[] | |
| const feedItems: FeedItem[] = comments.map(c => ({ | |
| id: c.id, | |
| type: 'comment', | |
| actor: c.author?.name, | |
| body: c.content, | |
| createdAt: c.createdAt, | |
| reactions: toReactions(c.reactions, currentUserId), |
content/docs/plugins/plugin-detail.mdx) — P1.5 line 170activeViewobject reference)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.