Skip to content

Swimlane view: compare streams side by side in the browser#1957

Merged
pjurewicz merged 3 commits into
masterfrom
browser-swimlane-builtin
Jul 23, 2026
Merged

Swimlane view: compare streams side by side in the browser#1957
pjurewicz merged 3 commits into
masterfrom
browser-swimlane-builtin

Conversation

@pjurewicz

Copy link
Copy Markdown
Contributor

Supersedes #1955 — same feature, but built directly into ruby_event_store-browser instead of shipping as a ruby_event_store-browser-swimlane contrib gem. Zero configuration: mount the browser and it's there.

What it does

A swimlane view comparing several streams side by side: their events merged into one newest-first timeline table, one column per stream, with infinite scroll and a created-at/valid-at sort toggle. An event linked into several compared streams renders once, as a link in each matching column. Streams can be added and removed from the comparison in place; every non-global stream page links to its swimlane view.

How it reads

Each page is composed from existing single-stream reads — one time-ordered read per compared stream, k-way merged by event time. Count is the read depth per stream, not the page size: a page emits everything above the completeness horizon (the highest chunk end among the streams whose read was cut), so nothing provably complete is thrown away. The shared cursor is that horizon timestamp and the next page asks for strictly older events — nothing is dropped or repeated.

Browser changes

  • GET /swimlane and GET /swimlane/more served by App, views under views/swimlane, url builders on Urls, Stimulus controllers in the main js bundle.
  • The browser extension API (register_routes, stream_links, stylesheets, scripts, json/partial responses) introduced earlier in this branch stays — the swimlane no longer consumes it, but extensions can.
  • New Urls and App code is mutation-covered.

A browser extension comparing several streams side by side: their
events merged into one newest-first timeline table, one column per
stream, with infinite scroll and a created-at/valid-at sort toggle. An
event linked into several compared streams renders once, as a link in
each matching column.

Each page is composed from existing single-stream reads - one time
ordered read per compared stream, k-way merged by event time. Count is
the read depth per stream, not the page size: a page emits everything
above the completeness horizon (the highest chunk end among the
streams whose read was cut), so nothing provably complete is thrown
away. The shared cursor is that horizon timestamp and the next page
asks for strictly older events - nothing is dropped or repeated.

Built entirely on the browser extension API: routes and json responses
via register_routes, an entry link via stream_links, its own stimulus
controllers via scripts.
The feature moves from the ruby_event_store-browser-swimlane contrib
gem into ruby_event_store-browser itself, available out of the box
with no configuration. The /swimlane and /swimlane/more routes are
served by App, the views live under views/swimlane, the url builders
on Urls, the stimulus controllers ship in the main js bundle and the
stream page always offers a Streamline entry link, followed by any
extension-contributed links.

The extension API stays intact - only its swimlane consumer is gone,
together with the contrib gem and its CI workflows. Specs follow into
the browser suite; new Urls and App subjects are mutation-covered.
@pjurewicz
pjurewicz force-pushed the browser-swimlane-builtin branch from d51f99b to ce6b542 Compare July 22, 2026 16:52
@pjurewicz
pjurewicz marked this pull request as ready for review July 22, 2026 16:52
@pjurewicz
pjurewicz merged commit ffc4415 into master Jul 23, 2026
54 checks passed
@pjurewicz
pjurewicz deleted the browser-swimlane-builtin branch July 23, 2026 07:59
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