Conversation
cb3af93 to
951322e
Compare
Show input records buffered Show end-of-input Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
951322e to
870515f
Compare
|
Thanks, it works for me. Needs a proper review though. |
mythical-fred
left a comment
There was a problem hiding this comment.
No tests. This PR changes meaningful behavior — connector errors move out of the global tab and into an inline drawer, the error icon becomes clickable, end-of-input indicator is added, and extractPipelineXgressErrors is removed from the global errors list.
The pure functions in the new code are unit-testable without rendering anything:
numConnectorsWithErrorsinsystemErrors.tswithGapsinConnectorErrors.sveltegetErrorArraysinConnectorErrors.svelte
Vitest + @testing-library/svelte is the right tool here (not Playwright/screenshot tests). These three functions alone would give meaningful coverage of the core logic.
| {#if isXl.current} | ||
| <div class="flex flex-col"> | ||
| <div class="text-start text-sm"> | ||
| Deployment age - |
There was a problem hiding this comment.
some of these are @render functions, some are not... what's the rule?
There was a problem hiding this comment.
In Svelte 5, { ... } syntax in HTML markup evaluates a plain JavaScript expression, converts it to string, sanitizes it and inserts into HTML.
{@render snippet_name(..)} inserts a "Snippet" - a UI component that is defined with
{#snippet snippet_name(...)}
...
{/snippet}
Snippets are simpler than true components; they have arguments that are passed as a function call when "render"-ing the snippet.
| const connectorsWithErrorsCount = $derived(numConnectorsWithErrors(metrics.current)) | ||
| </script> | ||
|
|
||
| {#snippet TabControlPerformance()} |
There was a problem hiding this comment.
What does "Control" mean here?
There was a problem hiding this comment.
It is a part of "Tab Control", what the UI library calls the label of the tab in the list of tabs
| tabindex="0" | ||
| onkeydown={(e) => e.key === 'Enter' && onErrorClick?.(e)} | ||
| ></span> | ||
| <Tooltip placement="top">Parse or transport errors occurred — click to view</Tooltip> |
There was a problem hiding this comment.
if onErrorClick is undefined, is this text still displayed?
There was a problem hiding this comment.
Yes. I tried to keep it simpler but I overlooked I do need a separate case. Will fix in a follow-up
| tabindex="0" | ||
| onkeydown={(e) => e.key === 'Enter' && onErrorClick?.(e)} | ||
| ></span> | ||
| <Tooltip placement="top">Encode or transport errors occurred — click to view</Tooltip> |
| <th class="font-normal 2xl:text-nowrap" rowspan="2">Parse errors</th> | ||
| <th class="font-normal 2xl:text-nowrap" rowspan="2">Transport errors</th> | ||
| </tr> | ||
| <tr> |
There was a problem hiding this comment.
Are these aligned under "Ingested/buffered"? I don't see why from the code.
There was a problem hiding this comment.
No; here the header of the table is defined that consists of two rows. HTML exposes a mechanism to "merge" cells in the table: rowspan=2 means the cell takes up two rows - it's own and the next one (under it), colspan=2 - the cell takes up two columns.
| }}>{formatQty(m.num_parse_errors)}</button | ||
| > | ||
| {:else} | ||
| {formatQty(m.num_parse_errors)} |
There was a problem hiding this comment.
Is this for backward compatibility?
There was a problem hiding this comment.
It's to avoid button-like behavior for num errors = 0. I could have as well just hard-coded "0"
For both input and putput connectors
Show input records buffered - Fix #5778
Show end-of-input - Fix #5772
Screencast.from.2026-03-10.03-30-21.webm