Skip to content

feat: full one-click start - #12

Merged
ADITYA-tp01 merged 1 commit into
mainfrom
feat/one-click-v2
Aug 29, 2026
Merged

feat: full one-click start#12
ADITYA-tp01 merged 1 commit into
mainfrom
feat/one-click-v2

Conversation

@ADITYA-tp01

@ADITYA-tp01 ADITYA-tp01 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

User description

Handles WSL Node.js + TrueForge install automatically.


CodeAnt-AI Description

Start MissionControl and its WSL tools with one command

What Changed

  • Automatically installs Linux-native Node.js 20 in Ubuntu on WSL when it is missing
  • Automatically installs TrueForge only when needed, then launches it directly in a ready-to-use WSL terminal
  • Shows separate progress steps and clear first-time versus already-installed status messages
  • Updates the completion instructions for configuring TrueForge, while continuing to start Docker services and the dashboard

Impact

✅ One-command WSL setup
✅ Fewer manual installation steps
✅ TrueForge opens ready to configure

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@ADITYA-tp01
ADITYA-tp01 merged commit 331c4bd into main Aug 29, 2026
@codeant-ai

codeant-ai Bot commented Aug 29, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR b13da96 Aug 29, 2026 · 22:40 22:43

@codeant-ai

codeant-ai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 29, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Automate WSL Node.js and TrueForge startup

✨ Enhancement ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Installs Linux-native Node.js 20 and TrueForge in Ubuntu WSL when missing.
• Launches TrueForge automatically after starting containers and the dashboard.
• Refreshes startup progress and setup guidance for the six-step workflow.
Diagram

graph TD
  Start["Startup Script"] -->|checks| Docker["Docker Engine"] -->|starts| Services["Core Services"]
  Start -->|launches| Dashboard["Web Dashboard"]
  Start -->|installs| Node["WSL Node.js"] -->|provides npm| TF["TrueForge"]
  Start -->|launches| TF
Loading
High-Level Assessment

The integrated startup flow is appropriate because WSL prerequisites are idempotently checked before TrueForge launches, preserving the one-click experience. Keeping provisioning in a separate setup script was considered but would reintroduce a manual prerequisite.

Files changed (1) +37 / -25

Enhancement (1) +37 / -25
start.ps1Provision and launch TrueForge automatically in WSL +37/-25

Provision and launch TrueForge automatically in WSL

• Expands startup to six stages, detects and installs Linux-native Node.js 20 and TrueForge when absent, and launches TrueForge automatically. Updates progress messages and final setup instructions to match the automated workflow.

start.ps1

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

