ship artifact v1 file viewing with ranked open actions#63
Merged
tulsi-builder merged 8 commits intomainfrom Apr 1, 2026
Merged
ship artifact v1 file viewing with ranked open actions#63tulsi-builder merged 8 commits intomainfrom
tulsi-builder merged 8 commits intomainfrom
Conversation
e2ec2fb to
94afc72
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2ec2fbfb0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This was referenced Apr 1, 2026
wesbillman
approved these changes
Apr 1, 2026
tellaho
added a commit
to tellaho/goose2
that referenced
this pull request
Apr 2, 2026
Merges 7 commits from main into tho/boss-ui: - Image paste support in chat input (block#68) - Tab name text unselectable (block#67) - Chat title immediate update on send (block#66) - Artifact v1 file viewing (block#63) - Cmd+W tab close (block#64) - Chat activity/unread state tracking (block#62) - Sidebar hierarchy polish + faster reloads (block#61) Key conflict resolutions: - Keep Tailwind v4 CSS-based config (delete tailwind.config.js) - Keep boss-ui dialog.tsx, add showCloseButton prop from main - Add text-foreground-subtle token to boss-ui theme system - Keep ToolCallAdapter (boss-ui), adopt ToolChainCards pattern from main - Delete MarkdownContent/ToolCallCard (replaced by boss-ui ai-elements) - Adopt SessionActivityIndicator from main into sidebar - Adopt ClickableImage/ImageLightbox from main - Merge drag-and-drop image support into ChatInput - Keep boss-ui hover:bg-accent/50 treatment throughout sidebar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
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.
Overview
Category:
new-featureUser Impact: Users can open agent-produced files directly from chat, with one clear primary output and safer handling of local paths.
Problem: Artifact outputs were hard to follow in chat because file paths were inconsistently persisted, local-path opening had permission/scope gaps, and many low-signal tool steps buried the most important output action.
Solution: This PR ships a stateless Artifact V1 flow: backend persistence + default artifacts root, shared path/ranking policy, context-owned resolution, markdown/local link routing, and UI prioritization that surfaces one primary
Open fileaction per assistant message while collapsing noisy internal steps.Changes
File changes
artifact-v1-debug-retro-2026-04-01.md
Adds a rollout/debug retrospective documenting observed issues, fixes, and follow-up testing ideas. This captures implementation learnings so subsequent artifact iterations can validate the right edge cases.
src-tauri/capabilities/default.json
Adds explicit
opener:allow-open-pathpermissions for home and artifacts paths used by Artifact V1 open actions.src-tauri/gen/schemas/capabilities.json
Regenerates capability schema output so runtime permissions and generated schema remain aligned.
src-tauri/src/commands/acp.rs
Introduces deterministic default artifact working directory selection and ensures that directory exists before running ACP prompts. This makes no-project chats write to a predictable artifact root.
src-tauri/src/services/acp/mod.rs
Aligns timestamp precision for persisted messages to improve ordering consistency.
src-tauri/src/services/acp/writer.rs
Persists structured assistant content (including tool requests/responses) rather than only flattened text, enabling artifact path recovery after reload and supporting richer UI behavior.
src/features/chat/hooks/ArtifactPolicyContext.tsx
Adds context-owned artifact indexing and display resolution APIs used by chat surfaces. This keeps ranking/ownership logic out of shared bubble rendering code.
src/features/chat/hooks/tests/ArtifactPolicyContext.test.tsx
Covers message-level primary ownership and args-object mapping to tool calls, protecting context-driven artifact rendering behavior.
src/features/chat/lib/tests/artifactPathPolicy.test.ts
Adds policy regression tests for ranking precedence, boosts, dedupe behavior, and root scope allow/block outcomes.
src/features/chat/lib/artifactPathPolicy.ts
Implements message-level ranking/aggregation and tool-call ownership maps that produce one primary candidate plus secondary outputs.
src/features/chat/lib/artifactPathPolicyCore.ts
Introduces core path extraction, normalization, local href resolution, scope checks, and scoring primitives for artifact candidate evaluation.
src/features/chat/ui/ChatView.tsx
Wires
ArtifactPolicyProviderinto the chat tree and derives allowed roots from project working dirs plus~/.goose/artifacts.src/features/chat/ui/MarkdownContent.tsx
Routes local markdown links through artifact policy resolution/open helpers while preserving normal external link behavior.
src/features/chat/ui/MessageBubble.tsx
Collapses low-signal internal tool steps behind an explicit toggle so primary actions remain visible and the timeline is easier to scan.
src/features/chat/ui/ToolCallCard.tsx
Renders a prominent primary artifact action and collapses non-primary candidates under
More outputs (N), including blocked-state/error messaging.src/features/chat/ui/tests/MarkdownContent.test.tsx
Adds tests for allowed local open, blocked local path behavior, and unchanged external-link handling.
src/features/chat/ui/tests/MessageBubble.test.tsx
Adds coverage for internal-step collapse/toggle behavior in tool-call chains.
src/features/chat/ui/tests/ToolCallCard.test.tsx
Validates primary-host rendering, secondary collapse behavior, and blocked candidate interaction semantics.
src/test/setup.ts
Adds a resilient in-memory
localStoragefallback with a complete Storage API so test runs remain stable in this environment.Reproduction Steps
Open fileaction appears for the message and additional outputs are underMore outputs (N).pnpm test,pnpm check, andpnpm buildand confirm all pass.Screenshots/Demos