Repository navigation
To facilitate re-frame-pair - #423
Merged
Merged
Conversation
…e strings The six public-event constants (load-epoch, most-recent-epoch, previous-epoch, next-epoch, reset-event, replay-event) were CLJS keywords. Their ^:export tag emitted them onto goog.global, but a pure-JS caller probing day8.re_frame_10x.public.load_epoch got back a cljs.core.Keyword object — the un-suffixed value is not constructable from raw JS without going through cljs.core.keyword. The ^:export tag hinted "JS-reachable" but the values were not JS-friendly. Switch each constant to its fully-qualified string form (e.g. "day8.re-frame-10x.public/load-epoch"). Strings are universally JS-constructable, so a JS caller can either read the exported var or build the same string literal from scratch. Internal handlers stay registered against the namespaced keywords; dispatch! now keywordises a string head before forwarding so the inlined router's handler-lookup still matches. Updates Consumer-Integration.md with both the new value column and a JS example that uses the exported var directly. Bumps the mutation-event-kw-constants test to assert string?, adds a dispatch-bang-coerces-string-head-to-keyword test, and updates the inlined-router direct-dispatch tests in public_navigation_test to keywordise the var inline (they bypass dispatch! to test handler behaviour). api-version is unchanged at 1 — the documented contract (use the var as the event-vec head, route via dispatch!) is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Vestigial — every `re-frame.X/foo` reference in this file's body has been gone for years (the body uses `rf/...` exclusively, where `rf` aliases the inlined-deps copy). Removing the dead `:require`s shrinks the surface area where 10x's source visibly reaches into userland re-frame, leaving only the integration points where the crossing is actually load-bearing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
navigation/epochs/events.cljs and panels/app_db/views.cljs already made every cross-boundary require visible by aliasing userland re-frame under the userland.re-frame[.X] prefix; do the same for the four other src/ files that legitimately reach across (navigation/views, fx/trace, panels/app_db/events, plus the lone bare [re-frame.trace] in navigation/epochs/events). After this pass, every userland reference in 10x's source — read or write — is visually distinguishable from inlined-deps re-frame at the call site, so a reader of any single file can identify the integration boundary without cross-referencing require lists. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ndary The previous comment named only navigation/epochs/events.cljs as the file requiring userland re-frame and framed the dep declaration as a plumbing detail of the test build. In reality five src/day8/re_frame_10x/* files reach into userland — register handlers users can dispatch, intercept the userland trace stream, reset the userland app-db for time-travel — and a sixth (the reagent monkey-patch layer under src/day8/reagent/impl/) lives entirely in userland reagent by construction. Spelling that out makes the deps below readable as "the integration boundary the test build has to resolve" rather than as "10x's own internal pipeline reaching into userland", which the prior comment text invited (see rf1-280's framing of the issue). The note also documents the `userland.re-frame[.X]` aliasing convention that the prior two commits applied across every crossing in src/day8/re_frame_10x/*, so future contributors adding a userland reference know what to alias and why grep-ability matters. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add direct tests for nil, empty, missing, and multi-entry match-info conversion through the public epoch helper. Cover partial cold-start epoch state and relax the public epoch shape assertion so additive keys remain forward-compatible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Rename reset/replay public mutation identifiers to reset-epochs and replay-epoch so all exported event constants use the acted-on epoch suffix convention. Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
rf1-ltu Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Refs rf1-0k0 Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Refs: rf1-m7o Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
- Public ns: add a WHY comment above the inlined-rf requires so a future contributor doesn't 'clean up' the version-slugged require to user re-frame and silently break every mutation event. The inlined router is the only place 10x's events are registered. - most-recent-epoch docstring: spell out the load-bearing case where app-db-follows-events? is true and load-epoch has overwritten userland; without this dispatch, no other public mutation event combines cursor-to-tail with an app-db reset. - public_navigation_test: rewrite the misleading 'flush by firing the internal event' comment in three tests. The follow-up dispatch is not a flush — dispatch-sync of the forwarder doesn't drain its :dispatch fx, and these tests verify cursor mechanics, not the forwarder→internal :dispatch edge. Point at reset-app-db-event-resets-userland-app-db-without-moving-cursor as the test that does cover that edge via :fx :dispatch interception. Bead Q1 (the reset!-event/replay-event docstring typo) was already resolved by rf1-u2c when the public mutation event suffixes were unified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- New `day8.re-frame-10x.public.events` ns: holds the 7 reg-event-fx / reg-event-db blocks plus the 3 helpers they consume (no-op-fx, second-newest-match-id, previous-epoch-fx). Required from public.cljs with no alias so registrations fire at namespace-load time without inviting consumer access. - public.cljs is now exclusively the documented surface: ns docstring, versioning, read API, mutation API event-id strings, dispatch! bridge, and the goog.global mirror block. The nav.events alias drops out with the registrations that used it. - Handlers register against explicit `:day8.re-frame-10x.public/...` keywords rather than `::short-name`, so the sibling ns name no longer silently determines the registered handler key. The keyword is the keyword form of each public string identifier in public.cljs; end-to-end tests in public_test.cljs and public_navigation_test.cljs gate drift between the two. - previous-epoch-fx is `defn` (testable) in the new ns rather than `defn-` reached via `#'`. The discipline-smell the audit flagged was the inconsistency: a defn- the test deliberately reaches into. With the helper now living in an internal ns, exposing it as defn carries no consumer-access concern (consumers must not reach into public.events at all). The test calls it directly. - public.cljs's docstring gains a NAMESPACE DISCIPLINE section so a new contributor adding a public-surface entry has a rule to apply: ^:export + public_test.cljs coverage; registrations go in public.events; reach-around tests need a documented why. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ntradiction (rf1-bw6) The ns carried ^:experimental but the docstring opened "Stable public surface", contradicting the spec at companion-re-frame-10x.md §A2 (line 227). Take spec-option (a): keep ^:experimental on the ns, add it to every public defn, and rewrite the docstring opener to "Experimental". A new STABILITY section explains the gate (released re-frame-pair JAR) and how the markers come off in one sweep when met; NAMESPACE DISCIPLINE updated so new entries inherit the requirement. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…(rf1-4zb) The mutation surface previously routed every public event through three layers — public string const, public-side reg-event-fx forwarder, and internal handler — for what is mechanically a kw-translation table. Twelve reg-event-fx forwarder bodies plus two router hops collapse to a six-entry private map and a single translation step inside dispatch!. The public string identifiers stay durable; internal kws move to the RHS of the table where they can rename without touching the public contract. ::previous-epoch keeps its forwarder because its no-op cond gating around oldest-match and live-tail is load-bearing and lives outside ::nav.events/previous (rf1-p1v owns moving it inside). Tests update accordingly: navigation tests now drive map-routed events through public/dispatch! rather than dispatching the public kw straight to the inlined router (which after this change has no handler for those public kws). The export-metadata helper learns to skip ^:private defs so the new translation map can live in public.cljs without tripping the every-public-def-is-exported gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… (rf1-mo0) The ns docstring in src/day8/re_frame_10x/public.cljs was organised as 'Resolves the rf1-jum companion-bead's five open questions: Q1 ... Q5 ...'. That structure was an artifact of how the surface came to be, not a structure that helps a consumer understand the API: a future reader has no rf1-jum bead context, so the Q-numbering is out-of-band documentation that has to be hand-maintained when symbols change (cf. the Q2 enumeration drift in 5cf3e9d/f24482e/rf1-euz). The Q4 paragraph in particular described a *missing* feature (lifecycle hooks deferred until rf-ybv lands) that is project-management context, not API contract. Reorganise the body of the docstring around the same section comments the file already uses internally (Versioning + feature detection / Read API — epochs / Read API — traces / Read API — settings / Mutation API / Compatibility) so the surface's discoverable documentation (IDE hover, cljdoc, grep) is keyed on what the API *offers* rather than on numbered answers to forgotten questions. Drop Q1 (namespace-name justification — the namespace IS the namespace) and Q4 (deferred-feature placeholder). Preserve every load-bearing contract — the no-inlined-rf-version-slug-leak invariant moves to COMPATIBILITY where it stands as a contract on its own merits, the event-keyword pattern + dispatch! bridge rationale stays under MUTATION API. The ^:export contract gets called out under COMPATIBILITY (for consumers) and the contributor-side rules stay in NAMESPACE DISCIPLINE (for contributors) with a one-liner pointing at COMPATIBILITY for the contract. Update the in-source '(see Q2 in the ns docstring)' comment in the :require block to '(see MUTATION API in the ns docstring)' so the cross-reference stays valid after the restructure. JVM suite (5 tests / 31 assertions) and cljs suite (33 tests / 104 assertions) both pass. The :public-advanced probe still resolves all 19 ^:export vars on goog.global after the docstring restructure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rf1-jf6m
GitHub Actions retired the ubuntu-20.04 runner image (actions/runner-images#9170). Five recent CI runs queued forever waiting for an image that no longer exists; the oldest had been queued 16+ hours when this commit was authored. Tests run inside the ghcr.io/day8/chrome-56:2 container regardless of host runner, so the bump only changes which runner images GitHub considers eligible to schedule the job. Matches re-com's CI workflow, which already uses ubuntu-24.04. Closes rf1-8bqy
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
Bundles the recent local work in
re-frame-10xfor review.Commit Range
origin/master37Recent Commits
Validation