fix(console): approval timeline attachment chip shows its name and opens (#2820)#2821
Open
baozhoutao wants to merge 1 commit into
Open
fix(console): approval timeline attachment chip shows its name and opens (#2820)#2821baozhoutao wants to merge 1 commit into
baozhoutao wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…ens (#2820) A decision attachment in the approval inbox timeline rendered a nameless "附件" chip that did nothing on click. Three bugs: - No filename: the chip resolved its label from `/data/sys_file/{id}` — a system object a regular approver cannot read — and silently fell back to a generic label. The name now comes from the attachment descriptor the server returns (framework #3504), so the real filename shows for every approver. - Dead click: `openAttachment` called `window.open` after an `await`, so it was no longer a user gesture and the popup was blocked. It now opens the tab synchronously up front, then points it at the signed URL. - Wrong origin: the local adapter's signed URL is server-relative; it is now resolved against the API origin instead of the console origin. - Open failures were swallowed silently; the user now gets a toast. New `approvalsInbox.attachmentOpenFailed` string across all 10 locales. Verified end-to-end against app-showcase. Refs framework #3504. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Fixes #2820. Backend companion: objectstack-ai/objectstack#3505 (framework #3504).
Problem
A decision attachment in the approval inbox timeline (审批动态) rendered a nameless "附件" chip that did nothing when clicked, with no error feedback.
Changes (
apps/console+@object-ui/i18n)/data/sys_file/{id}— a system object a regular approver cannot read — and silently fell back to a generic label. The name now comes from the attachment descriptor the server returns (framework #3504), so the real filename shows for every approver, with nosys_fileaccess.openAttachmentcalledwindow.openafter anawait, so it was no longer a user gesture and the browser blocked the popup. It now opens the tab synchronously up front, then points it at the signed URL.approvalsInbox.attachmentOpenFailedacross all 10 locales.Testing
@object-ui/i18n: 89/89 ·apps/consoletypecheck clean.app-showcase(via the HMR console): chip showssigned-contract.pdf; clicking opens the real PDF (window.openblank → absolute signed URL); with the framework companion the download isapplication/pdfnamedsigned-contract.pdf.🤖 Generated with Claude Code