Skip to content

Add in-view incremental Find (Ctrl+F) with match highlighting#649

Merged
NikTilton merged 1 commit into
mainfrom
feat/in-view-find
Jul 15, 2026
Merged

Add in-view incremental Find (Ctrl+F) with match highlighting#649
NikTilton merged 1 commit into
mainfrom
feat/in-view-find

Conversation

@jschick04

Copy link
Copy Markdown
Collaborator

Summary

Adds an in-view incremental Find (Ctrl+F) to the log-table pane (ADO 62704674). It is a component-local overlay over the current filtered view: it never dispatches a filter / lens / sort / selection action, it only reads the view to derive matches, scrolls the current match into view, and (in grouped mode) toggles group collapse to reveal a hidden match.

What's included

  • Ctrl+F opens a floating find bar; Esc closes it, restoring grid focus and landing the cursor on the current match.
  • Incremental, debounced search as you type, over the enabled columns plus the Description of the current view.
  • Match count shown inline as N/M; prev/next navigation (buttons, Enter / Shift+Enter, F3 / Shift+F3) with wrap-around and a screen-reader wrap announcement.
  • Match case and Match whole word toggles in an options tray. Whole-word uses VS Code's wordSeparators boundary rule (correct for EventIDs, GUIDs, and hyphenated provider names, and still findable for punctuation-edged queries like .NET / -Auditing).
  • Highlighter-yellow inline marks on the current match's cells; a neutral inset ring on every match row (weight-encoded 1px vs 2px for other vs current), with a forced-colors / high-contrast outline fallback.
  • Group-aware navigation: expands a collapsed group to reveal a match and re-collapses groups Find opened once you navigate away, while relinquishing ownership when the user bulk- or context-toggles groups.

Implementation notes

  • Pure matcher (EventFindMatcher) in the Runtime layer: RowMatches / IndexOfMatch / whole-word IsWordBounded, Ordinal comparison for machine-shaped cell text, shared by the row scan and the current-match mark splitter so highlighted spans are exactly the spans that counted as a match.
  • The match set is computed on a background, cancellable, epoch-and-identity-gated scan and published on the renderer thread.
  • Mark rendering is XSS-safe: Blazor-escaped segments (never MarkupString), capped per cell against a pathological hit count.
  • Global Ctrl+F is routed via a singleton FindCoordinator bridge (keyboard shortcut -> currently-mounted pane), mount-order-safe across WebView reloads.

Validation

  • Test suites green: Runtime 1800/1800, UI 1103/1103. Touched projects build 0 warnings / 0 errors.
  • New tests: EventFindMatcherTests (18, incl. a whole-word Theory), FindBarTests, LogTablePaneFindTests.
  • Governance: pre-implementation + post-code multi-model panels 5/5 during development; pre-push review panel over the committed diff.

Manual acceptance (WebView2)

Visual / interaction outcomes automated tests can't verify:

  • Ctrl+F open / Esc close; incremental highlighting; prev/next with wrap; count centering.
  • Match case + Match whole word toggles; yellow marks + neutral rings in light and dark; forced-colors / high-contrast.
  • Grouped view: navigating into a collapsed group and back out.

Copilot AI review requested due to automatic review settings July 15, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an in-pane “Find in view” experience for the log table (Ctrl+F) that scans the currently displayed rows (without altering filters/sort/selection), supports incremental navigation, and renders accessible match highlighting (including group-aware behavior).

Changes:

  • Introduces a Find overlay (FindBar) with incremental search, navigation, and options (case/whole-word), plus UI highlighting styles.
  • Adds LogTablePane-side find state management and background scanning using a shared runtime matcher (EventFindMatcher).
  • Routes Ctrl+F through the keyboard shortcut bridge via a singleton FindCoordinator, and adds unit/UI tests.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Unit/EventLogExpert.UI.Tests/TestUtils/LogTablePaneDependenciesExtensions.cs Registers IFindCoordinator for UI tests.
