Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

finding(record-page): 「客户更新成功」成功提示常驻不自动消失,且盖住助手侧栏的发送按钮 #7482

Closed

Description

@hotlong

观察(2026-09-03 重新验证,objectui 0246d11)

在记录抽屉里点「编辑」→ 改状态 → 「更新」,右下角弹出 ✅「客户更新成功」。这条成功提示 90 秒后仍在(截图连续三次都在),位置正好盖在右侧助手侧栏输入框的发送按钮上;只有手动点 × 才消失。

期望

成功类 toast 3–5 秒自动消失(错误类可常驻);toast 层级/位置避开助手侧栏的输入区。

Re-check:任意对象记录页编辑保存,计时看 toast 是否自动消失。

Generated by Claude Code

Activity

  1. added
    bugSomething isn't working
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    on Sep 5, 2026
  2. os-zhuang commented on Sep 5, 2026

    @os-zhuang
    Contributor

    分诊 — domain:ui / priority:p2 / pm:queue / bug / finding

    锚定 (anchoring):toast 的挂载与配置在 packages/app-shell/src/chrome/ConsoleToaster.tsx + packages/components/src/ui/sonner.tsx ⇒ domain:ui。


    ⚠️ 重要:卡片给的"期望"描述的是本该已经发生的行为 —— 所以显而易见的修法修不好它

    自然的假设是"success toast 没设 duration,所以常驻"。这个假设是错的,我在 origin/main a472b07 上测了两侧:

    ① 调用侧几乎都不传 duration —— 这一半符合直觉:

    toast.success 全仓命中:109 处
    其中带 duration 的行:  2 处
    

    ② 但两个 Toaster 都没有把默认 duration 改成 Infinity —— 这一半推翻了假设:

    packages/app-shell/src/chrome/ConsoleToaster.tsx:16   export function ConsoleToaster(props: ToasterProps) {
    packages/app-shell/src/chrome/ConsoleToaster.tsx:22       theme={theme as ToasterProps['theme']}
    apps/console/src/App.tsx:151                          <ConsoleToaster position="bottom-right" />
    
    packages/components/src/ui/sonner.tsx                  <Sonner theme={…} className="toaster group" icons={{…}} toastOptions={{ classNames: {…} }} />
    

    两处的 toastOptions 里都只有 classNames,没有 duration。 而 sonner 自己的默认就是 4 秒。

    ⇒ 一个普通的 toast.success('客户更新成功') 按理应当 4 秒后自动消失。 卡片实测它 90 秒后仍在(连续三次截图)。

    所以症状与配置不符,成因是第三件事。 ⛔ 接手者若照卡片的"期望"去给 success toast 加 duration: 4000,很可能改完症状照旧 —— 因为它现在已经是 4000 了。

    ⭐ 一条值得先查的假设(⛔ 未验证,仅供起点)

    同一批里 #7345 / PR #7342 给表单结果 toast 引入了共享 id:

    packages/plugin-form/src/MasterDetailForm.tsx:741   const outcomeToastId = `form-outcome:${formInstanceId}`;
    packages/components/src/renderers/form/form.tsx:1155   const outcomeToastId = `form-outcome:${formInstanceId}`;
    

    sonner 对带 id 的 toast 重复调用是"更新"而非"新建",并会重置它的计时器。若记录抽屉保存后有任何东西在重渲染循环里反复调用同一个 id 的 toast.success,计时器就永远重置 —— 表现正是"常驻"。⛔ 这是假设不是结论;接手者请先在 rig 上看那条 toast 是一次调用后不消失还是被反复重发。


    定级理由 —— priority:p2

    卡片报告的是两个缺陷叠在一起,第二个才是升级理由:

    1. 成功提示不自动消失(≥90 秒,需手动点 ×)。
    2. ⭐ 它的位置正好盖住助手侧栏输入框的发送按钮。

    第 2 条把它从"烦人"变成阻塞:用户保存一条记录后,助手侧栏就发不出消息,直到他意识到要去关掉一个跟助手无关的提示。这是功能被遮挡,不只是视觉噪音。

    不上 p1:有明确的手动出路(点 ×),无数据损坏、无错误信息、无安全面。


    ⛔ 给执行席的边界

    1. 先判成因,再动手(见上)。⛔ 不要以"给 success toast 加 duration"开局 —— 已经有了。
    2. 两个缺陷分开修,别混。 卡片自己就是分开写的:
      • 消失:成因待查(上面那条假设)。
      • 遮挡:apps/console/src/App.tsx:151 的 position="bottom-right" 与助手侧栏的输入区在同一个角。⚠️ 这一半与 duration 无关 —— 即使 toast 4 秒消失,那 4 秒里发送按钮仍然被盖住。⭐ 所以遮挡是独立的、可以先修的一半,且它不需要先解开成因谜题。
    3. 卡片对分级的建议是对的,请保留:"成功类 toast 3–5 秒自动消失(错误类可常驻)"。⛔ 不要一刀切给所有 toast 设短 duration —— 错误信息被 4 秒吞掉比常驻更糟。
    4. ⚠️ 修"遮挡"时注意别把 toast 挪到会盖住别的东西的地方。助手侧栏是右侧固定面板,所以 bottom-right 与它天然冲突;候选是让 toast 在侧栏打开时偏移,或改到 bottom-center。⛔ 这是设计判断,请给出取舍而不是随手换一个方位。
    5. 复现照卡片给的路径:任意对象记录页编辑保存,计时看 toast;⭐ 并同时打开助手侧栏,否则看不到第 2 个缺陷。

    ⛔ 分诊席不认领、不派单、不写码。


    Generated by Claude Code

  3. hotlong commented on Sep 5, 2026

    @hotlong
    ContributorAuthor

    Addressed in draft PR #7710 (batched with cloud#1984 and the other v1 UI fragments); the os-dev report for the batch is on cloud#1984. Note: cloud needs a .objectui-sha bump before this reaches the cloud product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpm:queuepriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions