Skip to content

docs(browser-navigation): add a Scenarios section to the SPEC - #52

Open
ivanbanov wants to merge 1 commit into
mainfrom
docs/navigation-spec-scenarios
Open

docs(browser-navigation): add a Scenarios section to the SPEC#52
ivanbanov wants to merge 1 commit into
mainfrom
docs/navigation-spec-scenarios

Conversation

@ivanbanov

Copy link
Copy Markdown
Member

What

Adds a ## Scenarios section to packages/dom/utils/navigation/SPEC.md (between ### Reload and ## API): 26 compact traces of interceptBackNavigation / watchSpentEntry behavior, grouped into one layer · release and consumption · forward, claims, reload · stacked layers · timing edges. Ships with the package (SPEC.md is in files), so a patch changeset rides along.

Why

The behavior contract was complete but stated one mechanism per prose bullet — nothing let a reader replay a concrete flow end to end. The scenarios are replayable episodes in the module's own vocabulary (arm, release, Back, Forward); the preamble defines release as a close the module didn't cause (external, imperative, or similar), keeping caller vocabulary like Escape out of this spec — that mapping belongs to the layer that owns the key.

Two outcomes the prose left implicit are now stated outright:

  • a deliberately released entry absorbs one Forward press — it can't be deleted, only left to soak the traversal;
  • any re-plant (a new layer, or a veto's re-arm) truncates every parked Forward watch above it.

🤖 Generated with Claude Code

26 compact traces of the guard's behavior — one layer, release and
consumption, forward/claims/reload, stacked layers, timing edges — each
replayable end to end in the module's own vocabulary (arm, release, Back,
Forward). States outright two outcomes the prose only implied: an
abandoned entry absorbs one Forward press, and any re-plant truncates
every parked watch above it.

Co-Authored-By: Claude Fable 5 <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