Repository navigation
[decision] Every third-party host still has the upload defect objectui#10131 repaired — neither DefaultAppContent nor ConnectedShell mounts an UploadProvider, and useUpload fails OPEN to a local object URL #10168
Description
Activity
objectstack-fleet commented
on Sep 24, 2026 ContributorMore actions分诊首次定级:
priority:p2·bug·domain:ui·needs-user-decision—— 第三方宿主里上传文件会"假成功";怎么修是已发布包的契约问题,进维护者决策箱Path:
packages/providers/src/UploadProvider.tsx(useUpload的无 provider 回退createObjectUrlAdapter)+packages/app-shell的DefaultAppContent/ConnectedShell(均不挂UploadProvider)Triage: lands in
@object-ui/providers+@object-ui/app-shell⇒domain:ui,bug,priority:p2,needs-user-decision; rationale: measured — outside the console no shell mounts anUploadProvider, anduseUploadthen falls back to a tab-lifetimeblob:URL that the widget reports as a successful upload, so a third-party host's file is "saved" as a link that dies with the tab; the repair changes the documented behaviour of a published hook and whatapp-shellis responsible for, which is a contract choice, not an execution detail.分诊席(
session_01Tw7jnJinGHvoGSi8aFkhPJ,objectstack 座位贴 #6015),2026-09-24T16:02Z。⛔ 不认领、不派发。本席读完了卡面(本卡尚无评论),并在 objectuimain(06b82b8)上核对。本席实测
useUpload():没有 provider 时返回createObjectUrlAdapter()的上传函数;该文件头注释写明这是有意保留的"legacy blob: URL 行为,让字段控件在没有 provider 时也能用"。app-shell导出的DefaultAppContent(即AppContent)与ConnectedShell都不挂UploadProvider;控制台自己在apps/console/src/App.tsx的路由外层挂了一个(PR fix(console): mint a sys_file id for files picked in the global action dialogs #10165 把它挪到了正确的位置)。- ⭐
app-shell自己已经在用 ObjectStack 的上传目的地:RecordAttachmentsPanel直接构造createObjectStackUploadAdapter。⇒ 这个壳并非对"文件存哪"毫无立场。 - objectui ADR-0059 第 4 条:「
UploadProvider… come from the host view」—— 规定由宿主提供,但没有规定宿主没提供时应当怎样。
维护者速读
第三方用
@object-ui/app-shell搭自己的页面时,动作参数对话框和弹窗表单里的文件上传会显示"上传成功",但文件其实没有离开浏览器,存下的是一个关掉标签页就失效的临时链接。控制台已修,第三方宿主没修。要决定的是:没配置上传目的地时,平台该怎么做。- A:只改回退 —— 没有 provider 时上传直接报错("未配置上传目的地"),宿主必须自己挂。代价:所有依赖旧回退的宿主、示例和测试都要显式挂 provider。
- B:只改壳 ——
DefaultAppContent/ConnectedShell默认挂 ObjectStack 上传适配器(可覆盖)。代价:用了壳的宿主修好了,绕开壳直接用字段控件的宿主仍然假成功。 - C(推荐):A + B —— 壳默认挂 ObjectStack 适配器、宿主可覆盖;壳之外没有 provider 时报错;
createObjectUrlAdapter保留为显式选项(示例、测试)。
请裁一个字母:A / B / C。
os-decision-facets
- ① 项目长远合理性:C 让"用了壳就能正确上传、没配置就响亮失败"成为唯一行为;A、B 各留一条静默或半静默的路。
- ② 实际业务拉动:有实测 —— 控制台已经因为同一个回退出过一次真实缺陷(The console file widget never uploads: it posts a browser blob object where the engine's
filefield wants asys_fileid string —400 expected string, received object#10131);DefaultAppContent的文档注释把第三方宿主指向它。⛔ 没有统计过现有第三方宿主的数量。 - ③ 防 AI 犯错:AI 搭宿主时不会知道要挂一个没人提到的 provider;A、C 把这个遗漏从"静默丢文件"变成"当场报错"。
- ④ 创业阶段不扩散:B、C 不新增任何声明,只让壳使用它自己已经在用的上传目的地;A 需要一次破坏性变更的 changeset。
Prior rulings read: UploadProvider,upload destination,useUpload,createObjectUrlAdapter → objectstack 0 hits; objectui ADR-0059 §4 (the host supplies
UploadProvider; silent on the no-provider case)推荐:C。 置信缺口:⛔ 不知道外部有多少宿主依赖 blob 回退;⛔ 本席没有在浏览器里复现第三方宿主的路径(读数来自源码和 PR #10165 的已验收结论)。
Generated by Claude Code
- addedbugSomething isn't workingSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatobjectui ui stream: fix lands on the published library or apps — objectui execution seat
on Sep 24, 2026 objectstack-fleet commented
on Sep 24, 2026 ContributorMore actions分诊:关闭(not planned)—— 维护者:第三方用
app-shell外壳搭页面的场景「暂时不考虑」分诊席(
session_01Tw7jnJinGHvoGSi8aFkhPJ,objectstack 座位贴 #6015),2026-09-24T17:08Z。本卡在首次定级时被放进维护者决策箱(A 只改回退 / B 只改壳 / C 两者都做)。维护者答:「10168 第三方用我们的外壳(app-shell)搭页面时,暂时不考虑这个需求。」为什么是关闭而不是挂起
- 维护者的答复是"这个场景暂不考虑",不是在 A/B/C 之间选一个。⇒ 三个选项都不执行。
- 状态规则:
pm:on-hold只在有可自动检测的重启条件时才合法;"有第三方宿主要用"是一个业务事件,⛔ 没有任何机制能唤醒它 ⇒ 按规则关not_planned,重开不花成本。 - 控制台本身不受影响:它自己的
UploadProvider已由 PR fix(console): mint a sys_file id for files picked in the global action dialogs #10165 挂在正确位置。
本卡测得、关闭后仍然成立的事实(留给重开的人)
useUpload()没有 provider 时回退到createObjectUrlAdapter(),上传被报告为成功,存下的是关掉标签页就失效的blob:链接。DefaultAppContent(即AppContent)与ConnectedShell都不挂UploadProvider;app-shell自己的RecordAttachmentsPanel已经在用createObjectStackUploadAdapter。- objectui ADR-0059 第 4 条规定由宿主提供
UploadProvider,但没有规定宿主没提供时怎么办。
什么情况下重开
有真实的第三方宿主(不是 objectui 控制台)用
@object-ui/app-shell搭页面并需要上传文件;或者有用户报告"上传显示成功、刷新后文件没了"。重开时直接拿本卡的 A/B/C 给维护者裁。
Generated by Claude Code
Filed by the⚠️ Cited by content, not by line address (AGENTS.md #11).
domain:uiexecution seat (Seat: domain:ui#2, sessionsession_018HrVaotisyhgmot9o2MLRq) while accepting PR objectui#10165 for objectui#10131. ⛔ Filed bare:domain:*,priority:*andtypeare triage's production.The finding — ⭐ this is the SCOPE LIMIT of a fix that just landed, stated so nobody assumes it is closed
PR objectui#10165 repaired a real defect: the console's
UploadProviderwas mounted inside a route element, while the action-param dialog and the modal form a modal action opens are rendered as siblings of that route element. Those dialogs therefore sat outside the provider,useUpload()failed open to a local object-URL adapter, and the file control reported a successful upload while no request ever left the browser.⛔ That fix moved one mount point in
apps/consoleand reaches nothing else.AppContent's own docstring points third-party hosts atDefaultAppContent, and ⛔ neitherDefaultAppContentnorConnectedShellmounts anUploadProvider— so every third-party host still has the defect, in the same dialogs, with the same silent object-URL fallback.Whether
@object-ui/app-shellshould carry a default upload destination is a design decision about a published package's responsibilities, ⛔ not a bug to patch. Copying the console's mount into the shell would make the shell opinionated about where files go; leaving it means every host must know to mount a provider that nothing tells them about.⭐ And the reason the whole family is silent is one line of already-published behaviour:
useUploadfalls back tocreateObjectUrlAdapter()when no provider is present — so a deployment with no upload destination configured at all is reported to the widget as a successful upload. Making that observable is a contract change to a published hook with live callers, so it belongs to that contract's owner. ⛔ This card does not decide it; it is the card that has to answer it, because the third-party-host question cannot be settled without saying what a host with no destination should see.Dedupe words
DefaultAppContent UploadProvider third-party host·ConnectedShell upload destination·useUpload fail-open object URL adapter·app-shell default upload destination contract·objectui#10131 scope limitGenerated by Claude Code