Skip to content

fix: make Windows clean install resume automatically - #20

Merged
oll4com merged 10 commits into
mainfrom
fix/windows-clean-install
Jul 26, 2026
Merged

oll4com merged 10 commits into
mainfrom
fix/windows-clean-install

Conversation

@oll4com

@oll4com oll4com commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • make npx --yes run-spaceapp install the universal Linux, macOS, and Windows 11 Command Prompt installer
  • default clean installs to the lightweight 8 GB profile
  • resume automatically after the Windows WSL2 reboot boundary
  • synchronize repeated installs to the launcher version without replacing user data or secrets
  • clarify first-owner setup and remove misleading login defaults
  • add loopback-safe HTML security headers and browser-compatible form semantics

Verification

  • public suite: 60/60
  • API selected suite: 16/16
  • web selected suite: 13/13
  • launcher suite: 70/70
  • npm audit --audit-level=high: 0 vulnerabilities
  • public export/readiness/package dry-run: passed
  • repository type-check and production build: passed
  • VM219 Windows 11, 4 vCPU, 8 GB RAM: final core healthy, /readyz 200
  • Chrome DevTools: 0 console messages, 14/14 initial requests HTTP 200, reviewed security headers present

Release

This prepares 0.1.11. The release workflow should publish npm and GHCR under next; keep latest=0.1.10 until the final public clean-room Windows acceptance passes.

Summary by CodeRabbit

  • New Features

    • Introduced release 0.1.11 with both spaceapp and run-spaceapp launcher commands.
    • Added a universal npx --yes run-spaceapp install workflow across supported platforms.
    • Added Windows restart and one-time installation resume support.
    • Installation now defaults to the lightweight profile, with standard available explicitly.
  • Bug Fixes

    • Improved security protections for local web pages.
    • Improved authentication form labeling and field stability.
  • Documentation

    • Updated installation, Windows, profile, update, and rollback guidance for 0.1.11.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@oll4com, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5556a76b-1d69-4b42-826b-b85417dde7c5

📥 Commits

Reviewing files that changed from the base of the PR and between 1405ddc and ed232c5.

📒 Files selected for processing (7)
  • apps/web/server-routing.mjs
  • apps/web/server.mjs
  • apps/web/src/App.tsx
  • apps/web/tests/owner-setup.test.tsx
  • apps/web/tests/server-routing.test.mjs
  • packages/run-spaceapp/src/index.mjs
  • packages/run-spaceapp/tests/config.test.mjs
📝 Walkthrough

Walkthrough

The release updates the universal installer, light-profile defaults, Windows restart resumption, package metadata, release documentation, web security headers, and authentication form accessibility and field stability.

Changes

Installer and release workflow

