Skip to content

Add workload button to Workloads dashboard#5290

Merged
clubanderson merged 1 commit intomainfrom
feat/add-workload-button
Apr 7, 2026
Merged

Add workload button to Workloads dashboard#5290
clubanderson merged 1 commit intomainfrom
feat/add-workload-button

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Summary

  • Adds an "Add Workload" button in the Workloads dashboard header that navigates to the Deploy page
  • Adds a "Deploy a Workload" call-to-action button in the empty state when no workloads are detected
  • Both actions navigate to /deploy where users can deploy workloads via drag-and-drop

Test plan

  • Navigate to Workloads dashboard — verify "Add Workload" button appears in the header
  • Click "Add Workload" button — verify it navigates to the Deploy page
  • With no workloads present, verify the empty state shows "Deploy a Workload" button
  • Click "Deploy a Workload" in empty state — verify it navigates to Deploy page
  • Verify button styling matches the existing pattern (purple, consistent with EmptyClusterState)

Closes #5287

The Workloads page had no way to create or deploy a new workload
directly — users had to navigate to the Deploy page manually or use
an AI mission. This adds:

- A header "Add Workload" button (purple, with Plus icon) that
  navigates to the Deploy dashboard
- A prominent "Deploy a Workload" call-to-action in the empty state
  when no workloads are detected (Rocket icon)

Both buttons use the ROUTES.DEPLOY constant and follow the existing
EmptyClusterState pattern.

Closes #5287

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Copilot AI review requested due to automatic review settings April 7, 2026 18:11
@kubestellar-prow kubestellar-prow bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Apr 7, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[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 mikespreitzer for approval. For more information see the 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

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 1eee9d5
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69d548befe29a30008c23189
😎 Deploy Preview https://deploy-preview-5290.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@clubanderson clubanderson merged commit 044f249 into main Apr 7, 2026
20 of 21 checks passed
@kubestellar-prow kubestellar-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 7, 2026
@kubestellar-prow kubestellar-prow bot deleted the feat/add-workload-button branch April 7, 2026 18:11
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit 044f24960e9299d9ab77611c6952c40036d9b7c7.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds “Add Workload” navigation CTAs to the Workloads dashboard so users can more easily reach the Deploy page (/deploy) to add new workloads.

Changes:

  • Adds an “Add Workload” button to the Workloads dashboard header that navigates to Deploy.
  • Adds an empty-state “Deploy a Workload” button when no workloads are detected.
  • Introduces new i18n keys/usages for Workloads empty-state strings and CTA labels.

Comment on lines +208 to +211
title={t('workloads.addWorkload', 'Deploy a new workload')}
>
<Plus className="w-3.5 h-3.5" />
{t('workloads.addWorkload', 'Add Workload')}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The same i18n key (workloads.addWorkload) is used for both the button label and the title tooltip, but with different default strings. If translations are provided, both values will resolve to the same translated string, which can make the tooltip incorrect/unhelpful. Use distinct translation keys (e.g., workloads.addWorkloadLabel vs workloads.addWorkloadTitle) or use a non-translated title derived from the label if you want them identical.

Suggested change
title={t('workloads.addWorkload', 'Deploy a new workload')}
>
<Plus className="w-3.5 h-3.5" />
{t('workloads.addWorkload', 'Add Workload')}
title={t('workloads.addWorkloadTitle', 'Deploy a new workload')}
>
<Plus className="w-3.5 h-3.5" />
{t('workloads.addWorkloadLabel', 'Add Workload')}

Copilot uses AI. Check for mistakes.
Comment on lines 199 to +203
<DashboardPage
title="Workloads"
subtitle="View and manage deployed applications across clusters"
icon="Layers"
rightExtra={<RotatingTip page="workloads" />}
rightExtra={
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

PR description closes issue #5287, but it uses “Closes #5287” rather than the required first-line format Fixes #5287. Please update the PR body so the first line matches the repo requirement and auto-closes the issue on merge.

Copilot uses AI. Check for mistakes.
Comment on lines 203 to +258
@@ -232,8 +247,15 @@
) : apps.length === 0 ? (
<div className="text-center py-12">
<div className="text-6xl mb-4">📦</div>
<p className="text-lg text-foreground">No workloads found</p>
<p className="text-sm text-muted-foreground">No deployments detected across your clusters</p>
<p className="text-lg text-foreground">{t('workloads.noWorkloadsTitle', 'No workloads found')}</p>
<p className="text-sm text-muted-foreground mb-6">{t('workloads.noWorkloadsDesc', 'No deployments detected across your clusters')}</p>
<button
onClick={() => navigate(ROUTES.DEPLOY)}
className="inline-flex items-center gap-2 px-5 py-2.5 text-sm font-medium rounded-lg bg-purple-600 hover:bg-purple-500 text-white transition-colors"
>
<Rocket className="w-4 h-4" />
{t('workloads.deployWorkload', 'Deploy a Workload')}
</button>
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

New navigation behavior is introduced via the “Add Workload” and empty-state “Deploy a Workload” buttons, but there doesn’t appear to be a Workloads page Playwright spec that asserts these CTAs are present and navigate to /deploy. Consider adding an e2e test (similar to other dashboard page specs) to prevent regressions in routing and empty-state rendering.

Copilot uses AI. Check for mistakes.
@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 1 code suggestion(s) and 2 general comment(s).

@copilot Please apply all of the following code review suggestions:

  • web/src/components/workloads/Workloads.tsx (line 211): title={t('workloads.addWorkloadTitle', 'Deploy a new workload')} > ...

Also address these general comments:

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

✅ Post-Merge Verification: passed

Commit: 044f24960e9299d9ab77611c6952c40036d9b7c7
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/24096982461

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: workloads card "drag and drop" does not have a simple way to add a new workload

3 participants