Skip to content

refactor(rpc): unify naming across loaders, actions, sockets, realtime#175

Merged
sbesh91 merged 1 commit into
mainfrom
worktree-rpc-naming-unify
Jun 24, 2026
Merged

refactor(rpc): unify naming across loaders, actions, sockets, realtime#175
sbesh91 merged 1 commit into
mainfrom
worktree-rpc-naming-unify

Conversation

@sbesh91

@sbesh91 sbesh91 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

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

Rename Visibility Released?
ActionStubActionRef (matches LoaderRef/SocketRef/RoomRef) public yes → v0.8 breaking
option bags → full Options: UseSocketOptions, UseRoomOptions, ReconnectOptions, LiveLoaderOptions (+ private Define*Options, LoaderSchemaOptions, StubOptions, Params/SearchFromOptions, DenyOptions, KeyOption, readParamsOption) public unreleased + private no
subscribeActionResultssubscribeLastActionResult (get/set/clear/subscribe parity) iso-internal no
FieldErrorProps_AriaFieldErrorAriaProps (drop one-off underscore; keep "Error") private no
RouteServerRouteBinder (breaks the RouteServer/ServerRoute/serverRoute triad) public yes → v0.8 breaking
page-action-handler.tspage-actions-handler.ts (+ pageActionsHandler, PageActionsHandlerOptions); plural alignment with loaders/sockets/rooms dispatchers private no
presence registry joinRoom/leaveRoom/roomMembersjoinPresence/leavePresence/presenceMembers (resolves the function-name-says-room / param-says-topic contradiction; matches the transport adapter) iso-internal no

ActionStub and RouteServer were public at v0.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 *Opts renames 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)

LoaderCtx vs ServerLoaderCtx · SocketDef/RoomDef vs LoaderEntry/ActionEntry · upgradeWebSocket/WebSocketUpgrader · Channel/Topic/Room · ServerSocket vs RoomConnection · the public *Result family · ActionResultContext's full "Context" · publish · myId (a block-const definite-string across an await; 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

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>
@github-actions

Copy link
Copy Markdown
Contributor

Framework JS size

Framework runtime (gzip)

core is the base bundle; each feature is the extra it adds on top of core.

Feature Size Δ vs base
core 4.0 KB
loaders 5.7 KB
actions 5.3 KB -1 B
transitions 1.0 KB
prefetch 3.1 KB
streaming 42 B
head 130 B
middleware 183 B

Components (gzip)

ui-core is the shared primitives; each component is the extra it adds on top.

Component Size Δ vs base
ui-core 1.4 KB
dialog 947 B
popover 9.2 KB
tooltip 9.4 KB
menu 12.2 KB
context-menu 12.1 KB
select 11.1 KB
combobox 12.6 KB
toast 3.5 KB

Measured db4c28ad9 · 2026-06-24T00:28:55Z · run

@github-actions

Copy link
Copy Markdown
Contributor

Docs site preview

A non-production preview of this PR, deployed to a dedicated preview worker (not the live framework.sbesh.com site):

https://hono-preact-preview.s-beshensky.workers.dev

Built from db4c28a. Updates on every push.

@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse

/

LCP 1244 ms · TBT 0 ms · CLS 0

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 sbesh91 merged commit 7c32718 into main Jun 24, 2026
5 checks passed
@sbesh91 sbesh91 deleted the worktree-rpc-naming-unify branch June 24, 2026 09:45
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>
Sign up for free to 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.

1 participant