Comment thread start.ps1
Comment on lines +61 to +67
$wslLinuxNode = wsl -d Ubuntu -- bash -c 'test -f /usr/bin/node && echo ok || echo missing'
if ($wslLinuxNode -match "missing") {
Write-Host " Installing Node.js 20 in WSL (first time only)..." -ForegroundColor Yellow
wsl -d Ubuntu -- bash -c 'curl -fsSL https://deb.nodesource.com/setup_20.x -o /tmp/ns.sh'
wsl -d Ubuntu -- bash -c 'sudo bash /tmp/ns.sh'
wsl -d Ubuntu -- bash -c 'sudo apt-get install -y nodejs'
Write-Host " Node.js installed in WSL" -ForegroundColor Green

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The WSL discovery and installation commands do not validate their exit status. If Ubuntu is unavailable or curl, sudo, or apt fails, $wslLinuxNode may not contain missing, causing the script to print that Node.js was installed or already available and continue to TrueForge setup. Check $LASTEXITCODE after every native wsl invocation and stop with an actionable error when setup fails. [possible bug]

Severity Level: Major ⚠️
- ❌ Clean WSL setup can continue without Node.js.
- ❌ TrueForge launch fails after a misleading success message.
- ⚠️ Users receive no actionable WSL installation error.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** start.ps1
**Line:** 61:67
**Comment:**
	*Possible Bug: The WSL discovery and installation commands do not validate their exit status. If Ubuntu is unavailable or curl, sudo, or apt fails, `$wslLinuxNode` may not contain `missing`, causing the script to print that Node.js was installed or already available and continue to TrueForge setup. Check `$LASTEXITCODE` after every native `wsl` invocation and stop with an actionable error when setup fails.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment thread start.ps1
Comment on lines +77 to +78
wsl -d Ubuntu -- bash -c 'export PATH=/usr/bin:/usr/local/bin:$PATH && npm install -g @truefoundry/trueforge'
Write-Host " TrueForge installed in WSL" -ForegroundColor Green

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: npm install -g is executed as the normal WSL user after installing the apt-provided Node.js, whose global npm prefix is normally root-owned. On a clean Ubuntu installation this commonly fails with a permissions error, but the script still prints that TrueForge was installed and proceeds to launch it. Install into a user-writable prefix, invoke npm with the required privileges, or verify the command succeeds before reporting success. [possible bug]

Severity Level: Major ⚠️
- ❌ First-run TrueForge installation can fail.
- ❌ The advertised TrueForge UI may never start.
- ⚠️ Users receive a false installation-success message.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** start.ps1
**Line:** 77:78
**Comment:**
	*Possible Bug: `npm install -g` is executed as the normal WSL user after installing the apt-provided Node.js, whose global npm prefix is normally root-owned. On a clean Ubuntu installation this commonly fails with a permissions error, but the script still prints that TrueForge was installed and proceeds to launch it. Install into a user-writable prefix, invoke npm with the required privileges, or verify the command succeeds before reporting success.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment thread start.ps1

# Launch TrueForge in WSL
Write-Host " Launching TrueForge in WSL..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -d Ubuntu -- bash -c 'export PATH=/usr/bin:/usr/local/bin:`$PATH && cd ~ && npx @truefoundry/trueforge'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The launch bypasses scripts/wsl/start-trueforge.sh, which loads the repository .env, validates OPENAI_API_KEY, adds the supported user-local Node path, binds TrueForge to 0.0.0.0, and explicitly selects port 3000. Running npx from ~ without those settings can start a differently configured or loopback-only server, making it unreachable from the dashboard or lacking the required credentials. [api mismatch]

Severity Level: Major ⚠️
- ❌ Dashboard agent chat may fail to reach TrueForge.
- ❌ Webhook incident sessions may fail authentication.
- ⚠️ Repository `.env` configuration is ignored.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** start.ps1
**Line:** 85:85
**Comment:**
	*Api Mismatch: The launch bypasses `scripts/wsl/start-trueforge.sh`, which loads the repository `.env`, validates `OPENAI_API_KEY`, adds the supported user-local Node path, binds TrueForge to `0.0.0.0`, and explicitly selects port 3000. Running `npx` from `~` without those settings can start a differently configured or loopback-only server, making it unreachable from the dashboard or lacking the required credentials.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Global install ignored at launch 🐞 Bug ≡ Correctness
Description
After installing TrueForge globally, the script launches npx @truefoundry/trueforge from ~
without -y; because the package is not a local project dependency, npx can prompt to fetch another
copy before starting. The supposedly automatic install therefore still requires terminal
confirmation and may run the npx cache copy rather than the globally installed executable that was
just verified.
Code

start.ps1[R83-85]

+# Launch TrueForge in WSL
+Write-Host "  Launching TrueForge in WSL..." -ForegroundColor Yellow
+Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -d Ubuntu -- bash -c 'export PATH=/usr/bin:/usr/local/bin:`$PATH && cd ~ && npx @truefoundry/trueforge'"
Relevance

●●● Strong

The PR explicitly targets one-click startup, while repository history supports avoiding manual or
prompted TrueForge launches.

PR-#11
PR-#12

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The script installs and detects a global trueforge command but then invokes npx from the home
directory. npm's official documentation states that requested packages absent from local project
dependencies are fetched and prompt unless --yes is supplied; the repository launcher already uses
npx -y to avoid this prompt.

start.ps1[74-85]
scripts/wsl/start-trueforge.sh[28-30]
🌐 npm documents that npx/npm exec prompts before installing a requested package that is absent from local project dependencies, and that --yes suppresses the prompt.

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The launch command does not use the globally installed `trueforge` executable and can cause npx to prompt for another installation.

## Issue Context
Launch the detected global binary directly, or intentionally use `npx -y` and remove the redundant global-install/detection flow. Preserve the required PATH and port configuration.

## Fix Focus Areas
- start.ps1[74-85]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Install failures report success 🐞 Bug ☼ Reliability
Description
The Node setup runs download, repository setup, and apt installation as independent native commands
without checking any exit code, then unconditionally reports success. A failed download/setup
therefore still runs apt-get install nodejs against the existing Ubuntu repositories and can leave
no Node or the wrong major version while the one-click flow proceeds.
Code

start.ps1[R64-67]

+    wsl -d Ubuntu -- bash -c 'curl -fsSL https://deb.nodesource.com/setup_20.x -o /tmp/ns.sh'
+    wsl -d Ubuntu -- bash -c 'sudo bash /tmp/ns.sh'
+    wsl -d Ubuntu -- bash -c 'sudo apt-get install -y nodejs'
+    Write-Host "  Node.js installed in WSL" -ForegroundColor Green
Relevance

●● Moderate

Reliability concern is valid, but history lacks a close precedent for shell exit-code handling.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The three commands are issued independently and line 67 is reached without inspecting
$LASTEXITCODE; by comparison, the repository's WSL startup check explicitly evaluates
$LASTEXITCODE before declaring WSL usable.

start.ps1[64-67]
scripts/start-all.ps1[27-37]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Node installation stages do not short-circuit or validate native exit codes, so failed setup can be reported as a successful Node.js 20 installation.

## Issue Context
Windows PowerShell does not make a native process's nonzero exit status terminating merely because `$ErrorActionPreference` is `Stop`. Keep the setup atomic and verify the resulting Node version before continuing.

## Fix Focus Areas
- start.ps1[64-67]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Valid Node installs misdetected 🐞 Bug ≡ Correctness
Description
Node detection now accepts only /usr/bin/node, so a valid Linux-native installation under a
user-managed prefix is treated as missing and triggers an unnecessary privileged system
installation. The repository's own TrueForge launcher explicitly supports $HOME/.local/node/bin,
which this check fails to recognize.
Code

start.ps1[R61-62]

+$wslLinuxNode = wsl -d Ubuntu -- bash -c 'test -f /usr/bin/node && echo ok || echo missing'
+if ($wslLinuxNode -match "missing") {
Relevance

●●● Strong

Accepted history specifically favors supporting per-user and custom Node installations over fixed
paths.

PR-#5

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed check tests only /usr/bin/node, while the repository launcher deliberately prepends
and supports $HOME/.local/node/bin; the accepted prior review also established that fixed npm
locations break custom Node installations.

start.ps1[61-62]
scripts/wsl/start-trueforge.sh[24-26]
PR-#5

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The WSL Node check hard-codes `/usr/bin/node` and misclassifies supported user-local Linux Node installations.

## Issue Context
Use a login shell or explicitly include repository-supported user-local prefixes, then validate that the resolved executable is Linux-native rather than requiring one fixed path.

## Fix Focus Areas
- start.ps1[61-62]
- scripts/wsl/start-trueforge.sh[24-26]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Web pages:
  +2 more
Review mode: ⚖️ Balanced: This modifies a Windows startup script that installs and launches WSL Node.js/TrueForge, with multiple shell, privilege, path, and process-launch behaviors; it is materially behavioral but not dense enough to warrant redundant extended review.

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread start.ps1
Comment on lines +64 to +67
wsl -d Ubuntu -- bash -c 'curl -fsSL https://deb.nodesource.com/setup_20.x -o /tmp/ns.sh'
wsl -d Ubuntu -- bash -c 'sudo bash /tmp/ns.sh'
wsl -d Ubuntu -- bash -c 'sudo apt-get install -y nodejs'
Write-Host " Node.js installed in WSL" -ForegroundColor Green

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Install failures report success 🐞 Bug ☼ Reliability

The Node setup runs download, repository setup, and apt installation as independent native commands
without checking any exit code, then unconditionally reports success. A failed download/setup
therefore still runs apt-get install nodejs against the existing Ubuntu repositories and can leave
no Node or the wrong major version while the one-click flow proceeds.
Agent Prompt
## Issue description
The Node installation stages do not short-circuit or validate native exit codes, so failed setup can be reported as a successful Node.js 20 installation.

## Issue Context
Windows PowerShell does not make a native process's nonzero exit status terminating merely because `$ErrorActionPreference` is `Stop`. Keep the setup atomic and verify the resulting Node version before continuing.

## Fix Focus Areas
- start.ps1[64-67]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread start.ps1
Comment on lines +61 to +62
$wslLinuxNode = wsl -d Ubuntu -- bash -c 'test -f /usr/bin/node && echo ok || echo missing'
if ($wslLinuxNode -match "missing") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Valid node installs misdetected 🐞 Bug ≡ Correctness

Node detection now accepts only /usr/bin/node, so a valid Linux-native installation under a
user-managed prefix is treated as missing and triggers an unnecessary privileged system
installation. The repository's own TrueForge launcher explicitly supports $HOME/.local/node/bin,
which this check fails to recognize.
Agent Prompt
## Issue description
The WSL Node check hard-codes `/usr/bin/node` and misclassifies supported user-local Linux Node installations.

## Issue Context
Use a login shell or explicitly include repository-supported user-local prefixes, then validate that the resolved executable is Linux-native rather than requiring one fixed path.

## Fix Focus Areas
- start.ps1[61-62]
- scripts/wsl/start-trueforge.sh[24-26]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread start.ps1
Comment on lines +83 to +85
# Launch TrueForge in WSL
Write-Host " Launching TrueForge in WSL..." -ForegroundColor Yellow
Start-Process powershell -ArgumentList "-NoExit", "-Command", "wsl -d Ubuntu -- bash -c 'export PATH=/usr/bin:/usr/local/bin:`$PATH && cd ~ && npx @truefoundry/trueforge'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Global install ignored at launch 🐞 Bug ≡ Correctness

After installing TrueForge globally, the script launches npx @truefoundry/trueforge from ~
without -y; because the package is not a local project dependency, npx can prompt to fetch another
copy before starting. The supposedly automatic install therefore still requires terminal
confirmation and may run the npx cache copy rather than the globally installed executable that was
just verified.
Agent Prompt
## Issue description
The launch command does not use the globally installed `trueforge` executable and can cause npx to prompt for another installation.

## Issue Context
Launch the detected global binary directly, or intentionally use `npx -y` and remove the redundant global-install/detection flow. Preserve the required PATH and port configuration.

## Fix Focus Areas
- start.ps1[74-85]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant