From f2c7836f07c50f3fe0ca0bd8f4565ead3211832a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:17:05 +0000 Subject: [PATCH 1/3] Initial plan From 4572df1a2efddbd01784a07e6f6505b49118a76b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:26:47 +0000 Subject: [PATCH 2/3] feat: add Airtable-style Comments & Activity Timeline components (P0/P1/P2) - Add FeedItem, FieldChangeEntry, Mention, Reaction, RecordSubscription types - Add RecordActivityTimeline component with unified timeline, filtering, pagination - Add RecordChatterPanel component with sidebar/inline/drawer modes - Add CommentInput component - Add FieldChangeItem component for field change history - Add MentionAutocomplete component for @mention suggestions - Add SubscriptionToggle component for bell notification toggle - Add ReactionPicker component for emoji reactions - Add ThreadedReplies component for comment threading - Add comprehensive tests (67 new tests, 185 total passing) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- packages/plugin-detail/src/CommentInput.tsx | 81 ++++ .../plugin-detail/src/FieldChangeItem.tsx | 46 ++ .../plugin-detail/src/MentionAutocomplete.tsx | 123 +++++ packages/plugin-detail/src/ReactionPicker.tsx | 106 +++++ .../src/RecordActivityTimeline.tsx | 424 ++++++++++++++++++ .../plugin-detail/src/RecordChatterPanel.tsx | 202 +++++++++ .../plugin-detail/src/SubscriptionToggle.tsx | 60 +++ .../plugin-detail/src/ThreadedReplies.tsx | 161 +++++++ .../src/__tests__/CommentInput.test.tsx | 57 +++ .../src/__tests__/FieldChangeItem.test.tsx | 72 +++ .../__tests__/MentionAutocomplete.test.tsx | 97 ++++ .../src/__tests__/ReactionPicker.test.tsx | 69 +++ .../__tests__/RecordActivityTimeline.test.tsx | 209 +++++++++ .../src/__tests__/RecordChatterPanel.test.tsx | 129 ++++++ .../src/__tests__/SubscriptionToggle.test.tsx | 51 +++ .../src/__tests__/ThreadedReplies.test.tsx | 108 +++++ packages/plugin-detail/src/index.tsx | 16 + packages/types/src/index.ts | 7 + packages/types/src/views.ts | 113 +++++ 19 files changed, 2131 insertions(+) create mode 100644 packages/plugin-detail/src/CommentInput.tsx create mode 100644 packages/plugin-detail/src/FieldChangeItem.tsx create mode 100644 packages/plugin-detail/src/MentionAutocomplete.tsx create mode 100644 packages/plugin-detail/src/ReactionPicker.tsx create mode 100644 packages/plugin-detail/src/RecordActivityTimeline.tsx create mode 100644 packages/plugin-detail/src/RecordChatterPanel.tsx create mode 100644 packages/plugin-detail/src/SubscriptionToggle.tsx create mode 100644 packages/plugin-detail/src/ThreadedReplies.tsx create mode 100644 packages/plugin-detail/src/__tests__/CommentInput.test.tsx create mode 100644 packages/plugin-detail/src/__tests__/FieldChangeItem.test.tsx create mode 100644 packages/plugin-detail/src/__tests__/MentionAutocomplete.test.tsx create mode 100644 packages/plugin-detail/src/__tests__/ReactionPicker.test.tsx create mode 100644 packages/plugin-detail/src/__tests__/RecordActivityTimeline.test.tsx create mode 100644 packages/plugin-detail/src/__tests__/RecordChatterPanel.test.tsx create mode 100644 packages/plugin-detail/src/__tests__/SubscriptionToggle.test.tsx create mode 100644 packages/plugin-detail/src/__tests__/ThreadedReplies.test.tsx diff --git a/packages/plugin-detail/src/CommentInput.tsx b/packages/plugin-detail/src/CommentInput.tsx new file mode 100644 index 000000000..e3329c825 --- /dev/null +++ b/packages/plugin-detail/src/CommentInput.tsx @@ -0,0 +1,81 @@ +/** + * ObjectUI + * Copyright (c) 2024-present ObjectStack Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import * as React from 'react'; +import { cn, Button } from '@object-ui/components'; +import { Send } from 'lucide-react'; + +export interface CommentInputProps { + /** Called when a comment is submitted */ + onSubmit: (text: string) => void | Promise; + /** Placeholder text */ + placeholder?: string; + /** Whether the input is disabled */ + disabled?: boolean; + className?: string; +} + +/** + * CommentInput — Simple comment input component. + * Renders a "Leave a comment" textarea with submit button. + * Supports Ctrl+Enter to submit. + */ +export const CommentInput: React.FC = ({ + onSubmit, + placeholder = 'Leave a comment…', + disabled = false, + className, +}) => { + const [text, setText] = React.useState(''); + const [isSubmitting, setIsSubmitting] = React.useState(false); + + const handleSubmit = React.useCallback(async () => { + const value = text.trim(); + if (!value) return; + setIsSubmitting(true); + try { + await onSubmit(value); + setText(''); + } finally { + setIsSubmitting(false); + } + }, [text, onSubmit]); + + const handleKeyDown = React.useCallback( + (e: React.KeyboardEvent) => { + if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) { + e.preventDefault(); + handleSubmit(); + } + }, + [handleSubmit], + ); + + return ( +
+