feat(DATAGO-128261): EXPERIMENTAL - Chat Sharing #3 add shared session visualization, provider, and routing#1203
Open
amir-ghasemi wants to merge 3 commits intoamir/chat-sharing-2-frontend-sharefrom
Conversation
0c6fc66 to
92364d3
Compare
Shared session viewing infrastructure: - SharedChatProvider: minimal ChatContext provider for read-only shared sessions with all write operations as no-ops - SharedFlowChartPanel: standalone flow chart visualization without ChatContext/TaskContext dependencies - SharedVisualizerStepCard: read-only step card for workflow display with agent info, timing, and status indicators - SharedWorkflowPanel: orchestrates workflow visualization from shared task events data - Router: add /share/:shareId (standalone) and /shared-chat/:shareId (in-app) routes for shared session viewing - ChatContext: add isCollaborativeSession and hasSharedEditors flags - ChatProvider/MockChatProvider: provide new context fields - ArtifactPanel/ArtifactCard/ArtifactMessage/FileMessage: add readOnly and onDownloadOverride props for shared views Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…v4 var syntax - Replace React.FC pattern with direct prop destructuring - Use named React imports instead of default import - Convert [var(--foo)] bracket syntax to Tailwind v4 (--foo) syntax - Replace template literal className with cn() in ArtifactCard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
92364d3 to
7faa35e
Compare
…mpat - SharedChatProvider: import from @/lib/api/share (was @/lib/api/shareApi) - ChatProvider: dynamic imports from @/lib/api/share, use camelCase fields (shareId, accessLevel) matching service layer toCamelCase() - SharedWorkflowPanel: access SharedTaskEvent with camelCase fields (eventType, solaceTopic, sourceEntity, etc.) matching share.ts types Note: tsc fails due to forward dependencies on SharedChatViewPage and SharedSessionPage (defined in PR #4). The full stack builds correctly.
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.
This pull request introduces a "read-only" mode for artifact-related UI components in the frontend, allowing views where file actions like delete and refresh are hidden or disabled. It also adds support for custom download handlers and improves the flexibility of artifact and file message rendering, especially for shared or embedded contexts where the main chat context may not be available.
Key changes include:
Read-only mode support for artifact components:
readOnlyprop toArtifactPanel,ArtifactCard,ArtifactMessage, andFileMessagecomponents to hide or disable editing actions such as delete, refresh, and preview in read-only contexts. This ensures the UI can be safely embedded or shared without exposing destructive actions. [1] [2] [3] [4]Custom download handler support:
onDownloadOverrideprop toArtifactPanel,ArtifactCard, andArtifactMessage, allowing parent components to supply a custom download function. This is useful for specialized download workflows or integrations. [1] [2] [3]Context-aware and robust file message rendering:
FileMessageto gracefully handle cases where the chat context is unavailable (e.g., in shared sessions), defaulting to read-only mode and disabling context-dependent actions. [1] [2]UI and style improvements:
General code improvements and bug fixes:
These changes make the artifact and file UI components more flexible, robust, and suitable for both editable and read-only contexts.