Skip to content

爱生活的配置面板显示更新能力没接上(面板连不上总管插件) #982

Closed

Description

@FeatherHunter

真值来源(判据从哪儿读出来)

  • 外部读数 1:用户在「爱生活的配置面板」看到的红色文字(面板原文逐字抄录,见「实际」一节)。
  • 外部读数 2:DSH 日志里搜 [dsh-life-pack] 的报错行。判这个缺陷真假就看这两处读数,不看推测。

实际(看到什么)

爱生活的配置面板出现如下红色文字:

更新能力没接上:面板连不上总管插件(宿主里没注册,或版本对不上)。重启 DSH 后重试;仍不行就在 DSH 日志里找 `[dsh-life-pack]` 的报错。

影响范围:配置面板的更新能力不可用;面板明确提示连不上总管插件,疑似宿主里没注册,或版本对不上。

期望

配置面板能连上总管插件,不出现上述红色文字;若确实连不上,日志里应有 [dsh-life-pack] 前缀的可定位报错。

复现步骤

  1. 重启 DSH。
  2. 打开爱生活的配置面板。
  3. 观察面板是否仍出现上述红色文字。
  4. 若仍出现,在 DSH 日志里搜索 [dsh-life-pack],记录报错行。

复现命令与读数:

  • 复现动作:重启 DSH 后打开配置面板(图形操作,无命令)。
  • 判定读数 A:面板红色文字是否存在(存在为红,不存在为绿)。
  • 判定读数 B:[dsh-life-pack] 日志行(有报错为红,可定位后转绿)。

诊断线索(面板自带)

  • 重启 DSH 后重试。
  • 仍不行就在 DSH 日志里找 [dsh-life-pack] 的报错。
  • 本票尚未经过诊断,按规则带 needs-triage,等待维护者评估后摘掉。

开票前三问自检(编排纪律第十条)

  1. 能复现吗:能。复现动作与读数见上一节,读数是面板红色文字与日志 [dsh-life-pack] 行。
  2. 有现存票或地图可认领吗:没有。已用 更新能力/总管插件/dsh-life-pack/配置面板/连不上总管 在全部票里检索,无命中,故另起新票。
  3. 是已承诺的目标吗:是。配置面板连上总管插件属于已承诺的可用功能,当前面板自报没接上,属于缺陷,不是想法与改进。

备注

  • 本仓用远端后端,按原生标签方式打标签(bug+needs-triage),正文不再加 Labels: 行。
  • 用词按 docs/agents/wording.md:命令、页面交付等用规范词。

This was generated by AI during triage.

诊断真实状态(triage,2026-09-28,只诊断不修复,未改业务代码、未关闭、未开始实施)

  • 阶段:带 needs-triage,无评论、无认领、无实施记录 → 按“未动工 → 正常诊断”走;代码链路已核验,真机日志读数还没拿到。
  • 现象:红字是代码按原样印的:packages/plugin-manager/src/update-panel.ts:494 在 loadError 非空时印 '更新能力没接上:' + loadError,本票这一句的后半段就是 packages/plugin-manager/src/update-contract.ts:103 的 manager-unreachable 文案。触发点是面板挂载时取七个更新目标的表失败(useUpdateRows.reload → loadTargets,update-panel.ts:282-294),传输层抛错时统一落进该原因码(update-client.ts:59-68)。
  • 影响范围:更新面不可用(目标表为空,检查与安装都无从谈起);爱生活页签条、技能设置页投影、体检汇总是独立渲染的(client.ts:419 之后仍继续画),不受这行红字直接阻断。
  • 复现:最小复现为“重启 DSH → 打开爱生活卡 → 看更新区是否仍是这行红字”。代码侧已确认链路存在;真机复现与日志确认待报告人补读数。
  • 根因候选:
    • R1 宿主半没注册 /api/ilife-manager(总管 host 没装配/被禁用/旧版本无该路由,注册见 index.ts:41-73):高。
    • R2 面板与宿主版本对不上(通道名、端点名、电话名对不上即抛错,update-contract.ts:22-40 记过两次传错第一段就 404 的事故):中高。
    • R3 同一使用范围里多份 dsh-life-pack 抢注册,新实例退让(index.ts:76-78 的 already registered ... yielding),留下旧实例服务:中低。
    • 已排除:connection.rpc.call 缺席走的是 internal(update-client.ts:60),文案是另一句,不是本票这一句;技能/公共层版本落后、使用范围里那条 base-link-core 直依赖走的是别的面板位置,也不产生这一句。
  • 冗余与既往拒绝:按领域概念检索只有一处定义,无第二份已实现;.out-of-scope/ 为空,无近似拒绝项。故不是 wontfix。
  • 分流:本轮落到 needs-info(bug 保留,摘 needs-triage)。理由:R1/R2 在没有日志与版本读数时无法落点,不满足 ready-for-agent 的充分指定;也不属于人专属实现或不做。拿到读数后直接转 ready-for-agent(附对应分支的待确认事项,不阻塞)。

