Commit d99daae
fix(website): give library-neutral docs pages an honest control plane (#920)
* docs: spec for library-neutral docs pages
Records the design for /docs/choosing-an-adapter and the control plane's
missing "no library selected" state. Also records that one of the two
follow-ups behind this work was already fixed by #892, and that /docs is
a landing page rather than a page missing its shell.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(website): give library-neutral docs pages an honest control plane
On /docs/choosing-an-adapter the mobile drawer's Scope card read
"LangGraph / Getting Started / Documentation" — three fabrications in
the one card whose job is saying where you are. Nav derives the library
from the second path segment, which on that URL is
"choosing-an-adapter"; getLibraryConfig returns undefined and the code
fell back to 'langgraph', so the drawer showed LangGraph's picker and
its whole section tree.
The cause is that the control plane had no "no library selected" state,
so every caller had to invent one. Adds it:
- activeLibrary is now LibraryId | null through DocsControlPlane and
DocsNavigation. Neutral pages show "Docs / <page>" in Scope, a
"Choose a library" picker with nothing checked, and no section tree.
- Nav stops defaulting to langgraph and resolves special-page titles,
which corrects the drawer on every library-neutral route.
/docs/choosing-an-adapter was also bespoke, and that drift is what
produced the rest of its symptoms. It now uses the same shell as every
other docs page, which:
- gives it the control plane it never had,
- deletes an empty hero Section that opened a measured 144px gap above
the H1 and whose empty div was the target of aria-labelledby, leaving
the section with no accessible name,
- replaces ~60 duplicated lines of MDX pipeline with MdxRenderer.
MdxRenderer's library/section/slug/title props were accepted and never
read — four of the website's lint warnings. Dropped. The blog route was
passing library="langgraph" for blog posts, which only ever looked
harmless because the value was discarded.
/docs keeps its landing-page treatment; it is the front door, not a
page missing its shell.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent bd868bf commit d99daae
11 files changed
Lines changed: 342 additions & 150 deletions
File tree
- apps/website/src
- app
- blog/[slug]
- docs
- [library]/[section]/[slug]
- choosing-an-adapter
- components
- docs
- styles
- docs/superpowers/specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 113 | + | |
120 | 114 | | |
121 | 115 | | |
122 | 116 | | |
| |||
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 110 | + | |
117 | 111 | | |
118 | 112 | | |
119 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
19 | 7 | | |
20 | 8 | | |
21 | 9 | | |
| 10 | + | |
| 11 | + | |
22 | 12 | | |
23 | 13 | | |
24 | 14 | | |
25 | 15 | | |
26 | 16 | | |
27 | 17 | | |
28 | 18 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 19 | | |
53 | 20 | | |
54 | 21 | | |
| |||
64 | 31 | | |
65 | 32 | | |
66 | 33 | | |
67 | | - | |
68 | | - | |
| 34 | + | |
69 | 35 | | |
70 | 36 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
85 | 49 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 50 | + | |
| 51 | + | |
95 | 52 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 53 | + | |
107 | 54 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
111 | 58 | | |
112 | 59 | | |
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
235 | 274 | | |
236 | 275 | | |
237 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
125 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| |||
0 commit comments