Skip to content

Extract Marker Bar coordination into MarkerBarController (#719) - #722

Merged
Hirogen merged 1 commit into
Developmentfrom
refactor/719-marker-bar-controller
Oct 2, 2026
Merged

Hirogen merged 1 commit into
Developmentfrom
refactor/719-marker-bar-controller

Conversation

@Hirogen

@Hirogen Hirogen commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #719.

LogWindow.MarkerBar.cs kept ~20 marker state fields on LogWindow. MarkerBarController now owns the marker indexes, timer, counters and frame state behind a small IMarkerBarHost, following the VisibleRows pattern. LogWindow keeps only the wiring, the marker column width and its OnDpiChangedAfterParent override.

Behaviour-preserving. The moved logic is unchanged apart from renames. Harmless deviations:

  • the filter-hit lock is only taken when the filter lane is visible
  • the marker column width is set after the bar's visibility and colours
  • marker warnings are logged under MarkerBarController instead of LogWindow

Tests

  • New MarkerBarControllerTests drive the controller through a fake host: a stale frame is discarded, nothing renders while a rollover is pending, and a discovery error is reported once per snapshot. Each test was checked by removing the guard it targets.
  • HiddenLinesWindowTests.MarkerClick_OnHiddenLine_RevealsIt now reaches the click handler on the controller; its assertions are unchanged.
  • Marker, hidden-lines and full suites pass, except the known-flaky LineVisibilityTrackerTests.Dispose_CancelsAPendingScan_WithoutPublishing.

LogWindow.MarkerBar.cs kept ~20 marker state fields on LogWindow itself.
MarkerBarController now owns the marker indexes, timer, counters and frame
state behind a small IMarkerBarHost; LogWindow keeps only the wiring, the
table-layout column width and its OnDpiChangedAfterParent override.

Behaviour-preserving: the moved logic is unchanged apart from renames.
Harmless deviations:
- the filter-hit lock is only taken when the filter lane is visible
- the marker column width is set after the bar's visibility and colours
- marker warnings are logged under MarkerBarController instead of LogWindow

HiddenLinesWindowTests reaches the click handler on the controller now;
its assertions are unchanged. New MarkerBarControllerTests drive the
controller through a fake host.
}
catch (Exception exception)
{
if (!_disposed && !_host.IsClosed)
Comment on lines +289 to +296
catch (Exception exception)
{
if (!_disposed && !_host.IsClosed)
{
_logger.Warn(exception, "Marker update failed");
_host.StatusLineError(string.Format(CultureInfo.CurrentCulture, Resources.MarkerBar_ScanFailed, exception.Message));
}
}
@Hirogen
Hirogen merged commit d2aa747 into Development Oct 2, 2026
3 checks passed
@Hirogen
Hirogen deleted the refactor/719-marker-bar-controller branch October 2, 2026 17:40
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.

Extract Marker Bar logic out of the LogWindow.MarkerBar.cs partial

1 participant