feat(setup): add Windows (WSL2) section to in-app agent setup modals (#6185 follow-up)#6238
feat(setup): add Windows (WSL2) section to in-app agent setup modals (#6185 follow-up)#6238clubanderson merged 2 commits intomainfrom
Conversation
…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]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Andrew Anderson <[email protected]>
There was a problem hiding this comment.
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. |
| 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' |
There was a problem hiding this comment.
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.
| {/* 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> |
There was a problem hiding this comment.
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.
| <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.', |
There was a problem hiding this comment.
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.
| '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.', |
| 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. |
There was a problem hiding this comment.
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.
| 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. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
✅ Post-Merge Verification: passedCommit: |
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):windowsBuildCommandconstant — single-line WSL command (apt prereqs + longsleep PPA + golang-1.25 + git clone +mkdir -p bin+ go build)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):WINDOWS_WSL_INSTALL_CMDconstant + collapsible Windows (WSL2) section parallel to the build-from-source onego.modmkdir -p binBoth Windows sections include:
wsl --install -d Ubuntu) described inlinehttp://localhost:8080just works in the Windows browser (WSL2 localhost forwarding)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 buildpasses locallyRefs #6185.