refactor(rpc): unify naming across loaders, actions, sockets, realtime#175
Merged
Conversation
Converge the RPC layer on consistent naming conventions surfaced by a full-surface audit of loaders/actions/sockets/realtime: - ActionStub -> ActionRef (matches LoaderRef/SocketRef/RoomRef) - option bags converge on the full word "Options": UseSocketOptions, UseRoomOptions, ReconnectOptions, LiveLoaderOptions, plus the private Define*Options/LoaderSchemaOptions/StubOptions/Params|SearchFromOptions/ DenyOptions/KeyOption/readParamsOption - subscribeActionResults -> subscribeLastActionResult (get/set/clear/subscribe parity) - FieldErrorProps_Aria -> FieldErrorAriaProps (drop the one-off underscore) - RouteServer -> RouteBinder (break the RouteServer/ServerRoute/serverRoute triad) - page-action-handler -> page-actions-handler (file + pageActionsHandler factory + PageActionsHandlerOptions); plural alignment with the loaders/sockets/rooms dispatchers - presence registry joinRoom/leaveRoom/roomMembers -> joinPresence/leavePresence/ presenceMembers (resolves the room-name vs topic-param contradiction) ActionStub and RouteServer were public at v0.7.0, so both are recorded as v0.8 breaking changes (no back-compat alias, matching the pre-1.0 pattern). Every public *Opts rename is unreleased v0.8 surface, so it simply ships under the unified spelling. Load-bearing distinctions (LoaderCtx vs ServerLoaderCtx, *Def vs *Entry, upgradeWebSocket, Channel/Topic/Room, the public *Result family, ActionResultContext's full "Context") were deliberately preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Framework JS sizeFramework runtime (gzip)
Components (gzip)
Measured |
Contributor
Docs site previewA non-production preview of this PR, deployed to a dedicated preview worker (not the live https://hono-preact-preview.s-beshensky.workers.dev Built from db4c28a. Updates on every push. |
Contributor
Lighthouse
|
| Category | Score | Δ vs base |
|---|---|---|
| Performance | 100/100 | — |
| Accessibility | 89/100 | — |
| Best Practices | 100/100 | — |
| SEO | 91/100 | — |
/docs/quick-start
LCP 937 ms · TBT 21 ms · CLS 0
| Category | Score | Δ vs base |
|---|---|---|
| Performance | 100/100 | — |
| Accessibility | 91/100 | — |
| Best Practices | 100/100 | — |
| SEO | 82/100 | — |
/demo
LCP 1088 ms · TBT 0 ms · CLS 0
| Category | Score | Δ vs base |
|---|---|---|
| Performance | 100/100 | — |
| Accessibility | 88/100 | — |
| Best Practices | 100/100 | — |
| SEO | 82/100 | — |
Measured db4c28ad9 · 2026-06-24T00:30:52Z · run
sbesh91
added a commit
that referenced
this pull request
Jun 24, 2026
Re-review at HEAD against the realtime + Standard Schema surface and the #175 renames surfaced 28 adversarially-verified drift findings; this fixes all of them. - structure.mdx: drop the non-existent `location` server export (public server barrel is renderPage + HonoContext/useHonoContext only) and the `location` middleware mention in the generated-entry description - actions.mdx: type useAction().data and the mutate result as Serialize<T> - middleware.mdx: use: requireSession (not [requireSession]; the array is not flattened, so the nested form breaks) - quick-start.mdx: reference the generated client entry, not iso.tsx - streaming.mdx: correct the action curl JSON body (module/action/payload) and the loader curl URL (tasks/:taskId, not the retired issues/:issueId) - demo/index.tsx: /docs/guards -> /docs/middleware (no guards page exists) - AGENTS.md: list serverRooms/serverSockets as allowed server exports - README (root + hono-preact): pin preact-iso to the v3 github ref, pass the required adapter to honoPreact(), correct the /server subpath and the version line - hono-middleware.mdx: document the reserved GET /__sockets endpoint - realtime.mdx: document the liveLoader `use` option - components/index.mdx: link the shipped overlay pages, drop the "as each component ships" caveat - routes.mdx: document serverRoutes/routeUse on RoutesManifest - use-position.mdx: document placementFor and sideAlignFromPlacement - rooms.mdx / index.mdx: minor accuracy fixes All eight pre-push CI checks pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Unifies naming conventions across the RPC layer (loaders, actions, sockets, realtime), driven by a full-surface audit that cataloged 632 symbols and was adversarially reviewed for false-unification and breaking-change accounting. The bias was fewer, higher-value renames over a maximalist sweep, with load-bearing distinctions deliberately preserved.
55 files, +281/−242.
Renames
ActionStub→ActionRef(matchesLoaderRef/SocketRef/RoomRef)Options:UseSocketOptions,UseRoomOptions,ReconnectOptions,LiveLoaderOptions(+ privateDefine*Options,LoaderSchemaOptions,StubOptions,Params/SearchFromOptions,DenyOptions,KeyOption,readParamsOption)subscribeActionResults→subscribeLastActionResult(get/set/clear/subscribe parity)FieldErrorProps_Aria→FieldErrorAriaProps(drop one-off underscore; keep "Error")RouteServer→RouteBinder(breaks theRouteServer/ServerRoute/serverRoutetriad)page-action-handler.ts→page-actions-handler.ts(+pageActionsHandler,PageActionsHandlerOptions); plural alignment with loaders/sockets/rooms dispatchersjoinRoom/leaveRoom/roomMembers→joinPresence/leavePresence/presenceMembers(resolves the function-name-says-room / param-says-topic contradiction; matches the transport adapter)ActionStubandRouteServerwere public atv0.7.0, so both are recorded as v0.8 breaking changes with no back-compat alias (matching the project's pre-1.0 pattern). The public*Optsrenames are all unreleased v0.8 surface, so they simply ship under the unified spelling. The v0.8 release-notes ledger is updated accordingly.Deliberately preserved (load-bearing, not surface inconsistency)
LoaderCtxvsServerLoaderCtx·SocketDef/RoomDefvsLoaderEntry/ActionEntry·upgradeWebSocket/WebSocketUpgrader·Channel/Topic/Room·ServerSocketvsRoomConnection· the public*Resultfamily ·ActionResultContext's full "Context" ·publish·myId(a block-constdefinite-stringacross anawait; collapsing it would force a non-null cast).Verification
Full pre-push CI sequence, all green: build ·
gen:agents-corpus·format:check·typecheck·test:types(12) · unit 2002/2002 ·test:integration(10) · site build. Zero straggler references in production code, active docs, or the shipped corpus.🤖 Generated with Claude Code