Skip to content

feat: add activity warning indicators and toast notifications - #1338

Open
thaorell wants to merge 1 commit into
kubeflow:notebooks-v2from
thaorell:1203_culling_notifications
Open

feat: add activity warning indicators and toast notifications#1338
thaorell wants to merge 1 commit into
kubeflow:notebooks-v2from
thaorell:1203_culling_notifications

Conversation

@thaorell

Copy link
Copy Markdown

Add warning/critical visual indicators on workspace table rows when a workspace approaches its auto-pause threshold, plus toast notifications on state transitions. Warnings clear automatically when the next data refresh shows updated activity.

closes: #1203
Screenshot 2026-08-19 at 3 24 23 PM
Screenshot 2026-08-19 at 2 19 54 PM

@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Notebooks Aug 20, 2026
@google-oss-prow google-oss-prow Bot added the area/frontend area - related to frontend components label Aug 20, 2026
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign paulovmr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot added the area/v2 area - version - kubeflow notebooks v2 label Aug 20, 2026
@thaorell thaorell changed the title feat(frontend): add activity warning indicators and toast notificatio… feat(frontend): add activity warning indicators and toast notifications Aug 20, 2026

@christian-heusel christian-heusel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@thaorell I think you need to drop the conventional commit scope from the title to make the action happy 😅

-feat(frontend): add activity warning indicators and toast notifications
+feat: add activity warning indicators and toast notifications

@thaorell thaorell changed the title feat(frontend): add activity warning indicators and toast notifications feat: add activity warning indicators and toast notifications Aug 20, 2026
@thaorell
thaorell force-pushed the 1203_culling_notifications branch from c0afa79 to 2af876b Compare August 20, 2026 15:54
@christian-heusel christian-heusel added this to the v2.0.0-beta.1 milestone Aug 25, 2026

@christian-heusel christian-heusel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This already looks quite good, I gave it a quick review 😊

Comment thread workspaces/frontend/src/shared/utilities/WorkspaceUtils.ts
Comment thread workspaces/frontend/src/shared/utilities/WorkspaceUtils.ts
Comment thread workspaces/frontend/src/app/hooks/useActivityNotifications.ts Outdated
…ns (kubeflow#1203)

Add warning/critical visual indicators on workspace table rows when a
workspace approaches its auto-pause threshold, plus toast notifications
on state transitions. Warnings clear automatically when the next data
refresh shows updated activity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Charles Thao <cthao@redhat.com>
@thaorell
thaorell force-pushed the 1203_culling_notifications branch from 2af876b to 6c7308e Compare September 2, 2026 18:44

@paulovmr paulovmr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice PR @thaorell ! Just left a few minor comments regarding theming. Happy to merge once they are addressed!

const LastActivityCell: React.FC<{ activity: WorkspacesActivity }> = ({ activity }) => {
const ACTIVITY_WARNING_ICONS: Record<ActivityWarningLevel, React.ReactNode> = {
[ActivityWarningLevel.Warning]: (
<ExclamationTriangleIcon color="orange" data-testid="activity-warning-indicator" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This icon is rendered without aria-label attributes. While it is inside a Tooltip (which provides visual context on hover), screen readers won't convey the warning state. Consider adding aria-label="Activity warning", consistent with how RedirectIconWithPopover.tsx adds aria-label="Redirect information" to its icon.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The icon colors are hardcoded as color="orange" and color="red". PatternFly v6 provides semantic status tokens (var(--pf-t--global--icon--color--status--warning--default) and var(--pf-t--global--icon--color--status--danger--default)) that respect theming and dark mode. Note: the existing RedirectIconWithPopover.tsx uses the same color="orange" pattern, so this is consistent with the current codebase — but if the project moves toward theme-aware colors, this would be the place to start.

<ExclamationTriangleIcon color="orange" data-testid="activity-warning-indicator" />
),
[ActivityWarningLevel.Critical]: (
<ExclamationCircleIcon color="red" data-testid="activity-critical-indicator" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This icon is rendered without aria-label attributes. While it is inside a Tooltip (which provides visual context on hover), screen readers won't convey the warning state. Consider adding aria-label="Activity critical", consistent with how RedirectIconWithPopover.tsx adds aria-label="Redirect information" to its icon.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The icon colors are hardcoded as color="orange" and color="red". PatternFly v6 provides semantic status tokens (var(--pf-t--global--icon--color--status--warning--default) and var(--pf-t--global--icon--color--status--danger--default)) that respect theming and dark mode. Note: the existing RedirectIconWithPopover.tsx uses the same color="orange" pattern, so this is consistent with the current codebase — but if the project moves toward theme-aware colors, this would be the place to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend area - related to frontend components area/v2 area - version - kubeflow notebooks v2 size/XL

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants