Skip to content

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
amir/chat-sharing-3-frontend-pages
Open

feat(DATAGO-128261): EXPERIMENTAL - Chat Sharing #3 add shared session visualization, provider, and routing#1203
amir-ghasemi wants to merge 3 commits intoamir/chat-sharing-2-frontend-sharefrom
amir/chat-sharing-3-frontend-pages

Conversation

@amir-ghasemi
Copy link
Collaborator

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:

  • Added a readOnly prop to ArtifactPanel, ArtifactCard, ArtifactMessage, and FileMessage components 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:

  • Introduced an onDownloadOverride prop to ArtifactPanel, ArtifactCard, and ArtifactMessage, 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:

  • Updated FileMessage to 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:

  • Updated various class names to use semantic color variables and improved empty state messaging for better visual consistency and accessibility. [1] [2] [3] [4]

General code improvements and bug fixes:

  • Improved artifact download logic to prioritize fetched content and fixed dependency arrays for React hooks to ensure correct behavior. [1] [2]
  • Ensured delete dialogs only render when necessary, preventing unnecessary DOM nodes in shared contexts.

These changes make the artifact and file UI components more flexible, robust, and suitable for both editable and read-only contexts.

@amir-ghasemi amir-ghasemi force-pushed the amir/chat-sharing-3-frontend-pages branch 2 times, most recently from 0c6fc66 to 92364d3 Compare March 19, 2026 17:17
amir-ghasemi and others added 2 commits March 19, 2026 14:59
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>
@amir-ghasemi amir-ghasemi force-pushed the amir/chat-sharing-3-frontend-pages branch from 92364d3 to 7faa35e Compare March 19, 2026 19:00
…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.
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.

1 participant