test(attachments): pin the both-dialects signed-URL readers (objectstack#3689) - #2913
Merged
Merged
Conversation
…ack#3689)
`GET /api/v1/storage/files/:fileId/url` answered a bare `{ url }` and now
answers the declared `{ success: true, data: { url } }` envelope
(objectstack#3689 — the success-path half of the #3675 error-path fix).
Both console readers of that route — `RecordAttachmentsPanel.handleDownload`
and `ApprovalsInboxPage.openAttachment` — already took either shape, which is
what lets the two repos land in any order. Nothing to fix, then; what was
missing is any statement that the tolerance is deliberate. So the panel's
download suite now drives the enveloped shape in its main case and the legacy
bare one in a dedicated case, mirroring how the same file already covers both
error dialects, and both readers say in a comment why they read two.
No behaviour change.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
The console half of objectstack#3689 — the success-path twin of the error-path fix in objectstack#3675 / objectui#2869.
What changed upstream
GET /api/v1/storage/files/:fileId/urlanswered a bare{ url }and now answers the declared{ success: true, data: { url } }envelope. It was the one storage success body carrying no envelope at all, against astorage.zod.tsschema that declared one.Why this PR is tests and comments only
Both console readers of that route already took either shape:
packages/app-shell/src/views/RecordAttachmentsPanel.tsx—body?.url ?? body?.data?.urlapps/console/src/pages/system/ApprovalsInboxPage.tsx—body?.data?.url ?? body?.urlThat tolerance is what lets the two repos land in any order, and it is exactly the posture objectui#2869 took for the error path. So there is nothing to fix here — what was missing is any statement that reading two dialects is deliberate rather than incidental, and anything holding it in place.
Changes
RecordAttachmentsPanel.test.tsx— the main download case now drives the enveloped shape (what the server sends as of #3689); a new dedicated case drives the legacy bare{ url }(what an older server still sends). This mirrors how the same file already covers both error dialects, including its existing legacy-codecase.No behaviour change.
RecordAttachmentsPanel.test.tsx8/8 green.Generated by Claude Code