FN-7166: Refresh artifact lists from registration events
Artifact list surfaces now refresh from authoritative registry and artifact-message signals.\n\n- Emit an artifact:registered TaskStore event after successful registry writes and forward it over dashboard SSE.\n- Subscribe useArtifacts to artifact/message SSE events, scope refreshes by project/task, debounce duplicate signals, and avoid loading flashes when project context is missing.\n- Document live artifact refresh behavior and add regression coverage for store events and hook refresh paths.\n\nFiles changed:\n .changeset/FN-7166-artifact-live-refresh.md | 7 +\n docs/dashboard-guide.md | 3 +-\n packages/core/src/__tests__/artifacts.test.ts | 20 +-\n packages/core/src/store.ts | 8 +-\n .../app/hooks/__tests__/useArtifacts.test.ts | 227 +++++++++++++++++++--\n packages/dashboard/app/hooks/useArtifacts.ts | 83 +++++++-\n packages/dashboard/src/sse.ts | 7 +\n 7 files changed, 335 insertions(+), 20 deletions(-) Fusion-Task-Id: FN-7166 Fusion-Task-Lineage: f13e254d-d65c-423e-8d9c-94c31761eac2 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -597,6 +597,7 @@ Features:
|
||||
- Search documents across tasks
|
||||
- Open project markdown files with inline preview
|
||||
- Browse the **Artifacts** tab for registry media registered by any agent, dashboard chat/user action, or system tool across tasks
|
||||
- Already-open global and task-detail artifact lists refresh live from the artifact registry event when an agent, dashboard chat session, user action, or system tool registers a new artifact, while preserving active search filters and task scoping
|
||||
- Use the tab-count badges to see the current counts for Project Files, Task Documents, and Artifacts; the Artifacts badge reflects the loaded `GET /api/artifacts` result set, including active search filters
|
||||
- Use the responsive media gallery to scan thumbnail-first image and video cards with consistent framing, while audio, document, and generic artifacts remain readable cards in the same grid
|
||||
- Expand image and video artifact thumbnails into a full-size lightbox; dismiss it with the close button, backdrop click, or Escape while non-previewable artifact cards keep their normal controls and links
|
||||
@@ -609,7 +610,7 @@ Features:
|
||||
- Toggle between raw text and rendered markdown using the **Markdown/Plain** button
|
||||
- Highlight text in raw or rendered project-file previews, choose **Add comment**, and send the file path, selected snippet, and your comment to the **New Task** dialog
|
||||
|
||||
Agent registrations also surface through the [Mailbox View](#mailbox-view): successful `fn_artifact_register` calls send a best-effort system inbox notification so users can discover new media even before opening the gallery.
|
||||
Agent registrations also surface through the [Mailbox View](#mailbox-view): successful `fn_artifact_register` calls send a best-effort system inbox notification so users can discover new media even before opening the gallery. Artifact list live-refresh does not depend on that best-effort message; it listens to the registry registration event.
|
||||
|
||||

|
||||
|
||||
|
||||
Reference in New Issue
Block a user