refactor: remove preview_url artifact kind, derive preview URLs#19
Open
drepkovsky wants to merge 2 commits intomainfrom
Open
refactor: remove preview_url artifact kind, derive preview URLs#19drepkovsky wants to merge 2 commits intomainfrom
drepkovsky wants to merge 2 commits intomainfrom
Conversation
…preview_file artifacts
preview_url artifacts were redundant derived data — the URL is just
`/api/previews/{runId}/{entry}` and can be computed from preview_file
artifacts. This cleanup:
- Removes preview_url from ArtifactKindSchema and all consumers
- Stops auto-creating preview_url artifacts in run completion and
ad-hoc artifact creation endpoints
- Adds ArtifactService.resolvePreviewUrl() helper that derives the URL
from preview_file artifacts
- Updates notification, task-progress, and query-response bridges to
use the helper instead of artifact lookup
- Updates CLI inbox to derive preview URLs client-side
- Hides preview_file and implementation_prompt from FE artifact list
(internal/infrastructure artifacts not useful to users)
- Adds dedicated Preview button on run cards in task detail
- Worker collectPreviewFiles() now only collects browser-renderable
files (HTML, CSS, JS, images, fonts) instead of all changed text files
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.
Summary
preview_urlas an artifact kind — it was 100% derived data (/api/previews/{runId}/{entry}) that duplicated whatpreview_fileartifacts already provideArtifactService.resolvePreviewUrl()helper that derives the preview URL frompreview_fileartifacts, used by all bridges and CLIcollectPreviewFiles()now only collects browser-renderable files (HTML, CSS, JS, images, fonts, JSON, WASM) — no more "hluche" previews of raw.ts/.mdsource filespreview_file,implementation_prompt) and shows a dedicated Preview button on run cards insteadWhat changed
Backend (orchestrator)
ArtifactKindSchemano longer includespreview_urlpreview_urlartifactsresolvePreviewUrl()onArtifactServicederives URL frompreview_filepresenceWorker
collectPreviewFiles()filters byPREVIEWABLE_EXTENSIONSset instead of accepting all text filesFrontend
preview_fileandimplementation_promptfiltered from artifact list (internal artifacts)preview_fileartifacts existpreview_urlfrom FE types and localesCLI
inboxcommand derives preview URLs frompreview_fileartifacts instead of looking uppreview_urlTest plan
packages/spec— 85 pass, 0 failpackages/workerpreview tests — 14 pass, 0 failpackages/orchestratorpreviews + artifacts — 31 pass, 0 failpackages/orchestratorbridge-integration — 33 pass, 0 failpackages/orchestratorstep-io — 11 pass, 0 fail/api/previews/{runId}/still works🤖 Generated with Claude Code