Skip to content

[Feat] Site Tooling#1119

Open
RichardAnderson wants to merge 20 commits into
vitodeploy:4.xfrom
RichardAnderson:feat/site-tooling
Open

[Feat] Site Tooling#1119
RichardAnderson wants to merge 20 commits into
vitodeploy:4.xfrom
RichardAnderson:feat/site-tooling

Conversation

@RichardAnderson
Copy link
Copy Markdown
Member

@RichardAnderson RichardAnderson commented May 23, 2026

This pull request introduces several enhancements and refactorings to the site's tooling and user isolation management, as well as improvements to real-time update broadcasting for site and server changes. The main themes are: expanding and standardizing isolated user and tooling management, adding new actions for site tooling installation/uninstallation, and ensuring clients are notified of important changes via broadcast events.

If you have any existing Mise Bun / Mise Node sites (introduced by another PR in 4.x) then you will need to run one or both of the below commands to "update" your sites to the new system.

php artisan tinker --execute="echo App\Models\Site::where('type', 'mise_bun')->update(['type' => 'bun']);"
php artisan tinker --execute="echo App\Models\Site::where('type', 'mise_nodejs')->update(['type' => 'node']);"

@RichardAnderson RichardAnderson marked this pull request as ready for review May 24, 2026 15:01
@RichardAnderson RichardAnderson requested a review from Copilot May 24, 2026 15:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands Vito’s “site tooling” and isolated user management by introducing an isolated_users model/table, a tooling registry (mise-based) with install/uninstall workflows, new proxied site types (Node/Bun) with bootstrap worker behavior, and broader real-time broadcasting so clients receive updated site/server warnings and state.

Changes:

  • Add isolated_users persistence + backfill migration, plus model/factory support and back-compat accessors/tests.
  • Introduce a tooling abstraction (registry + providers + UI + jobs) and standardize PATH/environment injection via SiteShellEnvironment.
  • Add/replace proxied site types (node, bun) with first-deploy bootstrap worker creation and improved broadcast-driven UI updates.

Reviewed changes

