Skip to content

feat: add status field to RequestUploadUrlPayload#1034

Merged
pyramation merged 3 commits intomainfrom
feat/upload-dedup-status
Apr 29, 2026
Merged

feat: add status field to RequestUploadUrlPayload#1034
pyramation merged 3 commits intomainfrom
feat/upload-dedup-status

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented Apr 28, 2026

Summary

Adds a status field to RequestUploadUrlPayload so clients know immediately whether a file is usable after deduplication.

  • Deduplicated file: status returns the actual value from the DB ('ready' or 'processed')
  • Fresh upload: status returns 'pending'

Changes span the Graphile plugin (plugin.ts, types.ts), upload-client (types.ts, queries.ts, upload.ts), and both snapshot files (graphile-test, server-test).

The upload-client previously hardcoded status: 'ready' for dedup cases — now it correctly passes through the server's response.

Review & Testing Checklist for Human

  • Verify the status field appears correctly in GraphQL playground/explorer
  • Test dedup flow: upload same file twice, confirm second returns status: 'ready' (not 'pending')
  • Verify uploadFile() from @constructive-io/upload-client returns correct status for both fresh and dedup cases

Notes

  • Fixed missing server-test schema snapshot that caused the initial CI failure
    "

Link to Devin session: https://app.devin.ai/sessions/58b40b3f63804c20b86643cc873ba844
Requested by: @pyramation

Return the file status in requestUploadUrl responses so clients can
immediately determine whether a deduplicated file is usable:
- deduplicated files: status is 'ready' or 'processed' (from DB)
- fresh uploads: status is 'pending' (awaiting PUT + confirmUpload)

Changes:
- graphile-presigned-url-plugin: add status to GraphQL schema, TS type,
  and both dedup/fresh return paths
- upload-client: add status to query string, types, and use server value
  instead of hard-coding 'ready' for dedup
- Tests: update all mock fixtures and add status assertions
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit 51245d7 into main Apr 29, 2026
52 checks passed
@pyramation pyramation deleted the feat/upload-dedup-status branch April 29, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant