docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5) - #7294

Merged
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5
Sep 2, 2026
Merged

docs(guides,plugins,tooling): clear three .mdx pages off the doc-snippet ledger (#5174 batch 5)#7294
yinlianghui merged 5 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch5

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 5 of the UNGATED_DOCS burn-down — the first batch into the .mdx half. Batches 1-4 (#5341#5951#5967#5983#5991) cleared every content/docs.md page; this one takes the three highest-density .mdx entries and delivers all three whole.

Per page

pageblockscompiledeclared fragmentdiagnostics cleared
content/docs/guide/objectos-integration.mdx2191254
content/docs/plugins/plugin-chatbot.mdx1818021
content/docs/plugins/plugin-map.mdx1613342
total554015117

Pages were chosen by descending ts/tsx block count over the 12 .mdx ledger entries, re-derived from the script with its own TS_FENCE_LANGUAGES set and fence walk — not from the dispatch's list.

Invariants

readingbeforeafter
UNGATED_DOCS entries4340
covered documents181184 (strictly grows)
covered docs holding a ts/tsx block8083
covered blocks385440
blocks compiled272312
blocks declared fragment113128
content/docs.mdx entries remaining129
--build-filter21 filters / 33 tasks23 filters / 34 tasks
  • The ledger hunk contains only removals: git diff origin/main -- scripts/check-doc-snippet-types.mjs is 15 deleted lines and 0 added.
  • Gate strictness is byte-identical from the fence-scanning banner to EOF, both sides:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3

The defects, and where they were

objectos-integration.mdx is a getting-started integration guide, and four of the adapter APIs it documents do not exist. All four were hidden underneath a single unresolved name — the page never imported ObjectStackAdapter, so TS2304 was the only thing the gate could say. Resolving that name is what exposed them:

  1. new ObjectStackAdapter({ headers: ... }) — the whole "Multi-Tenancy Support" section. The constructor config is a sealed object literal type with no index signature; headers is not on it. Repaired to the real route, the fetch hook the adapter uses for every call it makes.
  2. new ObjectStackAdapter({ websocket: ... }) and adapter.subscribe(...) — the "Real-time Updates with WebSockets" section. There is no WebSocket transport and no server-push subscription anywhere in @object-ui/data-objectstack; subscribe is not a member. The real mechanism is onMutation, which notifies of writes this adapter instance performed and returns its own unsubscribe function. Section repaired and retitled "Reacting to Data Changes", and it now says out loud what the adapter does not do.
  3. cache: { enabled, strategies }cache exists but takes only maxSize and ttl. Repaired to the two real keys.
  4. viewTypes / fieldNames on an object-view node — both have zero read sites in the packages. ObjectView reads defaultViewType (a declared member of ObjectViewSchema) and columns (string[] or ListColumn[]). Corrected to those two. ⚠️ This one the gate cannot catch — see below.

A reader copying any of the first three got a rejected config or a TypeError.

Lid check — POSITIVE on two pages, and reported as measured

The dispatch required a re-run after resolving unresolved names. Results, per page:

  • objectos-integration.mdx — POSITIVE. Adding the missing ObjectStackAdapter import to three blocks turned one TS2304 into TS2353 on headers, TS2353 on websocket, TS2339 on subscribe and TS2353 on cache.enabled. Defects 1-3 above are entirely lid.
  • plugin-chatbot.mdx — POSITIVE. Annotating the schema and message literals surfaced 5 x TS2353 on avatarFallback (see below).
  • plugin-map.mdx — NEGATIVE. After giving the eight unparseable schema literals const bindings and annotating them ObjectMapSchema, nothing new appeared — 0 diagnostics underneath. Reported as a negative result.

What the green does not mean

  • BaseSchema carries [key: string]: any (base.d.ts:357), and ChatbotSchema, ObjectMapSchema and ObjectViewSchema all extend it. A wrong top-level key on any of these literals is structurally invisible — which is exactly why defect 4 above had to be found by grepping read sites rather than by the compiler. The green certifies the types of declared members, never the existence of a key.
  • Unannotated literals are checked against nothing. Three plugin-chatbot example blocks (supportChat, salesBot, multiAgentChat) and two plugin-map static-data blocks are deliberately left unannotated — see the two contract gaps below. Their green says only "this parses and its expressions type".
  • What is sealed and therefore genuinely checked on these pages: ChatbotSchema and ObjectMapSchema member types, ChatMessage (both the authoring and the plugin shape), ChatToolInvocation.state, ObjectViewSchema.defaultViewType, ObjectMapConfig, and the ObjectStackAdapterconstructor config, which is a sealed literal type and is where all three repaired defects were caught.

Two contract gaps found, NOT fixed here (outside this PR's surface)

Both are package-type defects, not documentation defects. The documentation is correct in each case and is left as it stands.

  1. Per-message avatar / avatarFallback are honoured but undeclared.Chatbot resolves message.avatarFallback || userAvatarFallback (packages/plugin-chatbot/src/index.tsx:177-178), and authoredToRuntimeMessage carries the keys across the seam via its ...passthrough spread — so authoring them in chatbot metadata works end to end. But no authoring-facing type declares them: @object-ui/types' ChatMessage does not, and neither does SeamChatMessage (its RuntimeOnlyMessageKeys covers only buildProgress, blueprintProgress, charts). Only the plugin's own runtime ChatMessage has them. Annotating the three affected blocks would have meant deleting working, documented behaviour, so they stay unannotated.
  2. ObjectMapSchema.objectName is required but the component treats it as optional.ObjectMap branches on schema.staticData first (ObjectMap.tsx:153) and guards objectName everywhere else, so the documented static-data route needs no objectName — yet the type demands one. The static-data example blocks are therefore left unannotated.

Gate verdicts

Before (pristine origin/main ledger, 43 entries):

Scanned 224 document(s): 181 covered (80 of them hold a ts/tsx block), 43 ungated
Covered blocks: 385 — 272 to compile, 113 declared fragment(s).
Semantic phase: 272 of 272 block(s) judged, 0 failed.

After, at merge commit fe053c7b6:

Scanned 224 document(s): 184 covered (83 of them hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s).
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 312 of 312 block(s) judged, 0 failed.

All run at fe053c7b6, after git merge origin/main (never rebased):

checkexitverdict
check:doc-snippets0Semantic phase: 312 of 312 block(s) judged, 0 failed.
check:doc-fences0every TypeScript block in 224 document(s) correctly fenced
check:doc-types0Every documented component type is registered
check:doc-links0Links are valid across 17 scan roots
check:control-bytes0scanned 6008 tracked text file(s)
check:readme-exports0386 self-imports judged, 0 wrong-path, 0 fabricated
check:skills-paths092/93 stated path(s) resolve
check:shell-escape-residue00 occurrence(s) outside a fence
check-changeset-presence0no changeset owed (docs + scripts only)
vitest, 7 files from the repo root0177 tests passed

The vitest run is the two suites the dispatch named plus the five other files that git grep shows name check-doc-snippet-types — pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked.

Declared narrowing

pnpm lint was not run repo-wide; the narrowing is measured, not assumed. ESLint's own answer for the four changed files (--format json, 4 files returned): the three .mdx files report File ignored because no matching configuration was supplied — they are outside eslint's configured surface entirely, since every files pattern in eslint.config.js is **/*.{ts,tsx}. The one file it does lint, scripts/check-doc-snippet-types.mjs, is clean at 0 errors, 0 warnings. eslint.config.js declares no projectService and no project:, so type-aware linting is not enabled and this diff cannot move the lint verdict on any file it did not touch.

One further note on measurement honesty: check:readme-exports first exited 1 with 45 findings, every one of them the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first, all in plugin-ai and plugin-gantt — packages outside this gate's build closure. That was an unbuilt tree, not a red gate. Those two closures were built and it is now genuinely green.

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:07
@yinlianghui
yinlianghui added this pull request to the merge queueSep 2, 2026
Merged via the queue into main with commit 9bf0abfSep 2, 2026
29 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-5174-mdx-ledger-batch5 branch September 2, 2026 05:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yinlianghui@claude