feat(server): expose composable Linear file uploads - #310
Merged
Merged
Conversation
siisee11
enabled auto-merge (squash)
July 14, 2026 05:07
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
onequery-landing | 3e7abfd | Commit Preview URL Branch Preview URL |
Jul 14 2026, 05:08 AM |
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.
One-Line Summary
Agents can upload any local file to Linear and reuse the returned asset URL in existing issue or comment operations.
User-Facing Changes
create_comment_with_imageoperation with a composableupload_fileoperation.Content-TypeandX-OneQuery-File-Name, including non-image files such as PDFs.assetUrl, which can be embedded in Markdown passed tocreate_commentorcreate_issue.Why This Changed
create_comment_with_imagewas a Velen-specific convenience API, not an operation provided by Linear. It coupled file upload to one comment workflow and made agents believe image attachment was unavailable whenever onlycreate_commentwas considered. Linear's official API instead exposesfileUpload, followed by a presigned PUT, and expects the resulting asset URL to be used in Markdown.How It Changed
upload_fileto the read-write Linear source API descriptor and removescreate_comment_with_image.fileUploadGraphQL mutation, uploads the binary to the returned presigned URL, and exposes only the resultingassetUrland success state.create_commentunchanged so callers can compose the returned URL into image or file Markdown themselves.linear.v3and narrows upload headers to filename and content type.Bug Fixes
upload_filenow exposes the same official Linear flow independently of comment creation.Extra Context / Decisions (Optional)
The response intentionally omits the temporary presigned upload URL and provider headers after the PUT completes. Callers receive the stable Linear asset URL needed for subsequent Markdown.
Verification
bunx oxfmt --check packages/server/src/source-api/adapters/linear.ts packages/server/src/source-api/adapters/linear.test.tsbunx oxlint packages/server/src/source-api/adapters/linear.ts packages/server/src/source-api/adapters/linear.test.tsbunx vitest run packages/server/src/source-api/adapters/linear.test.ts(13 tests, including PDF normalization, presigned upload success, and upload failure)bun run --filter @onequery/server typecheckbun run buildbun run testVideo / Screenshot (Optional)