Skip to content

fix: rebuild production UI during managed app updates - #5823

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtjpe3q0/agent-5f167808
Sep 2, 2026
Merged

fix: rebuild production UI during managed app updates#5823
atomantic merged 1 commit into
mainfrom
cos/task-mtjpe3q0/agent-5f167808

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Managed Update app (Apps → Git → Repository sources) pulled, installed dependencies, ran setup, and restarted — but it never rebuilt the production UI. For PortOS that left client/dist older than the pulled UI source, so the install immediately reported Install out of sync and required a second Reconcile (which runs update.sh, including npm run build) plus another restart.

The managed updater now rebuilds the production UI before restarting whenever the app has a buildCommand or a scripts.build entry, using the same allowlisted build-command parser as the dedicated Build action. The confirmation modal lists that rebuild step so the action matches what actually runs.

Test plan

  • Server: npx vitest run services/appUpdater.test.js (build before restart; package.json fallback; no invented build; disallowed command refused; Bun uses bun run build)
  • Client: npx vitest run src/components/apps/tabs/RepositorySourcePanel.test.jsx (modal lists the UI rebuild)
  • On a PortOS install with a pending source update, use Apps → PortOS → Git → Update app and confirm it no longer lands on Install out of sync / “served client build is older than the UI source”
  • Confirm a managed app without a build script still updates (install + setup + restart only)
  • Confirm an invalid buildCommand fails the update and does not restart

Managed Update app pulled, installed, and restarted without building
client/dist. For PortOS that left the install out of sync and required a
second Reconcile just to rebuild the UI.
@atomantic
atomantic merged commit dd1f1d3 into main Sep 2, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtjpe3q0/agent-5f167808 branch September 2, 2026 06:35
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