Skip to content

Add recent events for applications and jobs - #767

Open
thokra-nav wants to merge 4 commits into
mainfrom
workload_events
Open

thokra-nav wants to merge 4 commits into
mainfrom
workload_events

Conversation

@thokra-nav

Copy link
Copy Markdown
Member

Surface a compact event preview on workload overviews and provide a paginated history for troubleshooting. Align latest timestamps across event types and keep warning details visible.

Copilot AI balanced review requested due to automatic review settings November 20, 2026 09:35

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.

🟢 Approval recommended

No active review issues block the workload event preview and history changes.

No open issues 🎉

What changed in this PR

Adds application and job event previews to workload overviews, with dedicated paginated history pages for troubleshooting.

Changes:

  • Adds five-event sidebar previews, Events navigation tabs, and 20-event history pages.
  • Introduces a shared timeline that aligns latest timestamps and preserves warning details, occurrence counts, and affected instances.
  • Adds rendering tests, updates loader mocks, and refreshes the API schema and home-attention query.
File Description
src/​routes/​team/​[team]/​legacyDeploy.test.ts Adds mocks for event query loaders.
src/​routes/​team/​[team]/​[env]/​job/​[job]/​events/​+page.ts Loads paginated job events.
src/​routes/​team/​[team]/​[env]/​job/​[job]/​events/​+page.svelte Renders the job event history.
src/​routes/​team/​[team]/​[env]/​job/​[job]/​+page.ts Loads overview data and recent events concurrently.
src/​routes/​team/​[team]/​[env]/​job/​[job]/​+page.svelte Adds the job event preview.
src/​routes/​team/​[team]/​[env]/​job/​[job]/​+layout.svelte Adds the job Events tab.
src/​routes/​team/​[team]/​[env]/​app/​[app]/​events/​+page.ts Loads paginated application events.
src/​routes/​team/​[team]/​[env]/​app/​[app]/​events/​+page.svelte Renders the application event history.
src/​routes/​team/​[team]/​[env]/​app/​[app]/​+page.ts Loads overview data and recent events concurrently.
src/​routes/​team/​[team]/​[env]/​app/​[app]/​+page.svelte Adds the application event preview.
src/​routes/​team/​[team]/​[env]/​app/​[app]/​+layout.svelte Adds the application Events tab.
src/​routes/​homeAttention.gql Selects rollout-stuck issues and workload details.
src/​lib/​domain/​workload/​WorkloadEventTimeline.test.ts Tests warning details, timestamps, compact rendering, and errors.
src/​lib/​domain/​workload/​WorkloadEventTimeline.svelte Implements the shared event timeline.
src/​lib/​domain/​workload/​WorkloadEventsPage.svelte Provides the history heading, count, and pagination.
src/​lib/​domain/​workload/​workloadEvents.gql Defines shared event fields and workload queries.
src/​lib/​domain/​workload/​workloadEventPagination.ts Defines preview size and cursor pagination variables.
src/​lib/​domain/​workload/​RecentWorkloadEvents.svelte Wraps the compact timeline in a sidebar card.
schema.graphql Refreshes generated warning-event and workload-status definitions.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 20, 2026 11:32

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.

🟡 Changes recommended

Event views lose restart cause and container details, while failed pagination requests can leave users without visible error feedback.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Show restart reason and container in workload event views

src/​lib/​domain/​workload/​workloadEvents.gql:16

The API replaces killing-event messages with Instance restarted, so reading only message loses the restart cause and affected container in both event views (nais/api default branch at fc16b6e). Select reason and container, render them in WorkloadEventTimeline.svelte, and update the restart fixtures to use those fields.

Review effort: Balanced

thokra-nav and others added 4 commits November 20, 2026 13:24
Surface a compact event preview on workload overviews and provide a paginated history for troubleshooting. Align latest timestamps across event types and keep warning details visible.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose traffic readiness, rollout blockers, and autoscaling status so developers can see why a workload is blocked without reconstructing event history. Keep current instance diagnostics and prior exits close to their logs.

Uses signals from nais/api#627, nais/api#628, nais/api#629, nais/api#630, and nais/api#631.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address the review on PR #767: keep loaded rows visible when loading another page fails, and show the API's restart reason and container without expanding routine events.

Trim overlapping regression cases and stub Houdini in the standalone browser fixture so the job row can load without an API.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the existing run list for the job health summary, distinguish an empty list from unavailable data, and keep page sizes in the queries.

Share exit formatting across application and job instances so exit code zero and timestamp-only exits stay visible.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 12:24

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.

🟡 Changes recommended

The new Automatic scaling panel lacks a named section for landmark navigation, violating the main-column accessibility requirement in AGENTS.md.

1 open issue
1 resolved since last review

Review effort: Balanced

);
</script>

<Collection title="Automatic scaling" level="h2">
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.

2 participants