Repository navigation
feat(artifacts): open artifacts in a dedicated minimal-permission window - #255
Merged
Merged
Conversation
- build an initialization script that embeds the validated payload as JSON and parses it with JSON.parse - open or focus an artifact-* WebView loading artifact.html - expose open_artifact_window and add artifact retrieval to the repository and service - cover payload escaping and artifact lookup in tests
- add the artifact.html entry and window component, bundled separately from the app shell - add an Open in window action with error feedback - build both entries through Vite multi-page input - test the window component, page action, and updated flows
- describe the dedicated artifact entry, payload injection, and core:default capability - note the residual app-command ACL limitation - mark temporary window creation and permission isolation on the roadmap
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
Adds the second half of M3: artifacts can open in their own WebView.
open_artifact_windowcommand (registered inlib.rs) fetches the stored artifact viaArtifactService::getand opens or focuses a window labeledartifact-<id>loadingartifact.html.JSON.parse; the escaping is unit-tested.artifact.html/src/artifact-main.tsxare a separate Vite multi-page entry. The built artifact chunk is ~1 KB and does not importdesktopApior app-shell code.capabilities/artifact-window.jsongrants onlycore:defaulttoartifact-*windows.Security notes
docs/ARTIFACT_SYSTEM.md): Tauri application commands are not ACL-gated per window in this setup, so isolation relies on the dedicated entry having no privileged code paths plus the minimal capability set.Test plan
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --workspace— artifact window escaping and artifact lookup testspnpm typecheckeslinton changed filesnode node_modules/vitest/vitest.mjs run --pool=forks— 14 files, 59 testspnpm build— emitsdist/artifact.htmlandassets/artifact-*.jsNot manually exercised in the desktop shell; the window itself requires a running Tauri app.