swimline view#1949
Draft
pjurewicz wants to merge 2 commits into
Draft
Conversation
From a stream's page other streams can be added for comparison and their events show up merged into one newest-first timeline table, one column per stream, with infinite scroll. The data layer composes each page in the browser gem from existing single-stream reads: one as_at read per compared stream, k-way merged by event time. The shared cursor is a timestamp and pages never split a group of events sharing one - a page runs to the end of its last timestamp (so it can be a little longer than the nominal count), which lets the next page ask for strictly older events with nothing dropped or repeated. An event linked into several compared streams is one row with a link in each matching column; lanes come from which streams' pages contained the event, so no extra membership queries are needed. Fix the in-memory repository applying limit before time filters, unlike the SQL adapters where WHERE precedes LIMIT - the combination is what this pagination relies on. Pin the ordering with a shared lint example. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pjurewicz
force-pushed
the
hotwire-browser-compare-streams
branch
from
July 17, 2026 09:08
f793cdd to
cb260d0
Compare
The timeline can now be ordered by either axis of the bi-temporal model: created-at (as_at, the default) or valid-at (as_of), toggled with a link in the header and carried through the compare and compare/more urls. The reader keeps one axis end to end: per-stream reads, the merge key, the cursor comparisons and the group-draining between(t..t) all follow the chosen sort, and the time column displays that axis so it stays monotonic. Unknown sort values fall back to the default.
pjurewicz
force-pushed
the
hotwire-browser-compare-streams
branch
from
July 17, 2026 12:02
04ff5c0 to
f182ad0
Compare
2 tasks
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
ruby_event_store-browser: from a stream's page you can add other streams and see their events merged into one newest-first timeline table, one column per stream, with infinite scroll. An event linked into several compared streams renders once, as a link in each matching column.as_atorder and the per-stream pages are k-way merged by event time, so the merge inputs are sorted by the merge key and the result is correct also for linked events and custom timestamps.as_at, default) or valid-at (as_of), toggled in the header. The whole pipeline — per-stream reads, merge key, cursor comparisons, group draining and the displayed time column — follows the chosen axis.between(t..t)when the per-stream page got cut exactly there), so the next page asks for strictly older events and nothing is dropped or repeated. Pages can therefore be a little longer than the nominal count — and a mass of identical timestamps (e.g. a backfill with second precision) renders as one long page.limitbefore the time filters, unlike the SQL adapters whereWHEREprecedesLIMIT—limit+older_thanis exactly the combination this pagination relies on. A shared lint example pins the ordering for all adapters.Test plan
ruby_event_storesuite (incl. the new limit-vs-time-filter lint example) — greenruby_event_store-active_record,contrib/ruby_event_store-sequel,contrib/ruby_event_store-romsuites — green (no adapter changes; lint example passes everywhere)ruby_event_store-browsersuite incl. compare view, JSON endpoint, UI/Capybara — green🤖 Generated with Claude Code