Skip to content

fix: bypass Edge first-run during Windows setup - #21

Merged
oll4com merged 1 commit into
mainfrom
fix/windows-edge-first-run
Jul 26, 2026
Merged

oll4com merged 1 commit into
mainfrom
fix/windows-edge-first-run

Conversation

@oll4com

@oll4com oll4com commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Improved Windows browser launching with safer local URL validation and reliable Edge startup behavior.
  • Bug Fixes
    • Tightened command and environment handling for Windows operations.
    • Ensured standard package actions preserve expected environment settings.
  • Release
    • Updated the run-spaceapp package to version 0.1.12.
  • Tests
    • Expanded coverage for Windows browser launching, command contracts, package metadata, and runtime behavior.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Windows browser opener now uses a validated PowerShell operation with SPACEAPP_OPEN_URL, while trusted command handling and tests are updated. The run-spaceapp version and related publish, rollback, and runtime contract expectations are updated to 0.1.12.

Changes

run-spaceapp opener and release updates

Layer / File(s) Summary
Windows browser operation
packages/run-spaceapp/src/cli.mjs, packages/run-spaceapp/src/prerequisites.mjs
Windows open uses powershell.exe and open-spaceapp-browser; the operation validates local HTTP URLs, launches Edge when available, and falls back to explorer.exe.
Browser flow validation
packages/run-spaceapp/tests/cli.test.mjs, packages/run-spaceapp/tests/command-contracts.test.mjs, packages/run-spaceapp/tests/prerequisites.test.mjs
Tests cover the updated trusted executable list, PowerShell opener specification, environment propagation, operation registration, and generated script contents.
Release and runtime contracts
packages/run-spaceapp/package.json, packages/run-spaceapp/tests/command-contracts.test.mjs, packages/run-spaceapp/tests/runtime.test.mjs, scripts/tests/public-package-metadata.test.mjs
Version expectations change to 0.1.12, rollback assertions are updated, publish metadata matches the new version, and pull is asserted to omit a custom environment.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: bypassing Edge first-run behavior during Windows setup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

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

50-58: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Cover invalid URL behavior, not only script markers.

Add Windows-level or equivalent behavioral tests for rejecting https, external hosts, and ports outside 1024–65535, plus accepting an allowed local URL. The current assertions can pass even if the validation logic is accidentally weakened.

🤖 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 50 - 58, Add
behavioral coverage around windowsPowerShellArgs for URL validation: assert that
https URLs, external hosts, and ports outside 1024–65535 are rejected, while an
allowed local URL is accepted. Retain the existing script-marker assertions, but
verify the actual validation outcomes rather than only generated-script
contents.
🤖 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.

Nitpick comments:
In `@packages/run-spaceapp/tests/prerequisites.test.mjs`:
- Around line 50-58: Add behavioral coverage around windowsPowerShellArgs for
URL validation: assert that https URLs, external hosts, and ports outside
1024–65535 are rejected, while an allowed local URL is accepted. Retain the
existing script-marker assertions, but verify the actual validation outcomes
rather than only generated-script contents.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 40d23d06-9fa0-4e5c-ab3d-21fb96d127a3

📥 Commits

Reviewing files that changed from the base of the PR and between c53e6dd and 7b48e1b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • packages/run-spaceapp/package.json
  • packages/run-spaceapp/src/cli.mjs
  • packages/run-spaceapp/src/prerequisites.mjs
  • packages/run-spaceapp/tests/cli.test.mjs
  • packages/run-spaceapp/tests/command-contracts.test.mjs
  • packages/run-spaceapp/tests/prerequisites.test.mjs
  • packages/run-spaceapp/tests/runtime.test.mjs
  • scripts/tests/public-package-metadata.test.mjs

@oll4com
oll4com merged commit 55dff63 into main Jul 26, 2026
25 of 26 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