Copilot reviewed 118 out of 124 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/Unit/SiteShellEnvironmentTest.php Unit coverage for PATH/env collection and wrapping behavior.
tests/Unit/NodeSiteTest.php Unit coverage for Node site type command generation/script defaults.
tests/Unit/Models/SiteTypeResolutionTest.php Ensures legacy type strings resolve and deprecated NodeJS throws.
tests/Unit/MiseSiteTypeTest.php Removes legacy Mise site type tests.
tests/Unit/MiseBunSiteTypeTest.php Removes legacy Mise Bun tests.
tests/Unit/IsolatedUserModelTest.php Unit coverage for installed_tooling read/write + lock key compatibility.
tests/Unit/BunSiteTest.php Unit coverage for Bun site type behavior and script defaults.
tests/Unit/AbstractProxiedSiteTypeTest.php Unit coverage for proxied site behaviors and supervisor template rendering.
tests/Feature/WorkersTest.php Feature tests for protecting site-managed (bootstrap) workers.
tests/Feature/WarningsBroadcastTest.php Feature tests verifying broadcasted warning payloads.
tests/Feature/SitesTest.php Updates site creation datasets for new Node/Bun site types/tooling fields.
tests/Feature/SiteSettingsProxiedSiteTest.php Feature tests for proxied-site settings (port/start command) and warnings.
tests/Feature/SiteAccessorBackcompatTest.php Ensures legacy sites.user / ssh key fields still behave with new iuser FK.
tests/Feature/IsolatedUserMigrationTest.php Validates isolated user backfill migration logic.
tests/Feature/ApplicationTest.php Ensures Application page passes bootstrap worker only for proxied sites.
tests/Feature/API/WorkersTest.php API coverage for bootstrap worker edit/delete restrictions.
tests/Feature/AfterDeployHookTest.php Ensures after-deploy bootstrap worker creation/adoption behavior.
resources/views/ssh/services/process-manager/supervisor/restart-worker.blade.php Adds reread/update before restart for worker restarts.
resources/views/ssh/mise/uninstall-runtime.blade.php Adds mise runtime uninstall script.
resources/views/ssh/mise/install-runtime.blade.php Makes mise shims available in interactive shells by updating rc files.
resources/js/types/worker.d.ts Adds is_site_bootstrap to worker TS type.
resources/js/types/site.d.ts Adds isolated user + proxied-site fields and new warning union member.
resources/js/types/site-tooling.d.ts Adds props/types for site tooling UI page.
resources/js/types/isolated-user.d.ts Switches from specific runtime fields to runtime_versions map.
resources/js/types/index.d.ts Adds tooling config catalogue + ToolingDescriptor type.
resources/js/types/dynamic-field-config.d.ts Adds tooling field types + optionLabels support.
resources/js/pages/workers/components/worker-row-actions.tsx Extracts worker action/log dialogs into reusable component.
resources/js/pages/workers/components/columns.tsx Disables edit/delete UI for site-managed workers; adds tooltip messaging.
resources/js/pages/sites/show.tsx Uses realtime record hook for site updates.
resources/js/pages/site-tooling/index.tsx New tooling management page with socket-driven reload/toasts.
resources/js/pages/site-tooling/components/tooling-table.tsx Tooling table UI (install/uninstall, status indicators, confirmation dialog).
resources/js/pages/site-settings/components/start-command.tsx New dialog UI for updating proxied-site start command.
resources/js/pages/site-settings/components/port.tsx New dialog UI for updating proxied-site port.
resources/js/pages/servers/overview.tsx Switches overview to realtime server record.
resources/js/pages/application/components/proxied-app-card.tsx New proxied-site card (port/start command/worker controls).
resources/js/pages/application/components/deployment-script.tsx Shows available tooling commands and links to Tooling area.
resources/js/pages/application/components/app-with-deployment.tsx Integrates proxied app card and realtime site record into Application page.
resources/js/layouts/server/layout.tsx Adds “Tooling” nav item for isolated/ready sites.
resources/js/components/site-banners.tsx Adds “needs first deploy” banner.
resources/js/components/server-banners.tsx Moves reboot/updates banners to warning-based payload from server resource.
database/migrations/2026_05_24_100123_create_isolated_users_table.php Creates isolated_users, adds sites.isolated_user_id, backfills data.
database/factories/SiteFactory.php Auto-creates/assigns isolated user after creating isolated sites.
database/factories/IsolatedUserFactory.php Adds isolated user factory.
config/app.php Registers ToolingServiceProvider.
app/WorkflowActions/Site/CreateNodeJsSite.php Updates workflow input contract for new node site type fields.
app/Tooling/YarnTooling.php Adds Yarn tooling provider descriptor.
app/Tooling/ToolingRegistry.php Adds tooling registry lookup + command reference detection.
app/Tooling/ToolingInterface.php Defines tooling provider interface.
app/Tooling/SiteToolingState.php Centralizes tooling status/version updates + socket broadcast.
app/Tooling/PnpmTooling.php Adds pnpm tooling provider descriptor.
app/Tooling/NodeTooling.php Adds Node tooling provider descriptor.
app/Tooling/BunTooling.php Adds Bun tooling provider descriptor.
app/Tooling/AbstractTooling.php Base tooling implementation helpers.
app/Tooling/AbstractMiseTooling.php Mise-based tooling install/uninstall implementations.
app/Tables/SiteTable.php Eager-loads isolated user and delegates warnings to model method.
app/Tables/ServerTable.php Delegates warnings to model method.
app/SSH/Mise/Mise.php Adds uninstall runtime support.
app/SiteTypes/SiteType.php Extends interface with afterDeploy + defaultDeploymentScript.
app/SiteTypes/PHPSite.php Migrates create-time tooling to registry-based implementation.
app/SiteTypes/PHPBlank.php Reuses PHPSite rules/data and registry-based tooling installation.
app/SiteTypes/NodeSite.php New proxied Node site type using tooling picker/selector + script defaults.
app/SiteTypes/NodeJS.php Deprecates legacy NodeJS site type (throws on install).
app/SiteTypes/MiseSiteType.php Removes legacy Mise base site type.
app/SiteTypes/MiseNodeJS.php Removes legacy Mise Node site type.
app/SiteTypes/MiseBun.php Removes legacy Mise Bun site type.
app/SiteTypes/Concerns/UsesMiseRuntime.php Removes legacy Mise runtime concern.
app/SiteTypes/BunSite.php New proxied Bun site type using tooling picker + script defaults.
app/SiteTypes/AbstractSiteType.php Adds deployment env collection, afterDeploy hook, tooling install helper.
app/SiteTypes/AbstractProxiedSiteType.php New base for proxied sites + bootstrap worker behavior + default scripts.
app/Services/ProcessManager/Supervisor.php Refactors to Worker-based config writing/creation APIs.
app/Services/ProcessManager/ProcessManager.php Updates interface to accept Worker + add writeConfig().
app/Providers/WorkflowServiceProvider.php Removes legacy “create-nodejs-site” workflow action registration.
app/Providers/ToolingServiceProvider.php Registers tooling providers in config.
app/Providers/SiteTypeServiceProvider.php Registers new Node/Bun site types and updates PHP/Laravel tooling fields.
app/Policies/WorkerPolicy.php Prevents deletion of site-managed bootstrap workers.
app/Models/Worker.php Adds environment composition + isSiteBootstrap() helper.
app/Models/Server.php Adds isolatedUsers relation and server warning generation.
app/Models/Metric.php Broadcasts server updates when reboot-required state transitions.
app/Models/IsolatedUser.php New model for isolated users + tooling state helpers + lock.
app/Jobs/Worker/RefreshSiteWorkerConfigsJob.php Job to refresh worker configs/restart workers based on tooling changes.
app/Jobs/Worker/EditJob.php Uses new process manager API to recreate worker config.
app/Jobs/Worker/CreateJob.php Uses new process manager API and broadcasts site update after worker create.
app/Jobs/SSL/CreateLetsEncryptWildcardSslJob.php Broadcasts site updates for sites affected by wildcard SSL changes.
app/Jobs/Site/Tooling/UninstallSiteToolingJob.php Adds async tooling uninstall workflow + worker refresh dispatch.
app/Jobs/Site/Tooling/InstallSiteToolingJob.php Adds async tooling install workflow + worker refresh dispatch.
app/Jobs/Site/DeployJob.php Calls site-type afterDeploy hook and broadcasts site update after deploy.
app/Jobs/HostedDomain/SetupHostedDomainSslJob.php Broadcasts site updates on SSL setup success/failure.
app/Http/Resources/WorkerResource.php Exposes is_site_bootstrap to clients.
app/Http/Resources/SiteResource.php Exposes isolated user/proxied-site fields and delegates warnings to model.
app/Http/Resources/ServerResource.php Exposes server warnings.
app/Http/Controllers/WorkerController.php Eager-loads site data needed to compute bootstrap worker flag.
app/Http/Controllers/SiteToolingController.php Adds tooling page + install/uninstall endpoints for sites.
app/Http/Controllers/SiteSettingController.php Adds port/start-command update endpoints (Action-driven).
app/Http/Controllers/ApplicationController.php Passes bootstrap worker for proxied site types to the Application page.
app/Helpers/SiteShellEnvironment.php Centralizes env/PATH computation and command wrapping for site shells.
app/Enums/NodePackageManager.php Adds mapping between tool ids and package manager enum.
app/DTOs/DynamicField.php Adds tooling field builders and option label support.
app/Actions/Worker/RefreshSiteWorkerConfigs.php Refreshes supervisor configs and restarts impacted workers after tooling changes.
app/Actions/Worker/EditWorker.php Blocks editing site-managed bootstrap workers with validation error.
app/Actions/Worker/DeleteWorker.php Blocks deleting site-managed bootstrap workers with validation error.
app/Actions/SSL/AssignSslToDomains.php Broadcasts site update when hosted domain SSL assignment changes.
app/Actions/Site/UpdateVhostGeneration.php Broadcasts site update after toggling vhost generation.
app/Actions/Site/UpdateStartCommand.php Adds Action for updating proxied-site start command + worker config write.
app/Actions/Site/UpdatePort.php Adds Action for updating proxied-site port + vhost regeneration.
app/Actions/Site/UpdatePHPVersion.php Uses isolated user lock where available.
app/Actions/Site/Tooling/UninstallSiteTooling.php Adds Action to validate and dispatch uninstall tooling job + status set.
app/Actions/Site/Tooling/InstallSiteTooling.php Adds Action to validate and dispatch install tooling job + status set.
app/Actions/Site/Tooling/GetSiteTooling.php Supplies props for tooling page (siblings, installed versions, statuses).
app/Actions/Site/GetIsolatedUsers.php Switches isolated user listing to iuser-backed version map.
app/Actions/Site/EnableSsl.php Broadcasts site update after enabling SSL.
app/Actions/Site/DisableSsl.php Broadcasts site update after disabling SSL.
app/Actions/Site/DeleteSite.php Deletes isolated user record when last sibling site is removed.
app/Actions/Site/CreateSite.php Creates/links isolated user during site creation and locks tooling to existing iuser versions.
app/Actions/Site/BroadcastSiteUpdate.php Central helper for broadcasting site.updated.
app/Actions/Server/BroadcastServerUpdate.php Central helper for broadcasting server.updated.
app/Actions/HostedDomain/ReactivateHostedDomain.php Broadcasts site update when hosted domain reactivation starts.
app/Actions/HostedDomain/DeleteHostedDomain.php Broadcasts site update after hosted domain deletion + vhost update.
app/Actions/HostedDomain/DeactivateHostedDomain.php Broadcasts site update after deactivation + vhost update.
app/Actions/HostedDomain/ActivateHostedDomain.php Broadcasts site update after activation.
app/Actions/Bootstrap/GetBootstrap.php Adds tooling catalogue to bootstrap configs.

Comment thread app/Actions/Site/UpdateStartCommand.php Outdated
Comment thread resources/js/pages/application/components/app-with-deployment.tsx Outdated
Comment thread app/SiteTypes/NodeSite.php
Comment thread app/SiteTypes/BunSite.php
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.

2 participants