docs(mobile): shrink UNGATED_DOCS by one — the mobile README's 10 blocks compile (#5174 batch 14) - #7975
Merged
Conversation
…cks compile
Every ts/tsx block in packages/mobile/README.md now compiles --strict against
the built dist/*.d.ts, so the document leaves the check-doc-snippet-types
coverage ledger (24 entries -> 23).
The page did not merely lack self-contained blocks. Six of its examples taught
call shapes @object-ui/mobile has never exported: useGesture's onSwipeLeft /
onSwipeRight / onPinch (the shipped UseGestureOptions is { type, onGesture };
the callback-shaped hook is useSpecGesture), useBreakpoint's `current` (the
field is `breakpoint`), useTouchTarget's { minSize } -> { targetProps } (the
shipped shape is { config: TouchTargetConfig } -> { style, className }),
ResponsiveContainer's mobile / desktop props (the shipped props are
minBreakpoint / maxBreakpoint / showOn / hideOn), registerServiceWorker's
cacheStrategy (that concept lives in the generated worker), and
useResponsive's { mobile, tablet, desktop } keys, which resolveResponsiveValue
never reads, so the documented call returns undefined at every breakpoint.
Those were invisible to the gate only because the surrounding blocks never
imported the symbols they called.
The gate file is edited only inside the UNGATED_DOCS object literal, by
removal: numstat 0 2.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013uAaxiwgYDybsTNV9xwa1M
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
baozhoutao
marked this pull request as ready for review
September 6, 2026 05:17
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5174 — batch 14 of the
check-doc-snippet-typesungated-docs ledger burn-down.packages/mobile/README.mdleavesUNGATED_DOCS. All 10 of its ts/tsx blocks now compile--strictagainst the builtdist/*.d.ts. Zero fragment markers written, zero entries added — the ledger hunk is0additions /2deletions and the whole diff is exactly two files.Fragments unmoved ⇒ every one of the 10 newly covered blocks earned it by compiling. The block count went 9 → 10 because the
useGesture / useSpecGesturesection now carries one block per hook.Base for every figure:
859de84a0. Nothing here is inherited from batch 13.Census, re-taken on this base
Taken with the gate's own exports (
UNGATED_DOCS,listDocuments,scanFences), not by eye. Verdict line at the branch point, exit 0:24 entries, by ts/tsx block count:
packages/plugin-gantt/README.mdpackages/plugin-chatbot/README.mdpackages/auth/README.mdpackages/mobile/README.mdpackages/i18n/README.mdpackages/plugin-designer/README.mdcollaboration,layout,permissions,plugin-detail,typescore,plugin-list,react-runtime, rootREADME.mdpackages/plugin-kanban/README.mdplugin-ai,plugin-charts,plugin-editor,plugin-map,plugin-markdown,providerspackages/fields/README.mdpackages/plugin-tree/README.mdExclusions re-verified on this base, not inherited:
packages/auth/README.md—GET /repos/objectstack-ai/objectui/pulls/7685/filesre-read today: PR chore(deps): resolve @objectstack/spec at 17.3.0 in the lockfile #7685 isstate: open,draft: true, 67 files, andpackages/auth/README.mdis still among them. The hold stands.packages/plugin-gantt/README.md/packages/plugin-kanban/README.md— finding(docs): three documentedinterfaceblocks are behind their shipped types — thePARTIAL_EXCERPTSledger #6214 opened with #7302 re-read:state: open,assignee: null, labelsdocumentation/pm:queue/finding/priority:p3/domain:devx. The hold stands.packages/plugin-chatbot/README.md— deferred by dispatch; untouched.Decomposition, before any edit
The ledger's reason string was a clue, and it was wrong in two places. Measured at the base by removing the entry in memory (never on disk) and running the gate's own
analyze+compileSnippetsover the same tree:19 undefined-name diagnostic(s)plus TS1108x2 TS2345x1 TS2353x1anyon a callback parameterTotal 23 diagnostics across 9 of 9 blocks.
anyand no argument was ever checked. Once the imports are written, six documented call shapes turn out never to have existed on@object-ui/mobile:useGesture({ onSwipeLeft, onSwipeRight, onPinch })UseGestureOptionsis{ type, onGesture, threshold?, longPressDuration?, enabled? }; the callback-shaped hook isuseSpecGestureuseBreakpoint()returningcurrentbreakpoint(isAbove/isBelow/widthare also returned)useTouchTarget({ minSize: 44 })returningtargetProps{ config?: TouchTargetConfig }returning{ style, className }ResponsiveContainerwithmobile/desktoppropsminBreakpoint/maxBreakpoint/showOn/hideOn/fallback, children requiredregisterServiceWorker({ cacheStrategy })ServiceWorkerConfigis{ url?, scope?, onSuccess?, onUpdate?, onError? }; caching strategy lives in the generated worker (getServiceWorkerSource)useResponsive({ mobile, tablet, desktop })resolveResponsiveValuewalksBREAKPOINT_ORDERonly, so the documented call returnedundefinedat every breakpointNone of these is a which-side-is-wrong question, so none is refused. For each one the correct spelling already ships and is already exercised elsewhere:
useSpecGestureexists precisely to carry per-gesture callbacks,useTouchTarget's own@examplein its.d.tsspellsstyleandclassName, andBREAKPOINTS/BREAKPOINT_ORDERare the only keys the resolver reads. Repairing the page teaches the shipped surface; widening the types to match the prose would have been an unpulled capability expansion, which the startup-stage focus axis rejects by default, and a lenient consumer-side alias, which commandment #0.1 rejects outright.Coverage limit, measured rather than asserted
ResponsiveValueisTOR a partial record keyed by breakpoint name. The bare-Tbranch means any object literal type-checks as a responsive value, so wrong breakpoint keys are invisible to this gate on their own. Probe P2b below plants{ mobile, tablet, desktop }back into the repaired block with the result no longer rendered, and the gate stays GREEN. What makes P2 red is the repaired block consumingcolumnsat a narrower type — a property of the block this PR writes, not a property of the gate. Stated so the next reader does not credit the gate with catching key validity.Scope guard
UNGATED_DOCSobject literal, by removal;git diff --numstatreads0 2. Asserted programmatically, not by eye, by parsing both sides' literal and diffing:base entries: 24 | branch entries: 23,ADDED entries: [],REMOVED entries: ["packages/mobile/README.md"],SURVIVING entries whose reason text changed: [],key order preserved for survivors: true.Fence scanningbanner to end of file is identical on both sides of this diff — sha256f46b5662ba336f026bca3a0003e0b7979789d48d0291fa5760be7d23c8ed0160on859de84a0and on this branch.--build-filterclosure grew by exactly one entry,--filter=@object-ui/mobile..., and lost none.git grep -l 'packages/mobile/README.md' -- scripts/ packages/ examples/ apps/returns the gate itself andscripts/__tests__/doc-version-claims.test.ts, which pins the peer-dependency line. That line is byte-identical in this diff, and probe P5 proves the pin is live rather than assumed.packages/auth/README.md,packages/plugin-gantt,packages/plugin-kanban,packages/plugin-chatbot.Probes — predicted in writing, then observed
Every mutation proven on disk (occurrence count of the removed text and of the injected text, plus a blob hash differing from the
HEADblob); every restore proven (blob equal to theHEADblob and an emptygit diff HEAD); each run under anEXIT INT TERMtrap restoring by absolute path fromHEAD. No rebuild leg applies: none of these mutations touches a package source, and the builtdistthe gate resolves against is unchanged throughout.minWidth: 44becomesminWidth: '44'in the repaireduseTouchTargetblock[semantic] packages/mobile/README.md:208:15 TS2322: Type 'string' is not assignable to type 'number'.,487 of 487 block(s) judged, 1 failed, exit 1useResponsive, result still renderedTbranch swallows it)TS2322: Type '{ mobile: number; tablet: number; desktop: number; } OPT' is not assignable to type 'ReactNode'. The keys are caught only through the downstream use of the inferred type487 of 487 block(s) judged, 0 failed, exit 0. This is the coverage limit above, isolated486 of 486 block(s) judged, 9 failed, every base-measured code present (TS2304, TS7006, TS1108, TS2345, TS2353), exit 1203 covered … 24 ungated,635 — 477 to compile, 158 declared fragment(s), exit 0. The mutated blob equals the base blob5024e6bf9, so the ablation reproduced the base gate file byte for bytedoc-version-claims.test.ts: `packages/mobile/README.md:23 react: README says "^17.0.0check-readme-exports: 1 README import name(s) NO package exports, namingpackages/mobile/README.md:204 -- import { useTouchTargetSize } from '@object-ui/mobile'P2 is reported as observed rather than as predicted; the prediction was wrong about the mechanism and P2b was added to isolate what it was actually measuring.
Working tree verified clean after the last probe (
git status --porcelainempty).Gates
All at
50ab43b1b, exit codes captured by redirect before any pipe, each quoted from the gate's own verdict line:check:doc-snippetsEvery covered documentation snippet compiles against the built types.check:doc-fencesevery TypeScript block in 227 document(s) is fenced ts/tsx/typescript …check:doc-typesEvery documented component type is registered.check:readme-exportsOK (43 tracked README(s) … 433 of them self-imports judged (433 real, 0 wrong-path, 0 fabricated) …)check:control-bytesOK (scanned 6417 tracked text file(s); skipped 85 binary)check-doc-links.mjsLinks are valid across 17 scan roots.check:doc-example-readersOK 80 documented symbol(s), 3947 call site(s) …type-check:scriptscheck-changeset-presence.mjsNo source or published contract of a released package changed in this range, so no changeset is owed.check-governed-queue-guard.mjs --testNOT GOVERNED — 2 path(s) checked against 5 governed surface(s); none matched.A manual
grep -naPover the C0 control-byte set on both changed files returns no hits (exit 1).check:readme-exportsfirst exited 1 with 3 findings, all "its type entry./dist/index.d.tsis not on disk -- runpnpm buildfirst" forplugin-ai, none naming a file in this diff. That is the gate's own by-design precondition refusal, not a verdict about any document. Buildingplugin-aiandplugin-treeturned it into a real, green measurement — andcheck:doc-snippetswas re-taken afterwards and read identically (204 covered … 645 — 487 to compile, 158 declared fragment(s),487 of 487 … 0 failed), so the top-up build moved no figure here.Vitest from the repository root,
--maxWorkers=2, through the shared verify lock:Test Files 15 passed (15)/Tests 591 passed (591), exit 0. The suite union isgit grep -lfor the gate's file name and for the edited document, unioned — it includesscripts/__tests__/check-doc-snippet-types.test.ts,scripts/__tests__/check-readme-exports.test.tsandscripts/__tests__/doc-version-claims.test.ts, the peer-line pin discussed above.No changeset is added: the presence gate's verdict is that none is owed, and no
skip-changesetlabel is applied — that label is inert in this repository.No changeset, no queue actions
This pull request stays draft. It is not flipped ready, auto-merge is not enabled, no label and no assignee is written, and the card stays open — the ledger burn-down continues in later batches.
Follow-up filed, not ridden along
#7974 —
useSpecGesture's own@examplepasses a scalarswipe.directionwhere the declared type is an array, and the implementation carries the lenient cast that hides it. Seen while reading@object-ui/mobile's built types for this repair; out of this pull request's two-file surface, so it is filed unassigned and unlabelled for triage. Deduplicated against the round-R44 open-issue snapshot plus one targeted search, with a known-hit control query run in the same session so the empty result is a reading rather than a silent zero.Next takeable, measured on this branch
After this batch the ledger's largest takeable entries tie at 8 blocks:
packages/plugin-designer/README.mdpackages/i18n/README.mdUnder batch 12's tie-break — larger measured debt wins — that is
plugin-designer. Flagged rather than assumed: the tie-break rule reads "ties broken by measured debt" without a direction, and both numbers are given so the next dispatch can price it either way.Generated by Claude Code