tests/Unit/EventLogExpert.UI.Tests/LogTable/LogTablePaneFindTests.cs Adds integration-style bUnit tests covering find behavior in LogTablePane.
tests/Unit/EventLogExpert.UI.Tests/LogTable/FindBarTests.cs Adds unit tests for FindBar interactions and rendering.
tests/Unit/EventLogExpert.Runtime.Tests/LogTable/EventFindMatcherTests.cs Adds unit tests for the runtime matcher semantics (case/whole-word).
src/EventLogExpert.UI/wwwroot/Keyboard/Keyboard.js Extends Ctrl+ shortcut routing to include Ctrl+F.
src/EventLogExpert.UI/wwwroot/app.css Adds theme variables for find highlight colors.
src/EventLogExpert.UI/LogTable/LogTablePane.razor.js Adds focusTableContainer() interop used when there’s no focusable row.
src/EventLogExpert.UI/LogTable/LogTablePane.razor.css Adds find highlight styling (marks + match/current rings + forced-colors handling).
src/EventLogExpert.UI/LogTable/LogTablePane.razor.cs Hooks Find lifecycle into pane init/dispose/render and group ownership rules.
src/EventLogExpert.UI/LogTable/LogTablePane.razor Renders FindBar overlay and match mark rendering for the current match row.
src/EventLogExpert.UI/LogTable/LogTablePane.Find.cs Implements pane-local find logic: debounce, cancellable scanning, navigation, and group-aware scrolling.
src/EventLogExpert.UI/LogTable/Find/IFindCoordinator.cs Defines coordinator interface for Ctrl+F routing to the active pane.
src/EventLogExpert.UI/LogTable/Find/FindCoordinator.cs Implements coordinator registration/ownership behavior.
src/EventLogExpert.UI/LogTable/Find/FindBar.razor.js Adds JS helpers (native F3 suppression; focus/select input).
src/EventLogExpert.UI/LogTable/Find/FindBar.razor.css Adds styles for the find bar UI and options tray.
src/EventLogExpert.UI/LogTable/Find/FindBar.razor.cs Implements find bar component behavior, JS module hookup, and key handling.
src/EventLogExpert.UI/LogTable/Find/FindBar.razor Defines find bar markup and accessibility attributes.
src/EventLogExpert.UI/Keyboard/KeyboardShortcutService.cs Routes Ctrl+F to IFindCoordinator.RequestOpen().
src/EventLogExpert.UI/DependencyInjection/UiServiceCollectionExtensions.cs Registers IFindCoordinator in production DI.
src/EventLogExpert.Runtime/LogTable/SetAllGroupsCollapsedAction.cs Makes action public so UI can subscribe.
src/EventLogExpert.Runtime/LogTable/EventFindMatcher.cs Adds the shared matcher used by both scanning and highlighting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/EventLogExpert.UI/LogTable/LogTablePane.Find.cs
Copilot AI review requested due to automatic review settings July 15, 2026 05:00
@jschick04
jschick04 force-pushed the feat/in-view-find branch from fd0c569 to fe666b5 Compare July 15, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Comment thread src/EventLogExpert.UI/LogTable/LogTablePane.razor.cs
Copilot AI review requested due to automatic review settings July 15, 2026 05:21
@jschick04
jschick04 force-pushed the feat/in-view-find branch from fe666b5 to 7b6ef4c Compare July 15, 2026 05:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.

Comment thread src/EventLogExpert.UI/LogTable/Find/FindBar.razor.cs Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 05:36
@jschick04
jschick04 force-pushed the feat/in-view-find branch from 7b6ef4c to 6e3f223 Compare July 15, 2026 05:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.

@jschick04
jschick04 marked this pull request as ready for review July 15, 2026 05:40
@jschick04
jschick04 requested a review from a team as a code owner July 15, 2026 05:40
@NikTilton
NikTilton merged commit a050dc8 into main Jul 15, 2026
8 checks passed
@NikTilton
NikTilton deleted the feat/in-view-find branch July 15, 2026 05:50
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.

3 participants