Skip to content

Commit d82a580

Browse files
xuyushun441-sysos-zhuangclaude
authored
fix(ADR-0046): docs portal shows summaries, not machine ids (#1692)
The portal listed each doc as title + its raw machine name (showcase_index) — noise for the business readers docs are for. Drop the machine id from the reader-facing list; render the doc's `description` (one-line summary) under the title instead (graceful when absent). Verified live against a description-serving backend: portal shows titles + gray summaries, no machine ids. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 52f78d9 commit d82a580

3 files changed

Lines changed: 23 additions & 5 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@object-ui/console": patch
3+
---
4+
5+
fix(ADR-0046): docs portal shows summaries, not machine ids.
6+
7+
The portal listed each doc as title + its raw machine name (`showcase_index`)
8+
— noise for the business readers docs are written for. Drop the machine id from
9+
the reader-facing list and render the doc's `description` (ADR-0046) as a
10+
one-line summary under the title instead. Falls back cleanly when a doc has no
11+
description.

apps/console/src/pages/DocsIndex.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function DocsIndex() {
5252
if (cancelled) return;
5353
setGroups(
5454
groupDocsByPackage(
55-
items.map((it) => ({ name: it?.name, label: it?.label })),
55+
items.map((it) => ({ name: it?.name, label: it?.label, description: it?.description })),
5656
),
5757
);
5858
setState('ready');
@@ -110,11 +110,17 @@ export default function DocsIndex() {
110110
<li key={doc.name}>
111111
<Link
112112
to={`/docs/${doc.name}`}
113-
className="flex items-center gap-2 px-3 py-2 text-sm hover:bg-muted/50"
113+
className="flex items-start gap-3 px-3 py-3 hover:bg-muted/50"
114114
>
115-
<BookOpen className="h-4 w-4 shrink-0 text-muted-foreground" />
116-
<span className="font-medium">{doc.label ?? doc.name}</span>
117-
<code className="ml-auto text-xs text-muted-foreground">{doc.name}</code>
115+
<BookOpen className="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" />
116+
<div className="min-w-0">
117+
<div className="text-sm font-medium">{doc.label ?? doc.name}</div>
118+
{doc.description ? (
119+
<div className="mt-0.5 line-clamp-2 text-xs text-muted-foreground">
120+
{doc.description}
121+
</div>
122+
) : null}
123+
</div>
118124
</Link>
119125
</li>
120126
))}

apps/console/src/pages/doc-groups.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
export interface DocListItem {
1010
name: string;
1111
label?: string;
12+
description?: string;
1213
}
1314

1415
export interface DocGroup {

0 commit comments

Comments
 (0)