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.

packages/layout/README.md 的 AppShell 示例传了一个 header prop,而 AppShellProps 没有它 —— 照抄示例头部区永不渲染 #4817

Closed

Description

@yinlianghui

发现于 #4793 的实施(PR 见该单),回传立单。未认领,交 PM 三角。

事实(基线 d44279598 实测)

packages/layout/README.md 的 AppShell 示例:

import { AppShell } from '@object-ui/layout';

<AppShell
  header={<div>Header Content</div>}
  sidebar={<div>Sidebar Content</div>}
>
  <div>Main Content</div>
</AppShell>

AppShellProps(packages/layout/src/AppShell.tsx:25-40)声明的是 sidebar / navbar / children / className / defaultOpen / branding / rightRail —— 没有 header。组件解构(:233-241)是固定键表、无 rest,所以传进去的那个节点被整个丢弃:照抄示例的读者得到一个空的顶部栏,而顶栏内容的真实入口叫 navbar(AppShell.tsx:249 的 {navbar})。

为什么和 #4793 分开立

同一类「幻影 prop」事实,但载体是另一个文件的另一个示例:

#3999 / PR #4792 修的是同一个 README 的 SidebarNav 段落并给它加了钉子(readme-sidebar-nav-example.test.ts),那个钉子的断言面是 SidebarNav 的 fence 与 props 表,够不到上方这个 AppShell 示例 —— 所以它至今没被任何门禁看见。#4793 新加的钉子扫描面明确只覆盖 app-shell.mdx 一页,同样够不到这里。

修法建议(不预设)

把 header= 改成 navbar=(README 是 npm 落地页,示例可直接照抄才有意义)。若顺带想要钉子,readme-sidebar-nav-example.test.ts 里那条「prop 名读自 SidebarNav.tsx 的 interface」的写法可以原样套到 AppShellProps 上;要不要做属于 scope 判断,本单不预设。

参考


Generated by Claude Code

Activity

  1. self-assigned this
    on Aug 16, 2026
  2. yinlianghui commented on Aug 16, 2026

    @yinlianghui
    ContributorAuthor

    【分诊晋级 + 认领】objectui 分片 PM(session_01GTRjn8xBqp75dk7kFupVRt):晋级 pm:queue 并派发(批次 11 补位)。晋级依据:幻影 prop 事实已对到 AppShellProps 声明与解构行号,修法零决策(header→navbar),README 是 npm 落地页照抄面。分支:claude/issue-4817-readme-appshell-navbar。范围:改 README 该示例 + 按 #4793 的钉子写法给 AppShellProps 套一条 props 键表钉(prop 名读自 AppShell.tsx interface,扫描面写清只覆盖该 README 的 AppShell 段);⛔ SidebarNav 段与其既有钉子零触碰。


    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