fix(artifacts): surface workspace-shell artifacts in the Artifacts tab #48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/workspace-artifacts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A workspace-level session could register artifacts (
notify-artifactreturned working "Open" links, and they opened fine), but the Artifacts tab showed "Artifacts only available for session scopes (not workspace)."The inconsistency was frontend-only. The backend already treats the workspace shell as a first-class artifact host:
sessionsrow (kind='workspace_shell'), so it has asessionId.notify-artifactposts that id to/api/agent/artifacts, which resolves the session regardless of kind and stores the artifact against it./sessions/<id>/artifacts/<id>) — the "Open" link — works for any session id.But the Artifacts tab in
MainSplit.sveltegated onscope.kind === 'session', and the workspace scope carries nosessionId, so it fell through to the placeholder despite the artifacts existing and being reachable by direct link.Fix
nexus/src/lib/components/main-page/MainSplit.svelte:api.listSessions, re-run ontick) when the scope is a workspace;nullwhen no shell is open.artifactsSessionIdderived value and renderArtifactsPanelwhenever it's present,{#key}'d on the id so a shell close→reopen (new row) remounts cleanly.Verification
pnpm typecheck— 0 errorspnpm lint— cleanpnpm test— 558 passingNote
Because closing the workspace shell hard-deletes its session row, its artifacts are cascade-deleted (
ON DELETE CASCADEonartifacts.session_id). So workspace-shell artifacts are only visible while the shell is open. Decoupling artifact lifetime from the shell session row would be a separate, larger change.https://claude.ai/code/session_01HFprh3t4G7vTWfuW6GaZLJ
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.