Skip to content

feat: finish installs with a frontend build and keep the installer up to date - #33

Merged
roble merged 1 commit into
mainfrom
dev-24-10
Oct 24, 2026
Merged

roble merged 1 commit into
mainfrom
dev-24-10

Conversation

@roble

@roble roble commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes from the sandbox QA (sc-1069):

  • Finishing steps: a new app builds its frontend and runs a boot check (artisan about) before the success message; next steps are shown per environment (Herd, Docker, native).
  • Self-update: saucebase new on an older installer runs composer global require saucebase/installer:^<latest> and runs again (SAUCEBASE_UPDATED=1 stops a loop). A failed update warns when a minor version behind and stops when a major version behind.
  • Docker: backing services bind to 127.0.0.1; adds an ssr service; artisan runs in the container.
  • Output: the patch message shows only with -v; plain "Learn more" link.
  • stack: skips skip-worktree for generated files git doesn't track.
  • README updated.

Tests

New FinishingStepsTest, NewCommandUpdateTest, SuccessCalloutTest; existing tests updated. Suite passes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The installer checks for newer releases before creating a project and can update itself automatically or prompt you first.
    • Installation now builds frontend assets when npm is available and checks that the app boots. Follow-up instructions reflect whether assets were built.
    • Docker projects now include server-side rendering support, and backing service ports are restricted to the local machine.
  • Bug Fixes
    • Untracked generated files no longer trigger warnings when enabling development mode.
  • Documentation
    • Clarified installer updates and frontend behavior in Herd and installation guidance.

- Added instructions for upgrading the installer in README.md.
- Implemented frontend asset building in various environment classes.
- Updated InstallCommand to check for and apply installer updates.
- Introduced tests for finishing steps and installer update logic.
- Modified Docker environment to ensure services are only reachable from localhost.
- Improved handling of untracked files in StackCommand.
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The installer now checks for its own updates, builds frontend assets when possible, and verifies app startup. The Docker Compose stub adds SSR configuration and changes backing-service port bindings. Patch output and generated-file Git handling also change.

Changes: Installer self-update

Layer / File(s) Summary
Check, update, and rerun the installer
src/Console/Commands/NewCommand.php, tests/Feature/NewCommandUpdateTest.php, README.md
saucebase new can update the installer to the latest version and rerun with an update guard. Tests cover successful updates, no-op checks, and failures. The README documents the update command and behavior.

Frontend build and app startup check

Layer / File(s) Summary
Build frontend and verify app startup
src/Environments/Environment.php, src/Environments/*Environment.php, tests/Feature/Environments/*, tests/TestCase.php, tests/Feature/InstallCommandTest.php, README.md
When npm is available, installation runs npm install and npm run build, then checks app startup. Environment next steps depend on whether the frontend build succeeded. Tests cover build and startup outcomes.

Docker Compose SSR and port bindings

Layer / File(s) Summary
Configure SSR and local backing-service ports
stubs/docker/docker-compose.yml, tests/Feature/PublishDockerCommandTest.php
The Compose configuration adds an SSR service and sets INERTIA_SSR_URL. MySQL, Redis, and Mailpit ports bind to 127.0.0.1; tests check these settings.

Install command output

Layer / File(s) Summary
Adjust patch status and success callout
src/Console/Commands/InstallCommand.php, tests/Feature/InstallCommandPatchesTest.php, tests/Unit/SuccessCalloutTest.php
Patch status messages include the module and filename and appear only at verbose output. The success callout displays a plain-text URL.

Generated-file Git handling

Layer / File(s) Summary
Skip untracked generated files
src/Console/Commands/StackCommand.php, tests/Feature/StackCommandTest.php
The command does not set skip-worktree for untracked generated files. Git error output is included when setting the flag fails.

Priority: Not assessed

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant CLI as saucebase new
  participant NewCommand
  participant Composer
  CLI->>NewCommand: Start project setup
  NewCommand->>Composer: Require latest installer version
  Composer-->>NewCommand: Return update result
  NewCommand->>NewCommand: Rerun with SAUCEBASE_UPDATED=1
Loading
sequenceDiagram
  participant Installer
  participant npm
  participant LaravelApp
  Installer->>npm: Install dependencies and build frontend
  Installer->>LaravelApp: Run artisan about --only=environment
  LaravelApp-->>Installer: Return startup result
Loading

Possibly related PRs

  • saucebase-dev/installer#31: It introduced Laravel Process facade usage and process fakes used by the update and frontend-build changes.
  • saucebase-dev/installer#32: It changed generated app entry-point handling, which this PR follows by skipping untracked files when setting skip-worktree.
Merge Risk: Moderate · up to 4577c

Fresh Docker installs can stall at "Starting Docker services" because the new SSR container restarts until its bundle is built, and the build only runs after startup. Fix this before merging. Two smaller issues remain: a Composer update timeout bypasses the intended warn-or-stop policy, and a failed app-boot check on native or Herd installs gives no error details.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@sonarqubecloud

Copy link
Copy Markdown

@roble
roble merged commit 98aca6f into main Oct 24, 2026
3 of 4 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