Conversation
…mpty data
An artifact call is a single `return await tools.…`, so a code-mode
`{ ok: false, error }` value is the call's failure, not a value to branch
on. The shell proxy passed it through as query data, which settled the
query as success with no `.data` — every artifact then coerced it to an
empty list, so a deleted or renamed binding read as "0 results, synced
just now" instead of an error.
Detect the failure envelope after unwrapping and throw, so the query
rejects and the component renders ArtifactError.
Contributor
Author
|
CI failure seems to be an issue with wrangler startup race, should be unrelated to this change |
This branch has not been deployed
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
when an artifact tool call returns
{ ok: false, error }, the shell passes it through as query data. generated artifacts then coerce the missing.datato an empty list, so a broken binding looks like a freshly synced empty result.this change rejects the failed tool result after unwrapping
execute-action, so TanStack exposesquery.errorand the artifact renders its error state.before
after
Linked issue
no issue open yet, will open one if preferred
Verification
bun run format:checkbun run lintbun run typecheckTURBO_TEST_CONCURRENCY=2 bun run test— 39/39 tasks passedArtifacts · a failed tool call shows an error instead of empty data— before recording · after recordingChecklist
bun run changeset), or this change needs none.