Explain what Last seen proves on Machines

A recently applied queued report can look like fresh collection after an outage. Keep the distinction visible beside the table without changing timestamps, status or readings.

Refs: #5089
Contract-Neutral: Adds presentation guidance for the existing Machines timestamp; no API, freshness rule, filter or collection contract changes.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-12-01 14:52:07 +00:00
parent 77a5ce6412
commit 3b95a2551c
3 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
{
"version": 1,
"base_sha": "77a5ce64129daf23aeae22832de21c93a6d2ef39",
"verified_at": "2026-12-01T14:52:02Z",
"result": "passed",
"changed_paths": [
"frontend-modern/src/features/standalone/AgentsMachinesTable.tsx"
],
"content_sha256": {
"frontend-modern/src/features/standalone/AgentsMachinesTable.tsx": "bae53a749de02d0d36d51ede7141c31645f2d7374317f668e245f37beae82bc8"
},
"routes": [
"/standalone/machines"
],
"viewports": [
{
"width": 1440,
"height": 840
},
{
"width": 390,
"height": 844
}
],
"states": [
"Matched source before/after in managed Chromium with the same fixed clock and read-only synthetic Machines route. Desktop light: new note fits on one line, with both machine rows, ages, stale banner, toolbar and metrics retained. Narrow dark: note wraps above the table without horizontal overflow or losing the stale cue, both timestamps or the row controls.",
"Expanded stale row in both profiles: existing last-known readings and agent error remain visible; supplemental note remains separate. History uses the same unavailable fixture in both versions."
],
"interactions": [
"Typed a nonmatching query, verified empty state without the note, then cleared it and verified both rows returned. Opened stale Archive details with the desktop toggle and narrow row tap, checking the existing stale reason in the controlled region."
]
}

View File

@@ -1565,6 +1565,12 @@ export const AgentsMachinesTable: Component<{
/>
}
>
<Show when={tableState.filtered().some((machine) => !isAgentlessMachine(machine))}>
<p class="text-xs text-muted">
For Pulse Agent machines, Last seen does not tell you when readings were collected.
After an outage, a recent time can reflect a queued report.
</p>
</Show>
<PlatformTableShell
title="Machines"
tableClass="min-w-full table-fixed text-xs md:min-w-[840px]"

View File

@@ -186,6 +186,35 @@ afterEach(() => {
});
describe('AgentsMachinesTable', () => {
it('explains Last seen for agent reports, not for rows from agentless checks alone', async () => {
render(() => (
<AgentsMachinesTable
resources={[
resource({ name: 'Agent host', lastSeen: Date.now() }),
resource({
id: 'check',
name: 'Checked host',
type: 'network-endpoint',
platformType: 'availability',
sourceType: 'api',
availability: { targetKind: 'machine' },
}),
]}
emptyIcon={emptyIcon}
emptyTitle="No machines"
emptyDescription="Install Pulse Agent."
/>
));
const note = /a recent time can reflect a queued report/;
expect(screen.getByText(note)).toBeVisible();
const search = screen.getByPlaceholderText('Search machines');
await fireEvent.input(search, { target: { value: 'Checked host' } });
expect(screen.getByText('Checked host')).toBeVisible();
expect(screen.queryByText(note)).not.toBeInTheDocument();
await fireEvent.input(search, { target: { value: '' } });
expect(screen.getByText(note)).toBeVisible();
});
it('shows the first-report wait beside the name and hides cached metric bars until reporting', () => {
const [machine, setMachine] = createStore(
resource({