Layer / File(s) Summary
CLI, package, and profile contracts
packages/run-spaceapp/package.json, packages/run-spaceapp/src/index.mjs, packages/run-spaceapp/tests/*
The package exposes spaceapp and run-spaceapp, automatic profile selection now resolves to light, and configuration synchronization and command contracts are updated.
Windows restart and resume flow
packages/run-spaceapp/src/prerequisites.mjs, packages/run-spaceapp/src/cli.mjs, packages/run-spaceapp/tests/prerequisites.test.mjs
Windows installation detects pending restarts, registers a RunOnce resume script, optionally invokes shutdown.exe, and reports resumption status.
Universal installation and release documentation
README.md, docs/*, packages/run-spaceapp/README.md, CHANGELOG.md, scripts/tests/public-package-metadata.test.mjs
Documentation and metadata describe the npx installer, Command Prompt guidance, light-profile defaults, version 0.1.11, and revised release rollback expectations.

Web security and authentication forms

Layer / File(s) Summary
Local application security headers
apps/web/server-routing.mjs, apps/web/server.mjs, apps/web/tests/server-routing.test.mjs
Non-homepage responses now receive static local security headers, with routing tests covering the header values.
Authentication form semantics
apps/web/src/App.tsx, apps/web/src/features/auth/OwnerSetupScreen.tsx, apps/web/tests/owner-setup.test.tsx
Login and owner setup fields receive explicit labels, stable ids and names, an empty email default, and email-first ordering verified by tests.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant run-spaceapp
  participant DockerPrerequisites
  participant Windows
  participant ResumeScript
  User->>run-spaceapp: run npx --yes run-spaceapp install
  run-spaceapp->>DockerPrerequisites: check WSL and Docker readiness
  DockerPrerequisites->>Windows: detect pending restart
  DockerPrerequisites->>ResumeScript: register one-time continuation
  DockerPrerequisites->>Windows: request restart
  Windows->>ResumeScript: execute after sign-in
  ResumeScript->>run-spaceapp: continue installation
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and accurately reflects the Windows auto-resume installer behavior, which is a major part of this changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🧹 Nitpick comments (1)
packages/run-spaceapp/tests/prerequisites.test.mjs (1)

141-149: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the real PowerShell operation in the mocked execute branch.

windows-wsl-ready is not defined in windowsPowerShellArgs, while ensureWindowsDocker calls execute for "windows-restart-pending" immediately after its WSL install path. Update both mock branches to handle "windows-restart-pending" so the test exercises that real operation instead of an unknown branch.

♻️ Suggested fix (apply to both occurrences)
-      if (spec.operation === "windows-wsl-ready") {
+      if (spec.operation === "windows-restart-pending") {
         return 0;
       }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/run-spaceapp/tests/prerequisites.test.mjs` around lines 141 - 149,
Update both mocked powershell.exe execute branches in the prerequisite test to
recognize the real "windows-restart-pending" operation instead of
"windows-wsl-ready", returning the same success result so ensureWindowsDocker
exercises its actual restart-pending flow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/src/App.tsx`:
- Around line 5491-5499: Update the email input within the operator email field
to include the email input type, while preserving its existing id, name, value,
change handler, and autocomplete behavior.

In `@apps/web/tests/server-routing.test.mjs`:
- Around line 28-38: Add route-level coverage for a non-/homepage HTML response
in the local app security-header tests, using the actual routing/integration
path rather than calling localAppSecurityHeaders() directly. Assert the complete
local header contract, including the expected permissions-policy value alongside
the existing CSP, referrer, frame, and absent HSTS checks.

In `@packages/run-spaceapp/src/index.mjs`:
- Around line 493-503: Update initializeInstallation so a requested profile is
resolved before the clean-root createDefaultConfig call; ensure profile "auto"
is converted via resolveInstallProfile before validation while preserving
explicit profile behavior and the existing version update flow.

---

Nitpick comments:
In `@packages/run-spaceapp/tests/prerequisites.test.mjs`:
- Around line 141-149: Update both mocked powershell.exe execute branches in the
prerequisite test to recognize the real "windows-restart-pending" operation
instead of "windows-wsl-ready", returning the same success result so
ensureWindowsDocker exercises its actual restart-pending flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8a449d93-5462-4bf1-a554-d88813efdbf9

📥 Commits

Reviewing files that changed from the base of the PR and between 4443cc6 and 1405ddc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (21)
  • CHANGELOG.md
  • README.md
  • apps/web/server-routing.mjs
  • apps/web/server.mjs
  • apps/web/src/App.tsx
  • apps/web/src/features/auth/OwnerSetupScreen.tsx
  • apps/web/tests/owner-setup.test.tsx
  • apps/web/tests/server-routing.test.mjs
  • docs/clean-room-testing.md
  • docs/getting-started.md
  • docs/operations.md
  • docs/public-release.md
  • packages/run-spaceapp/README.md
  • packages/run-spaceapp/package.json
  • packages/run-spaceapp/src/cli.mjs
  • packages/run-spaceapp/src/index.mjs
  • packages/run-spaceapp/src/prerequisites.mjs
  • packages/run-spaceapp/tests/command-contracts.test.mjs
  • packages/run-spaceapp/tests/config.test.mjs
  • packages/run-spaceapp/tests/prerequisites.test.mjs
  • scripts/tests/public-package-metadata.test.mjs

Comment thread apps/web/src/App.tsx Resolved
Comment thread apps/web/tests/server-routing.test.mjs Resolved
Comment thread packages/run-spaceapp/src/index.mjs Resolved
@oll4com
oll4com merged commit c53e6dd into main Jul 26, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant