← 输入框|github.com|刷新
Skip to content

Refactor: Plain names in core, the first pass for the legibility review - #14

Open
jlukic wants to merge 20 commits into
mainfrom
refactor/plain-names
Open

jlukic wants to merge 20 commits into
mainfrom
refactor/plain-names

Conversation

@jlukic

@jlukic jlukic commented Nov 5, 2026

Copy link
Copy Markdown
Member

The first pass at plain names in core, one change per commit so any one can be dropped. Every name here is provisional: the plain-speaking pass has the final word, and this is the list for it to audit, not the audit.

The method is the literal action: who acts, on what, said in the plainest words, and the name is that sentence shortened. The start list is the verified items from the pocketed legibility report plus two words the naming law names outright.

Names

was now the literal action where
matched.currentRoutes matched.chain one array had two names, and the page's word for it is chain router, can-access, preload-intent
afterCommit(work, event, false) afterCommit(work, event, { precommitRan: false }) a bare boolean at the callsite says nothing router, navigator
router.activeAbort router.initialAbort the AbortController of the initial navigation, the one the platform fires no event for, and of no other router
landNotFound applyNotFound writes the page, settles the routes and renders, what applyCascade does for a matched navigation router
navigator.project() navigator.readPlatform() reads the platform's current entry, entries and activation onto the navigator navigator
cellFor defineCell defines a field backed by a cell and returns nothing, where every other *For builds and returns reactive-router
bagFor hookContext builds the context a hook sees reactive-router
land applyAnswer runs a hook's later answer through its consequence reactive-router
identityRun stopIdentity the dispose of the identity reaction, so calling it stops it reactive-router
lifetime abortController the router's own life, the noun a route already uses for its own reactive-router
settling toldRoutes the set of routes told during this settle, which read as a flag reactive-router
born, adopt, adopted untaken, takeRuns, taken a run the navigation in flight made, which no route has taken yet, and at settle the route takes the runs made for it reactive-router
told (local) update the function is the view's update dom plugin
framed (local) hasSlice whether the route has a slice on the page route

The born record { route, run, adopted, changed, latest } wrapped a run; it is folded into the run itself, so the list and its items are not the same word and there is one record per run. That is the one change here that is not a rename alone.

Structure, from the same report

  • The leave blockers in confirm-leave were two each loops over a blocked flag; they are one some over the chain and one over the guards.
  • The comment on merging slices behind per-key getters sat above liveContext, stacked on that method's own; it is on dataFor now.
  • The Solid example's link called (props.under ? isActive : isCurrent)(...); it calls each by name through an accessor.
  • The three nits from chore/route-defaults ride along as the first commits, so that branch can be deleted.

Left out on purpose

  • Comments, apart from the ones that named a renamed thing: the end pass.
  • The utils idioms (keys, last, isNode): ruled, a native where utils has a word is not a finding here.
  • The errors machinery: logError is the one seam on purpose, and the rest is bytes.
  • The specificity weights and the cache and hop numbers as statics: property names survive minification, so that is a bytes call.
  • slotDeclaredBelow stays, since declared is the word the explicit-empty rule needs. identityFresh stays as the one word left that is not quite literal: the answer no navigation has taken yet.
  • The seam guide's born-and-adopt paragraph is untouched; it goes with the guide.

Proof

The probes run against main's router and this branch's, from a worktree linked absolutely and shown live, and their output is identical line for line: the store probe, the three core seam probes, the plain and override jsdom probes, and the door and live Solid probes under jsdom with the real solid-js. The runs probe's table, runs per cause at the slice seam, is identical too; its timing tail is stale and fails the same way on both trees.

bundle main this branch
core, utils bundled 11,888 11,895
scaffold, deps external 1,828 1,809
confirm-leave, utils bundled 2,262 2,257
dom, utils bundled 1,403 1,403

Core is up seven bytes: the precommitRan key survives minification and three names grew a character or so. If the headline says no, that commit drops alone. The scaffold is down nineteen from the fold.

jlukic added 20 commits November 5, 2026 16:31
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