docs(website): client extension slots, and the client half is one slice (phase 3, slice 2) #137
Reference in New Issue
Block a user
No description provided.
Delete Branch "docs/module-client-slots"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Docs for
website#138. Stacked on docs#136 — merge that one first and this diff reduces to its own two commits.The slice table changes shape
Surveying the client half turned up two things, and one org-lead decision that makes them the same piece of work.
The client half does not divide into public and admin after all. Routes slice by area, but
lib/useShardFeed.jsandlib/shardEvents.jsare imported by eight public pages and three admin views — and a shared leaf moves with its last consumer, the same rule the server half taught. Of the three ways out (the module vendors a copy for one slice; public keeps only the four pages that never touch the live feed; the two slices become one), the first two trade a real cost for a boundary that lasts one review. The client half is one slice.Two separately-tabled items fold into it as a consequence, both improvements:
featuregates resolved byuseShardFlagsunder namespaceuo. Since resolution is by the registering module, rows that moved without their provider would resolve against a namespace nothing answers for — and everything fails open, so nine rows an operator may have disabled or gated to staff would advertise themselves again for the length of a slice.useShardFeatures.jsalready says as much in its own closing comment.VendorSaleswas tabled with the public pages and has no public consumer at all. Its three areAdminCharacters,PlayerCharactersand core's ownUserDetail.Which is the next finding
UserDetail.jsxrenders a core header, core'sSecurityAdmin, then six UO sections. The server half already had somewhere to put that — Phase 2 PR 4 declaredadmin.users.detailand moved the six/admin/users/:id/shard/*routes behind it. The client never got the twin.SiteFooter's link to a URL the extraction deletes is the same gap one component over.So slice 2 is core-only and adds rather than moves: client extension slots (new API §3.7), the
site.footer.statusandadmin.users.detailslots, core filling both itself.MODULE_API_VERSION→ 1.2.0, both halves.Two decisions, settled with the org lead:
registerExtensionbefore the function exists. Harmless because the slice only adds, and core fills both slots with its own components under owner idcore.What the browser changed about the contract
The contract as first written had core branch on
hasExtensionto decide about its own decoration around a slot. That is right when nothing is installed and wrong when something is installed and fails: the slot is filled, so the separator renders, and the component then throws into the boundary and leaves the separator behind on its own. Core decorates through<Slot wrap>now, inside the boundary, andhasExtensionis gone rather than kept as a trap for the next caller.Every unit test passed both before and after — the §7.7 browser smoke is what saw it. Second time that smoke has caught something no test in either repo can.
Also recorded, neither a defect: core's own fill occupies a slot, so a module cannot fill either one until the client half deletes core's (worth stating — a module written against 1.2.0 today cannot use them); and core's UO sections on the user-detail page now fail to load, which is slice 1 removing the routes rather than anything this slice did.
AI disclosure
Written with Claude Code.
Co-Authored-By: Claude noreply@anthropic.com