❓ Q1:能否贴出 DSH 日志里 [dsh-life-pack] 的报错行(重启后复现一次,搜关键字,贴命中行前后各约 20 行,注意脱敏)?
➡️ 推荐答案:贴出。若指向未注册/路由缺失,就执行 needs-info → ready-for-agent(分支:宿主装配链路,含复现与日志读数);若指向版本对不上/电话名对不上,就执行 needs-info → ready-for-agent(分支:版本对齐/握手,含两端版本号)。等回复,不猜着转。

❓ Q2:能否给出真机读数:DSH 版本、总管已装版本(面板胶囊 dsh-life-pack · x.y.z 或 node_modules/dsh-life-pack/package.json 的 version)、使用范围 package.json 的 dependencies(确认是否装了多份总管)、是否已按提示重启重试?
➡️ 推荐答案:给出。若确认只有一份总管且版本一致仍复现,就执行 needs-info → ready-for-agent(分支:注册失败的定位与修复,附启动日志);若发现多份或版本错位,就执行 needs-info → ready-for-agent(分支:对齐版本后复验)。等回复,不猜着转。

当前终态(2026-09-28 第二轮):报告人回了——web profile、非必现、偶尔进配置面板时看到;Q2 确认为本机 0.3.16 重启后。结合本机实测(清单与磁盘七家全 0.3.16,可读文件日志里零 [dsh-life-pack] 行),版本错位基本排除,指向挂载时序问题:更新目标表只在挂载时取一次、无重试(隔壁版本胶囊 #937 修过同样毛病,已是 1s/3s/8s 三次退避),偶尔第一次调用时宿主路由还没就绪,红字就粘住整个会话;且传输层细节被丢掉,只剩人话一句,所以面板教人找的日志行根本不存在。已转 ready-for-agent(附 Agent Brief,不阻塞的待确认事项见 Brief 末尾)。


实施记录(implement,2026-09-28,已认领实施;未关票,待真机偶现验证)

  • 提交:da8f83ef(修复)+ 0f2c4d9a(双轴评审追修)。只收自己 5 个件(update-client.ts/update-contract.ts/update-panel.ts/update-view.ts/update-retry-982.test.mjs),他人改动未碰。
  • 根因(已定位再下手):更新目标表挂载时单次取数、无重试——偶尔首次传输失败(宿主路由尚未就绪),错误态常驻整个会话。修对地方:只动取数路径,原因句式、宿主注册、页签/体检/安装流程均未碰。
  • 改动:update-contract.ts 加共享退避表 LOAD_RETRY_MS(与版本读取重试同形);update-client.ts 的 loadTargets 加可选重试口(缺省单次,旧行为有测试锁定);update-panel.ts 挂载那一次才重试、装后重取走单次,卸载清理计时器,最终失败打一条 [dsh-life-pack] 前缀的 console.warn;update-view.ts 加纯函数 loadFailureDetail(原文优先、超长截断)。
  • 读数:新测试 9/9;变异(去掉重试循环)必红、还原复绿;总管包全量 242/242;边界+安装门 22/22(中途因新增定时器缺例外依据红过一次,已按门禁模板补上限+“有界重试”注);宿主 tsc -b 与客户端 tsc -p 全绿。
  • 双轴评审:Standards 硬违反 2 已修(超线报警句+新增注释与测试名用词);Spec 无范围蔓延,面板层补 loadFailureDetail 单测(钩子层本仓无渲染器,按 #937先例只钉纯核),装后重取改单次(Brief 只要求首帧)。
  • 已知缺口(如实记录):①浏览器侧 console.warn 不一定落进面板指引的文件日志——下次按指引搜文件仍可能扑空,宿主侧落盘需另立票(判据现成:可读文件日志零 [dsh-life-pack] 行),本票不含;②面板钩子层无渲染器单测,重试接线以评审+先例为据;③真机偶现验证待报告人下次进面板观察(若红字不再出现或出现后自行消失,即为修复证据)。
  • 超线报警:已超线,需要根据规则进行重构——update-panel.ts 本包告警线 350 行,改前约 747 行(既有超线),本次约 +60 行;暂不拆分,拆分(取数/行渲染/浮层/缺席卡)下轮单独立项。

进度

关票(2026-10-01):报障人实测面板已连接、无红色文字、无需看日志;关闭。

Activity

  1. added
    bug
    needs-triage
    on Sep 27, 2026
  2. FeatherHunter commented on Sep 28, 2026

    @FeatherHunter
    OwnerAuthor

    This was generated by AI during triage.

    Triage Notes

    What we've established so far:

    • 红字是面板代码按原样印出来的,不是用户转述:packages/plugin-manager/src/update-panel.ts:494 在 loadError 非空时印 '更新能力没接上:' + loadError,而 loadError 的这一句是 packages/plugin-manager/src/update-contract.ts:103 的 manager-unreachable 文案。逐字对得上票面抄录。
    • 触发点是面板挂载时取七个更新目标的表失败:useUpdateRows.reload 调 loadTargets(getCall())(update-panel.ts:282-294),callManager 在传输层抛错时统一落进 manager-unreachable(update-client.ts:59-68)。也就是说,这行红字只代表“面板到总管宿主的这一通电话没打通”,不代表七家里哪一家落后。
    • 影响范围:更新面不可用(CheckUpdateButton 的表是空的,UpdateResults 只显示这行红字,检查/安装都无从谈起)。爱生活页签条、技能设置页投影、HealthSummaryLine 是独立渲染的(client.ts:419-426 之后仍继续画),不受这行红字直接阻断。
    • 已排除一条近似路径:若 connection.rpc.call 缺席(getCall() 回空),callManager 走的是 internal(update-client.ts:60),面板会印另一句“面板与总管之间的请求出错了”,不是本票这一句。所以本票不是“连接后到”那一类。
    • 冗余检查:按领域概念(更新目标表、总管电话、/api/ilife-manager)检索,只有一处定义(update-contract.ts 的 MANAGER_RPC/MANAGER_ACTIONS,宿主注册在 index.ts:41-73),没有已实现的第二份。不是“已经做好了”的 wontfix。
    • 既往拒绝检查:.out-of-scope/ 为空,无近似条目。
    • 阶段判断:票面无评论、无认领、无实施记录,属于“未动工 → 正常诊断”。代码链路已核验(文案与调用链逐行对上),真机复现与日志读数还没拿到。

    Root cause candidates (all code-side, confidence is judgment, not measurement):

    • R1 宿主半没注册 /api/ilife-manager(总管 host 没装配/被禁用/旧版本没有这条路由):高。index.ts:41-73 注册失败或根本没跑,面板这一通电话就会抛错,正好落进 manager-unreachable。文案第一句“宿主里没注册”指的就是它。
    • R2 面板与宿主版本对不上(client 新、host 旧,或反之;通道名、端点名、电话名对不上导致抛错):中高。MANAGER_RPC.base/endpoint/path 与七组电话名两侧必须同源(update-contract.ts:22-40 注释记过两次传错第一段就 404 的真机事故);近期总管版本 churn 大,错版即抛错,同样落进这一句。文案第二句“版本对不上”指的就是它。
    • R3 同一使用范围里有多份 dsh-life-pack 实例抢注册,新实例退让(index.ts:76-78 的 already registered ... yielding),留下旧实例继续服务:中低。此时电话通了但版本是旧的,行为与 R2 相同,只是根在装配,不在发版。
    • 已排除:connection.rpc.call 缺席、磁盘上技能/公共层版本落后、使用范围里那条 base-link-core 直依赖——这几条走的是别的文案或别的面板位置,不产生本票这一句。

    What we still need from you (@FeatherHunter):

    • DSH 日志里 [dsh-life-pack] 的报错行(重启 DSH 复现一次后,搜关键字,贴命中行前后各约 20 行,注意脱敏)。
    • 真机读数:DSH 版本、总管已装版本(面板胶囊 dsh-life-pack · x.y.z,或 node_modules/dsh-life-pack/package.json 的 version)、使用范围 package.json 的 dependencies(确认是否装了多份总管)、是否已按面板提示重启重试。
    • 最小复现:重启 DSH → 打开爱生活卡 → 看更新区是否仍是这行红字(是/否),以及红字出现时页签条是否正常。

    分流:本轮落到 needs-info(bug 保留)。理由:R1/R2 在没有日志与版本读数时无法落点,不满足 ready-for-agent 的充分指定;不是人专属实现(ready-for-human)、也不是不做(wontfix)。拿到上面两组读数后直接转 ready-for-agent(若日志指向装配问题,附“宿主装配链路”事项;若指向版本对不上,附“版本对齐/握手”事项,均不阻塞)。

  3. added
    needs-info
    and removed
    needs-triage
    on Sep 28, 2026
  4. FeatherHunter commented on Sep 28, 2026

    @FeatherHunter
    OwnerAuthor

    This was generated by AI during triage.

    Triage follow-up: agent-checked machine evidence (2026-09-28)

    Reporter asked whether the agent can see the logs directly. Checked on this machine (diagnosis only, no code changed):

    • Searched C:\Users\辰辰洋洋\.dsh\logs\desktop-next.log (134 KB, latest writes today) for [dsh-life-pack] / ilife / ilife-manager / already registered / fetch route / manager-unreachable: zero hits. That file only contains deepseek-account + next-ui-diagnostic lines. The [dsh-life-pack] line the panel points at is not in this file.
    • dsh-desktop\dsh.log is from August, also no hits. %APPDATA%\DSH Desktop\logs\desktop.log (named in docs/agents/plugin-webserver-inject.md:120) does not exist on this machine. dsh-harness-desktop holds only leveldb logs.
    • Version alignment on this machine (~/.dsh/profiles/web): manifest dsh-life-pack 0.3.16, disk node_modules all seven (dsh-life-pack + six singles) at 0.3.16, workspace packages/plugin-manager at 0.3.16. No profile-level version skew visible here, so R2 looks unlikely on this machine; R1 (host route not registered / old host still running) or “the log lives elsewhere (plugin host log / settings page devtools console)” remain open.
    • Labels unchanged: still needs-info, waiting on the two questions in the body (which log file the panel means on the reporter's DSH build + DSH version, and whether the red text was seen on this same machine after a restart post-0.3.16).
  5. FeatherHunter commented on Sep 28, 2026

    @FeatherHunter
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Intermittent "update capability not connected" red on entering the settings panel sticks for the session because the update-targets load runs once with no retry

    Current behavior:
    On the web profile, entering the爱生活 settings panel occasionally shows the red line "更新能力没接上:面板连不上总管插件(宿主里没注册,或版本对不上)…" and it stays for that visit. Reporter confirms: same machine, all seven packages at 0.3.16 on disk and in the manifest, seen after a DSH restart — so this is not profile-level version skew; it smells like a mount-time race (first targets call fires before the host route is ready). Two asymmetries support this: the neighboring version capsule retries a failed read three times with backoff (the precedent set when "fail once, stuck forever" was fixed there), while the update-targets load runs once on mount and a single transport throw becomes a session-stuck red. The underlying transport detail (which would distinguish "route not registered yet" from other transient failures) is also dropped — only the human-readable sentence is kept — so the panel's own advice ("look for the [dsh-life-pack] error in the DSH log") leads nowhere: the readable file log on this machine contains no such lines.

    Desired behavior:
    A transient failure of the initial update-targets load is retried with bounded backoff (following the version capsule's established retry shape: cleanup on unmount, bounded attempts, no unbounded polling); if the host is still unreachable after the retries, the red stays but the underlying transport detail is observable (e.g. a console warning under the [dsh-life-pack] prefix and/or retained alongside the message) so the next diagnosis can tell "not registered yet" apart from other causes. A successful (re)load clears the red exactly as today.

    Key interfaces:

    • The update-rows hook's targets-reload path — single-shot today; needs the bounded-retry treatment
    • The manager-version hook — the in-repo precedent for bounded retry with unmount cleanup; mirror its shape, don't reinvent
    • The panel-to-host call wrapper whose transport throw currently maps to the generic unreachable reason — its detail must survive somewhere diagnosable
    • The shared reason-text contract — wording stays as-is; only diagnosability changes

    Acceptance criteria:

    • Transient first-load failure (throw once, succeed on retry) ends with no red and a populated targets table
    • Persistent host-unreachable still ends with the same red sentence as today
    • The underlying transport detail of a failed load is observable under the [dsh-life-pack] prefix (so the panel's log advice is actionable)
    • No unbounded timers: retries are bounded in count, cleaned up on unmount (same bar the version capsule meets)
    • Tests cover: fail-once-then-succeed clears; always-fail keeps the red; unmount cancels pending retries
    • Successful-first-load path and version-capsule behavior are unchanged

    Out of scope:

    • Changing any user-facing reason sentence
    • Changing host-side route registration or host readiness itself
    • Touching the settings tabs, health panel, or install/update flows beyond the reload path
    • Non-blocking confirmation (does not gate the work): the exact transport error text from the settings-page devtools console the next time the red appears — nice to have, the fix handles all transient causes generically
  6. added
    ready-for-agent
    and removed
    needs-info
    on Sep 28, 2026
  7. FeatherHunter commented on Sep 28, 2026

    @FeatherHunter
    OwnerAuthor

    转待人类验证:修复已在 \

  8. added
    ready-for-human
    and removed
    ready-for-agent
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugready-for-human

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions