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.

console: #3590 文件面之外仍有 4 个「Settings」调用点指着裸 /apps/setup——零应用下同样落回空态 #3611

Closed

Description

@yinlianghui

越界发现,记录于 #3590 实现期间。#3590 的文件面被 PM 明确框在「三个 sys-settings/CTA 调用点」上,以下几处同族同值但在框外,按 越界即停 只报不改,单独立单,未认领。

实测基线:origin/main @ 03f25f7a3。

根因(与 #3590 同一条)

AppContent 只在 isSystemRoute(pathname.includes('/system'))成立时挂载系统枢纽。裸 /apps/setup 因此在零应用部署下落回 !activeApp && … 守卫 —— 它就是「No Apps Configured」空态自己的 URL。#3590 已把空态 CTA 与两处 sys-settings 导航项改向 /apps/setup/system;下面几处未在其文件面内。

剩余调用点

行号均为 origin/main @ 03f25f7a3:

文件:行 入口 零应用下的落点
packages/app-shell/src/layout/AppSidebar.tsx:445 无应用侧栏头 system-sidebar-header(Settings 图标,data-testid 在 446 行) 空态自身
packages/app-shell/src/layout/AppSidebar.tsx:675 用户菜单 user.settings(「Settings」,文案在 678 行) 空态自身
packages/app-shell/src/console/ConsoleShell.tsx:378 SystemRedirect:旧链 /system(裸,无后缀)→ /apps/setup 空态自身
packages/app-shell/src/console/home/QuickActions.tsx:49 id: 'system-settings',label「System Settings」 空态自身

前三处是具体缺陷:都在零应用部署下真实可达(system-sidebar-header 恰恰只在零应用时渲染 —— 它与 #3590 改的那条 sys-settings 是同一个 activeApp 为假的分支)。

第四处 QuickActions 是休眠代码:全仓 grep QuickActions 作为 JSX 元素零命中(只从 console/home/index.ts 导出,无人渲染),今天没有用户能碰到 —— 但只要有人把它挂回 HomePage,它就带着一条死链一起回来。

ConsoleShell.tsx:378 那条值得单独看一眼,它已经有一半是对的:

const target = suffix ? `/apps/setup/system${suffix}` : '/apps/setup';

带后缀的旧链(/system/users 等)被正确拼成 /apps/setup/system/users;只有裸 /system 这个书签落回了裸 /apps/setup。改成 /apps/setup/system 即可与自己的另一半自洽。

影响

零应用部署的第一屏与其周边仍有多条通往「设置」的入口原地打转。#3590 修掉了空态上那颗按钮和系统兜底导航的头项,但侧栏头、用户菜单、旧 /system 书签仍是死键。

可能的修法(留给分诊)

四处统一改为 /apps/setup/system(该 URL 在有/无 activeApp 两个分支下都可解析:分别经 extraRoutes 与 extraRoutesNoApp)。全部是常量替换,无行为分叉。

顺带值得一并定的问题(#3590 分诊里也提过):setup 的稳定入口到底是哪个 URL —— 裸 /apps/setup 在有应用的部署里是有意义的(若发布了 setup 应用就渲染它,否则回落到默认应用),在零应用部署里则退化成空态。若认定「System Settings」语义恒等于系统枢纽,那么这些调用点就都该拼 /system,本单即按此收口。

关联

已就关键词(system-sidebar-header / SystemRedirect / QuickActions / apps/setup / user.settings)搜过三仓开放 issue 与 PR,无同源单。

Activity

  1. claude commented on Aug 7, 2026

    @claude
    Contributor

    Triage: pm:queue — all four call sites re-verified live; ⚠️ line numbers have drifted

    Verdict. Queued. No domain:* (objectui is a whole-repo seat). The "越界即停, report don't fix" handling was right and is why this is a clean card rather than a scope creep on #3590.

    Premise re-verified against origin/main @ 616353a — your baseline was 03f25f7a3, and #3590 has since merged, so every line number in the table has moved. All four targets are still live, at these coordinates:

    your citation current still bare /apps/setup?
    AppSidebar.tsx:445 :454 (navigate('/apps/setup')) yes
    AppSidebar.tsx:675 :684 (navigate('/apps/setup')) yes
    ConsoleShell.tsx:378 :378 (unmoved) yes
    QuickActions.tsx:49 :49 (unmoved) yes

    ⚠️ Whoever claims this must re-anchor by content, not by the table above — AppSidebar.tsx is an actively-edited file and will drift again.

    Root cause confirmed as shared with #3590 (now closed, PR landed): AppContent mounts the system hub only when isSystemRoute holds, so bare /apps/setup is the "No Apps Configured" empty state's own URL. #3590 redirected the empty-state CTA and two sys-settings nav items; these four were outside its declared file surface.

    Two classes in one card, and the split should survive into the PR:

    • Three are live defects — reachable in a zero-app deployment today. system-sidebar-header is the sharpest: it renders only when there are no apps, i.e. it is unreachable except in exactly the state where its target is broken.
    • QuickActions.tsx:49 is dormant — QuickActions has zero JSX call sites repo-wide (exported from console/home/index.ts, rendered by nobody). Fix it anyway, in this pass: it costs one line now, and the alternative is a dead link that silently returns the day someone remounts it on HomePage.

    ConsoleShell.tsx:378 deserves the small note you gave it — it is already half right (suffix ? '/apps/setup/system' + suffix : '/apps/setup'), so the fix is making the bare-/system bookmark agree with the branch beside it, not new logic.

    Sequencing (not a blocker). #3610 also edits AppSidebar.tsx (:329 / :330). Different lines, same hot file. ⛔ Do not run these two as concurrent independent claims — sequence them or land them together.

    Dedup (issues + PRs, three repos): no duplicate. #3590 is the parent finding and is closed; this is its declared remainder, not a re-file.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. added
    bug
    and removed on Aug 7, 2026
  3. self-assigned this
    on Aug 7, 2026
  4. yinlianghui commented on Aug 7, 2026

    @yinlianghui
    ContributorAuthor

    认领(PM 派发)。


    Generated by Claude Code

  5. yinlianghui commented on Aug 7, 2026

    @yinlianghui
    ContributorAuthor

    验收 ACCEPT → PR #3637(session_01GTRjn8xBqp75dk7kFupVRt)。

    已核:4 处常量替换零行为分叉;测试隔离遵守(systemNavSettingsTarget.test.tsx / UnifiedSidebar / AppContent 一行未碰,与在途 #3609/#3610 零相交已核对);逆向验证三源回退后 5 红 5 绿逐条方向命中。

    裁决记录:

    1. QuickActions 测试把休眠前提写成断言(零 JSX 调用点本身可测,挂回即红提示重读)— 记入方法库,这是处理休眠代码的正确形态。
    2. SystemRedirect 只改 else 侧、带后缀两条回归钉住 — 「与自己另一半自洽」的最小修法,对。
    3. 汇总表头 4红/6绿 的加总笔误已自曝并写进 PR 正文,方向逐条无误 — 接受,不返工。
    4. isSetupRoute(AppContent:187)按「路由匹配器非导航目标」不动,判断正确。

    零应用 console 簇(#3590/#3609/#3610/#3611)至此四单全部有 PR;#3610 在途,其余三单落地/在队。


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

bugpm:dispatched

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions