Skip to content

Enhance onboarding success page layout - #26839

Draft
kroepke wants to merge 16 commits into
masterfrom
polish_collector_onboarding
Draft

Enhance onboarding success page layout#26839
kroepke wants to merge 16 commits into
masterfrom
polish_collector_onboarding

Conversation

@kroepke

@kroepke kroepke commented Jul 30, 2026

Copy link
Copy Markdown
Member

Description

Overhauls the collector onboarding page.

Motivation and Context

Users need a clear overview of whether their new collector works and sends data (and which data sources apply/work).

How Has This Been Tested?

Unit tests.

Screenshots (if appropriate):

Success case
image

The collector connected once, but is now offline
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

kroepke added 16 commits July 28, 2026 18:02
some data is still mocked, we need to add aggregations to the search to fill the sources throughput etc
makes the page better to follow: status timeline, detail information in the middle, next steps or repair info on the right

source logs at the bottom or in the error case we show the self logs

added some tests
added QuietSection to make the Sections in the middle less visually heavy, should probably become a prop on Section
Adds a per-source aggregation search type to the preview search so
useCollectorLogPreview exposes sourceCounts (Record<string, number> |
undefined), keyed by Source.id. undefined means the aggregation result
was unavailable, distinct from "every source produced nothing".

Also updates ConnectionSuccess.test.tsx's shared useCollectorLogPreview
mock to include the new required field so the type-check stays green;
no rendering behaviour changed there.
SourceStatusSection previously claimed every enabled source was "Receiving"
as soon as any message arrived for the collector, which is untrue on a
per-source basis. It now consumes the per-source counts produced by
useCollectorLogPreview (Task 1) and renders an honest per-source status
plus a message-count column, following a 7-row precedence table (disabled,
platform mismatch, offline, receiving, no messages yet, waiting for first
messages, and unknown-count fallback).
…tests, lint

- Make search error attribution search-type aware in useCollectorLogPreview so
  an aggregation-only failure no longer poisons the healthy messages pane that
  shares its query.
- Let SourceName shrink (flex: 1, min-width: 0, overflow-wrap) so long source
  names no longer overflow the log-sources row, mirroring DetailRow's fix for
  the same problem.
- Add coverage for the aggregation-scoped-error case and for an empty (but
  present) aggregation result, pinning sourceCounts === {} as distinct from
  undefined.
- Replace `as unknown as CollectorInstanceView` casts in two test fixtures
  with a plain assertion or a fully populated fixture, per CONTRIBUTING.md.
- Rename a SourceStatusSection test to describe its actual behaviour (empty
  copy for undefined sources) instead of a loading state it doesn't implement,
  and note the gap in a comment.
- Fix eslint findings in ColumnRenderers.tsx (missing blank line before
  return; make the always-passed `instance` prop required instead of
  defaulting it) and reformat LogPreviewSection.tsx's over-width line.
The search type was sent as `aggregation`, which is the frontend's
PluggableSearchType key rather than the wire discriminator. Server-side the
name is `Pivot.NAME` = `pivot`; an unrecognised type deserialises to
SearchType.Fallback, whose `filters` is a plain nullable field, and
SearchFilterNormalizer then NPEs on it and fails the whole search.
Source types can exist in the database before the frontend knows them - a
definition still on an unmerged branch is stored and returned by the API while
SourceType and SOURCE_TYPE_LABELS have no entry for it. Such a source used to
read as "Waiting for first messages...", which pretends we are waiting on
something we cannot reason about.

Membership in SOURCE_TYPE_LABELS is the registry of known types because it is
exhaustive over SourceType; SOURCE_PLATFORM is not, since types that run
everywhere are legitimately absent from it.

Deliberately not reusing "Not applicable": that asserts a definite
incompatibility, whereas an unrecognised type may be collecting fine
server-side.
useInstance fetched once and then only refetched when something invalidated its
key, so a page rendered while the collector was healthy kept asserting "online"
indefinitely - a collector that stops reporting in is marked offline server-side
with no user interaction to trigger a refetch.

Polls at the heartbeat cadence via useCollectorRefetchInterval, since the data
cannot become fresher than the heartbeat. Requests opt out of session extension
per the periodic-request rule, and errors no longer go through defaultOnError
because a persistent failure would raise a toast on every poll; the page already
renders the failure from the returned error.
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