Skip to content

fix(installer): remove browser when switching to light - #23

Merged
oll4com merged 2 commits into
mainfrom
fix/light-profile-browser-cleanup
Jul 27, 2026
Merged

oll4com merged 2 commits into
mainfrom
fix/light-profile-browser-cleanup

Conversation

@oll4com

@oll4com oll4com commented Jul 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • explicitly stop and remove the managed browser container after a successful light install
  • preserve browser storage and every other persistent Docker volume
  • keep the cleanup idempotent so it repairs standard -> light upgrades and state left by the unpromoted 0.1.13 candidate
  • release the immutable correction as 0.1.14

Root cause

Docker Compose does not classify a service disabled by profiles as an orphan. As a result, up -d --remove-orphans retained an already-running spaceapp-browser container when an existing standard installation moved to light.

Verification

  • regression test demonstrated the retained browser before the implementation
  • launcher tests: 77/77 passed
  • public launcher suite: 61/61 passed
  • full npm run test:public passed
  • npm run check passed
  • npm run build passed
  • npm audit --audit-level=high: 0 vulnerabilities
  • npm pack --dry-run: run-spaceapp@0.1.14, 11 files
  • sanitized public export verification passed (425 files)
  • hygiene status and preflight passed

Safety

The cleanup uses fixed Compose argv with --profile standard rm --stop --force spaceapp-browser. It does not run Compose down or pass --volumes. Failed cleanup returns before committing new installer configuration/runtime files.

Summary by CodeRabbit

  • New Features

    • Light-profile installations now automatically remove obsolete managed browser containers.
    • Existing browser storage and other Docker volumes are preserved during cleanup.
    • Cleanup is safe to repeat and can repair state from the previous release.
  • Release

    • Published version 0.1.14 with updated installation, upgrade, refresh, and rollback guidance.

Compose does not classify a service disabled by profiles as an orphan. Stop and remove the managed browser container explicitly during successful light installs while preserving its storage and all other volumes.
@coderabbitai

coderabbitai Bot commented Jul 27, 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: 53 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: 19259382-0e96-42e2-b2d3-e1fc14c0b4de

📥 Commits

Reviewing files that changed from the base of the PR and between 6bef602 and ba18ed8.

📒 Files selected for processing (2)
  • packages/run-spaceapp/src/cli.mjs
  • packages/run-spaceapp/tests/cli.test.mjs
📝 Walkthrough

Walkthrough

This release updates run-spaceapp to 0.1.14 and adds light-profile cleanup for managed browser containers. Installation and refresh invoke a standard-profile forced removal without deleting volumes, with tests covering command construction, idempotency, version state, and cleanup failures.

Changes

Release metadata and version assertions

Layer / File(s) Summary
Release metadata and version alignment
CHANGELOG.md, docs/public-release.md, packages/run-spaceapp/package.json, packages/run-spaceapp/tests/command-contracts.test.mjs, scripts/tests/public-package-metadata.test.mjs
Release documentation, package metadata, rollback expectations, and publishable metadata are updated from 0.1.13 to 0.1.14.
Managed browser cleanup flow
packages/run-spaceapp/src/cli.mjs, packages/run-spaceapp/src/index.mjs, packages/run-spaceapp/tests/cli.test.mjs, packages/run-spaceapp/tests/runtime.test.mjs
Light-profile installation and refresh force-remove spaceapp-browser through the standard Compose profile, preserve volumes, propagate cleanup failures, and verify the behavior in CLI and runtime tests.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • oll4com/spaceapp#22: Both changes modify the install flow in packages/run-spaceapp/src/cli.mjs.
🚥 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 accurately summarizes the main change: removing the browser when switching from standard to light installs.
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.

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: 1

🤖 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 `@packages/run-spaceapp/src/cli.mjs`:
- Around line 425-441: Update the installation flow around persistSetupToken and
the light-profile removeBrowser cleanup so setup-token persistence remains
atomic with commitInstallation. Defer persisting the new token until cleanup
succeeds, or restore the previous token before returning when removeBrowserCode
is nonzero, ensuring failed installations cannot leave a token without the
corresponding committed config.
🪄 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: 47731fc3-d224-401c-bc06-3e43c4f31743

📥 Commits

Reviewing files that changed from the base of the PR and between 14a0f11 and 6bef602.

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

Comment thread packages/run-spaceapp/src/cli.mjs Resolved
Delay setup-token persistence until browser cleanup succeeds so failed light installs leave all committed host state unchanged.
@oll4com
oll4com merged commit f6956f3 into main Jul 27, 2026
21 checks passed
@oll4com
oll4com deleted the fix/light-profile-browser-cleanup branch July 27, 2026 05:51
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