Fix live-tail Load New Events not rendering the new row until reload - #665
Merged
Joseph Schick (jschick04) merged 1 commit intoJul 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a Fluxor nested-dispatch ordering issue where “Load New Events” (and continuously-update live tail) would clear the new-event counter but not render the newly ingested rows until a full reload, by separating “ingest raw events” from “rebuild display views” into distinct queued actions/effects.
Changes:
- Introduces
RebuildDisplayViewsActionand a newHandleRebuildDisplayViewseffect that rebuilds views after raw ingest reducers have applied. - Updates the live-tail and buffered “Load New Events” producers to dispatch
IngestRawEventsActionfollowed byRebuildDisplayViewsAction, with buffer clearing moved to the continuation. - Refactors/adds tests to simulate Fluxor’s queued nested-dispatch behavior and adds regressions for ordering, interleaving, and clear-on-throw behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Unit/EventLogExpert.Runtime.Tests/EventLog/EffectsTests.cs | Updates/extends tests to be queue-faithful and adds regressions for the stale-read/live-tail lag scenario. |
| src/EventLogExpert.Runtime/EventLog/RebuildDisplayViewsAction.cs | Adds a new internal action to trigger post-ingest display rebuilds. |
| src/EventLogExpert.Runtime/EventLog/LogReloadEffects.cs | Adds HandleRebuildDisplayViews effect and routes buffered “Load New Events” through the new continuation. |
| src/EventLogExpert.Runtime/EventLog/FilteringEffects.cs | Updates continuously-update live-tail path to queue the rebuild action after ingest (no same-effect stale reads). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Joseph Schick (jschick04)
force-pushed
the
jschick/fix-livetail-load-new-events
branch
from
July 23, 2026 22:05
5d4694f to
b5858b0
Compare
LogReloadEffects.ProcessNewEventBuffer and FilteringEffects.HandleAddEvent dispatched IngestRawEventsAction and then read _rawEventStore.Value in the same effect to build the display view. Fluxor 6.10.0 queues nested dispatches, so that read saw the pre-ingest store: the rebuilt view omitted the new event while the buffer count was cleared regardless. The row only appeared after a full reload, which uses reducer-before-effect ordering. Move the display rebuild into a dedicated continuation effect, HandleRebuildDisplayViews, keyed off a new effect-only RebuildDisplayViewsAction. Both producers now dispatch IngestRawEventsAction then RebuildDisplayViewsAction; Fluxor drains the ingest reducer before the continuation runs, so the rebuild reads the post-ingest store. Check the raw store for the log before filtering, so a concurrently-closed log is skipped without running (or throwing from) the filter. Make new-event buffering atomic to close a flush race. Buffering now happens in a ReduceAddEvent reducer that prepends against the current state, and a completed flush consumes only its captured snapshot by reference identity (NewEventBufferConsumedAction) rather than clearing the whole buffer. This keeps an event a watcher buffers during a flush from being dropped or from resurrecting an already-flushed event, and removes the old whole-buffer EventBufferedAction. Replace the inline-ingest test mocks that masked the bug with a queue-faithful drain harness, and add regression, interleaving, resurrection-ordering, clear-on-throw, and reference-identity coverage.
Joseph Schick (jschick04)
force-pushed
the
jschick/fix-livetail-load-new-events
branch
from
July 23, 2026 22:27
b5858b0 to
9475d99
Compare
Joseph Schick (jschick04)
marked this pull request as ready for review
July 23, 2026 22:39
Joseph Schick (jschick04)
deleted the
jschick/fix-livetail-load-new-events
branch
July 23, 2026 22:45
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.
Problem
Open a log, let the watcher buffer a new event (status bar shows "New Events: 1", continuously-update OFF), then click View > Load New Events. The count clears but the new row does not appear until a full log reload.
Root cause
LogReloadEffects.ProcessNewEventBuffer(andFilteringEffects.HandleAddEventon the continuously-update path) dispatchedIngestRawEventsActionand then read_rawEventStore.Valuein the same effect to build the display view. Fluxor 6.10.0 queues nested dispatches, so that read saw the pre-ingest store: the rebuilt view omitted the new event while the buffer count was cleared regardless. A full reload worked only because it uses reducer-before-effect ordering.Fix
RebuildDisplayViewsAction(NewEventsByLog, ClearNewEventBuffer).IngestRawEventsActionthenRebuildDisplayViewsAction. Fluxor drains the ingest reducer before the newHandleRebuildDisplayViewseffect runs, so the rebuild reads the post-ingest store.Tests
CaptureDispatchQueue+DrainDispatchQueueAsync) that applies the ingest reducer only during drain, so a same-effect pre-ingest read fails the assertions.EventLogExpert.Runtime.Tests2020/2020 green.Notes
AppendTableEventsBatchAction, which clears the log'sPerLogListVersionentry. Verified display-inert (no production consumer).