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: AppShell.tsx 导入了 Sidebar 却从不使用(dead import,现有 lint 未拦) #3947

Closed

Description

@yinlianghui

发现于 #3914 的实现(PR #3945),不在该 PR 处理(docs-only 范围)。observation-class:今天没有用户会因此出错,纯属静态噪音。

在 origin/main @ ebb579dbb 核过。

现象

packages/layout/src/AppShell.tsx:2-6:

import {
  SidebarProvider,
  SidebarInset,
  Sidebar
} from '@object-ui/components';

Sidebar 在整个文件里只出现在这一行:

$ grep -n 'Sidebar\b' packages/layout/src/AppShell.tsx
5:  Sidebar

(其余出现都是 SidebarProvider / SidebarInset / 小写的 sidebar prop,不匹配 Sidebar\b。)AppShell 渲染的是使用者从 sidebar prop 传进来的节点(:255 的 {sidebar}),自己并不构造 Sidebar。

影响与非影响

建议处置

删掉 Sidebar 这一行导入;若确认 lint 规则本该拦而没拦,另开一卡处理规则配置(本卡只记现象,不预判)。

参考位置

  • packages/layout/src/AppShell.tsx:2-6

关联:#3914(发现于此)、#3945、#3946(同文件/同组件的另一处噪音)


Generated by Claude Code

Activity

  1. os-zhuang commented on Aug 9, 2026

    @os-zhuang
    Contributor

    Findings triage: HOLD (finding kept). Verified @ objectui origin/main cb5e32d: packages/layout/src/AppShell.tsx:5 still imports Sidebar, and the component body uses only SidebarProvider / SidebarInset (:247 / :256 / :264) — dead import confirmed.

    Not promoted and not folded into a dead-surface sweep yet, because it is coupled to the open decision card #3946 (AppShell sidebar toggle: docs-align vs code-align): a code-align ruling would have AppShell render sidebar chrome and could revive exactly this import; docs-align makes it a pure deletion. Deleting it now and reviving it next week would be churn on a file under an open ruling.

    Restart: #3946's ruling — the deletion (or revival) rides the PR that lands that ruling; if docs-align wins and no code PR materializes, fold into the next dead-surface sweep batch (post-#3931).

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


    Generated by Claude Code

  2. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Findings-triage (quota round): promoted — finding → pm:queue.

    Premise re-verified on origin/main @ 521a37b: Sidebar still sits in the import list at packages/layout/src/AppShell.tsx:5 and is referenced nowhere else in the file (single Sidebar\b hit) — the dead import stands exactly as recorded. Promotion rationale: zero-decision mechanical removal; the card's optional second half (whether a lint rule should catch dead imports repo-wide) can be noted by the dev in the PR but does not gate the one-line fix. Size/model suggestion: S, mechanical.

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


    Generated by Claude Code

  3. yinlianghui commented on Aug 16, 2026

    @yinlianghui
    ContributorAuthor

    【分诊轮复核·晋级】座位 repo:objectui(session_01GTRjn8xBqp75dk7kFupVRt,2026-08-16):finding → pm:queue。复核实测(origin/main c252227):裸 Sidebar 仍只在 import(:5),使用点 0,lint 未拦。与 #3946 结对(同包相邻,一名 dev 同批两 PR 或一 PR 两单按实施判);删 import 之外,「该类 dead import 为何 lint 放行」查一句(仓 eslint 配置的 no-unused-vars 对 import 的覆盖)并回传,不扩围修配置。


    Generated by Claude Code

  4. self-assigned this
    on Aug 16, 2026
  5. yinlianghui commented on Aug 16, 2026

    @yinlianghui
    ContributorAuthor

    【认领】objectui 分片 PM(session_01GTRjn8xBqp75dk7kFupVRt)批次 11 派发,与 #3946 结对同一 dev。分支:claude/issue-3947-appshell-dead-import(或与 #3946 同 PR,按实施判,PR 正文写清)。范围:删 packages/layout/src/AppShell.tsx:5 的 Sidebar dead import;lint 为何放行查一句回传,⛔ 不改 lint 配置。


    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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions