Skip to content

feat(setup): add Windows (WSL2) section to in-app agent setup modals (#6185 follow-up)#6238

Merged
clubanderson merged 2 commits intomainfrom
fix/rishi-windows-modal
Apr 10, 2026
Merged

feat(setup): add Windows (WSL2) section to in-app agent setup modals (#6185 follow-up)#6238
clubanderson merged 2 commits intomainfrom
fix/rishi-windows-modal

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

Summary

@rishi-jat reported (#6185) that the README install instructions had no Windows path. That was fixed in #6187/#6193/#6194/#6197/#6207, but the README is only one surface — the in-app modals that show up when users first try to set up kc-agent had no Windows option either. This PR closes that gap.

What changed

AgentSetupDialog.tsx (the welcome modal that auto-shows when no agent is connected):

  • New windowsBuildCommand constant — single-line WSL command (apt prereqs + longsleep PPA + golang-1.25 + git clone + mkdir -p bin + go build)
  • New Windows (WSL2) collapsible section parallel to the Linux one, with the same Copy/Copied button pattern
  • Linux build command also updated to include mkdir -p bin ([Copilot Review] 3 comment(s) on merged PR #6194 #6196 caught this for the README)

InClusterAgentDialog.tsx (the in-cluster connect dialog):

  • New WINDOWS_WSL_INSTALL_CMD constant + collapsible Windows (WSL2) section parallel to the build-from-source one
  • Linux build-from-source label bumped from 'Go 1.24+' → 'Go 1.25+' to match go.mod
  • Linux build command also adds mkdir -p bin

Both Windows sections include:

  • The one-time PowerShell prerequisite (wsl --install -d Ubuntu) described inline
  • A note that http://localhost:8080 just works in the Windows browser (WSL2 localhost forwarding)
  • A pointer back to the README's step-by-step version

Result: README + in-app modals are now consistent for the four supported install paths: macOS Homebrew, Linux build-from-source, Windows WSL2 build, in-cluster deploy.

Test plan

  • npm run build passes locally
  • After merge: open the console with no kc-agent running → AgentSetupDialog auto-shows → click 'Windows (WSL2) instructions' → verify the section expands and the Copy button works
  • Same flow for InClusterAgentDialog (triggered from cluster picker)

Refs #6185.

…6185 follow-up)

@rishi-jat reported (#6185) that the README install instructions had no
Windows path. That was fixed in #6187/#6193/#6194/#6197/#6207, but the
README is only one surface — the in-app modals that show up when users
first try to set up kc-agent had no Windows option either. This PR adds
parity between the README and both in-app modals.

AgentSetupDialog.tsx (the welcome modal that auto-shows when no agent is
connected and the user hasn't dismissed it):

  - New windowsBuildCommand constant: `apt-get install
    software-properties-common` -> longsleep PPA -> `golang-1.25` ->
    git clone -> `mkdir -p bin` -> `go build`. Single line so users
    can paste it once into their WSL shell.
  - New Windows (WSL2) collapsible section parallel to the existing
    Linux one. Same Eye/click pattern, same Copy button + 'Copied'
    feedback (UI_FEEDBACK_TIMEOUT_MS), shares the existing toast timer
    cleanup pattern via copiedWindowsTimerRef.
  - Linux build command also updated: bumped to include 'mkdir -p bin'
    so a fresh clone doesn't fail (#6196 caught this for the README).

InClusterAgentDialog.tsx (the in-cluster connect dialog):

  - Same WINDOWS_WSL_INSTALL_CMD constant + new Windows (WSL2)
    collapsible section parallel to the build-from-source one. New
    COPY_KEY_WSL=102 in the existing key range.
  - Linux build-from-source command updated similarly: 'mkdir -p bin'
    added, label changed from 'Go 1.24+' to 'Go 1.25+' to match
    go.mod.

Both Windows sections include:
  - The one-time PowerShell prerequisite (`wsl --install -d Ubuntu`)
    described inline so users don't have to leave the modal
  - A note that http://localhost:8080 just works in the Windows
    browser because WSL2 forwards localhost
  - A pointer back to the README's step-by-step version

This closes the in-app gap rishi-jat originally reported. The README +
in-app modals are now consistent for the four supported install paths:
macOS Homebrew, Linux build-from-source, Windows WSL2 build, in-cluster
deploy.

Verified: `npm run build` clean.

Refs #6185.

Signed-off-by: Andrew Anderson <[email protected]>
Copilot AI review requested due to automatic review settings April 10, 2026 20:42
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Apr 10, 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 eeshaansa 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

@clubanderson clubanderson added the ai-generated Pull request generated by AI label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 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.

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 10, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 10, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 4005666
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69d9614050c8dd0008e030b2
😎 Deploy Preview https://deploy-preview-6238.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.

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 Windows (WSL2) setup guidance to the in-app kc-agent setup modals so Windows users have an in-product path aligned with the README.

Changes:

  • Added a new Windows (WSL2) collapsible section with copy-to-clipboard commands in both agent setup dialogs.
  • Updated Linux build-from-source commands to include mkdir -p bin.
  • Updated in-cluster dialog copy to reflect Go 1.25+ for Linux builds.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
web/src/components/setup/InClusterAgentDialog.tsx Adds a Windows (WSL2) collapsible install section and updates build-from-source command/text.
web/src/components/agent/AgentSetupDialog.tsx Adds a Windows (WSL2) collapsible install section and updates Linux build command.

Comment on lines 29 to +34
const macOSInstallCommand = 'brew tap kubestellar/tap && brew install kc-agent && kc-agent'
const linuxBuildCommand = 'git clone https://github.com/kubestellar/console.git && cd console && go build -o bin/kc-agent ./cmd/kc-agent && ./bin/kc-agent'
const linuxBuildCommand = 'git clone https://github.com/kubestellar/console.git && cd console && mkdir -p bin && go build -o bin/kc-agent ./cmd/kc-agent && ./bin/kc-agent'
// #6185: Windows users run inside WSL2 — same build path as Linux but
// with apt prereqs first. The README already covers this; the in-app
// modal had no Windows option until rishi-jat's follow-up.
const windowsBuildCommand = 'sudo apt-get update && sudo apt-get install -y software-properties-common curl git && sudo add-apt-repository -y ppa:longsleep/golang-backports && sudo apt-get update && sudo apt-get install -y golang-1.25 && git clone https://github.com/kubestellar/console.git && cd console && mkdir -p bin && go build -o bin/kc-agent ./cmd/kc-agent && ./bin/kc-agent'
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The Linux build instructions shown in this modal come from i18n (agentSetup.linuxBuildDesc), but the current translation text still says “Requires Go 1.24+” while go.mod requires Go 1.25.0. Please update the translation strings (and the corresponding keys in other locales) to avoid telling users a Go version that will fail to build.

Copilot uses AI. Check for mistakes.
Comment on lines +179 to +209
{/* Windows (WSL2) Install Option (collapsible) — #6185 */}
<div className="mt-2">
<button
onClick={() => setShowWindows(!showWindows)}
className="flex items-center gap-1.5 text-xs text-purple-400 hover:text-purple-300 transition-colors"
>
{showWindows ? <ChevronDown className="w-3.5 h-3.5" /> : <ChevronRight className="w-3.5 h-3.5" />}
{t('agentSetup.windowsInstructions', 'Windows (WSL2) instructions')}
</button>
{showWindows && (
<div className="mt-2 rounded-lg border border-purple-500/20 bg-purple-500/5 p-3 space-y-2">
<p className="text-xs text-muted-foreground">
{t(
'agentSetup.windowsBuildDesc',
'Native Windows is not supported (the install scripts and kc-agent are POSIX shell + Go). Install WSL2 with Ubuntu first ("wsl --install -d Ubuntu" in PowerShell), then run this single command inside the WSL shell. Open http://localhost:8080 in your Windows browser — WSL2 forwards localhost automatically.',
)}
</p>
<div className="flex items-center gap-2">
<code className="flex-1 rounded bg-muted px-3 py-1.5 text-xs font-mono text-foreground select-all overflow-x-auto">
{windowsBuildCommand}
</code>
<button
onClick={copyWindows}
className="shrink-0 rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90"
>
{copiedWindows ? t('agentSetup.copied') : t('agentSetup.copy')}
</button>
</div>
<p className="text-xs text-muted-foreground">
{t('agentSetup.windowsReadmeRef', 'See README → Windows (WSL2) for the step-by-step version of this command.')}
</p>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

New i18n keys were introduced for the Windows section (agentSetup.windowsInstructions, agentSetup.windowsBuildDesc, agentSetup.windowsReadmeRef), but they don’t exist in the locale JSON files. As a result, non-English locales will fall back to the hardcoded English strings for these lines; please add these keys to the translation files (at least en/common.json, and ideally all supported locales) for consistent localization.

Copilot uses AI. Check for mistakes.
<p className="text-xs text-muted-foreground">
{t(
'agentSetup.windowsBuildDesc',
'Native Windows is not supported (the install scripts and kc-agent are POSIX shell + Go). Install WSL2 with Ubuntu first ("wsl --install -d Ubuntu" in PowerShell), then run this single command inside the WSL shell. Open http://localhost:8080 in your Windows browser — WSL2 forwards localhost automatically.',
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The Windows description hardcodes http://localhost:8080. Since this modal can appear when the console is hosted on a different origin/port, this could mislead users. Consider referencing the current console origin (e.g. window.location.origin) or wording it as “open this console URL” instead of a fixed localhost URL.

Suggested change
'Native Windows is not supported (the install scripts and kc-agent are POSIX shell + Go). Install WSL2 with Ubuntu first ("wsl --install -d Ubuntu" in PowerShell), then run this single command inside the WSL shell. Open http://localhost:8080 in your Windows browser — WSL2 forwards localhost automatically.',
'Native Windows is not supported (the install scripts and kc-agent are POSIX shell + Go). Install WSL2 with Ubuntu first ("wsl --install -d Ubuntu" in PowerShell), then run this single command inside the WSL shell. Open this console URL in your Windows browser — WSL2 forwards localhost automatically.',

Copilot uses AI. Check for mistakes.
Comment on lines +174 to +175
run this single command inside the WSL shell. Open <code className="px-1 rounded bg-muted">http://localhost:8080</code> in
your Windows browser when done — WSL2 forwards localhost automatically.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This Windows (WSL2) help text tells users to open http://localhost:8080 after running the command. In an in-cluster console deployment, the UI is often accessed via an ingress/port-forward with a different host/port, so the hardcoded URL may be incorrect. Prefer using the already-available currentOrigin or wording it as “refresh/reopen this console page” instead.

Suggested change
run this single command inside the WSL shell. Open <code className="px-1 rounded bg-muted">http://localhost:8080</code> in
your Windows browser when done WSL2 forwards localhost automatically.
run this single command inside the WSL shell. When it finishes, refresh or reopen this
console page in your Windows browser WSL2 forwards localhost automatically.

Copilot uses AI. Check for mistakes.
@clubanderson clubanderson merged commit 8c6c71b into main Apr 10, 2026
67 of 73 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the fix/rishi-windows-modal branch April 10, 2026 20:51
@github-actions
Copy link
Copy Markdown
Contributor

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

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit 8c6c71bbf90fdf98a567cf1b3b299563650648cc.

@github-actions
Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 8c6c71bbf90fdf98a567cf1b3b299563650648cc
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/24263627670

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

Labels

ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants