Skip to content

fix(dashboard): rescan deployment configuration when branches change - #855

Open
AbdullahM07 wants to merge 1 commit into
oblien:mainfrom
AbdullahM07:fix/852-branch-framework-rescan
Open

AbdullahM07 wants to merge 1 commit into
oblien:mainfrom
AbdullahM07:fix/852-branch-framework-rescan

Conversation

@AbdullahM07

Copy link
Copy Markdown
Member

Summary

Changing the branch in the deploy wizard now scans the selected ref and applies the branch and its detected configuration together. A branch without a recognizable framework opens the manual picker instead of retaining the previous branch's Compose detection.

Motivation

The selector only updated config.branch. Repository initialization also preferred the saved branch and build defaults over an explicit branch override, so deployments could use a different tree from the one described by the UI.

Related issue

Fixes #852

Changes

  • Rebuild framework, Compose services/path, monorepo apps, and mode defaults from the selected branch; preserve project env edits, destination settings, and single-app domains/redirects.
  • Serialize branch and Compose-path scans, disable Save/Deploy while scanning, and retain the last valid configuration with an inline error if scanning fails.
  • Persist the chosen branch on config save and send the single-app deployment mode explicitly so retained service rows cannot override the new branch's detected topology.
  • Add nine interaction regressions using the actual selector and deployment hooks, with Happy DOM as a test-only dependency. Keep the manual framework picker within mobile widths.

Verification

bun run test -- --filter=!openship -- --maxWorkers=2
  6 workspace tasks successful; dashboard: 114 files, 1190 tests passed

bun run --cwd apps/cli test --maxWorkers=2 --testTimeout=15000
  38 files, 496 tests passed

bun run --cwd apps/dashboard lint
  passed

bun format
  passed in an isolated checkout; unrelated existing formatting excluded from the diff

The initial full run hit an existing CLI port-test timeout: this machine already uses port 3001, so the resolver waits six seconds against Vitest's five-second default. The entire CLI suite passes with the timeout shown above; no CLI code or tests were changed.

Regression proof: all eight original branch-switch cases failed against upstream/main; the final suite passes all nine cases, including domain preservation. Headless Chromium checks of loading, error, and manual-selection states passed at 1280px and 390px with no horizontal overflow.

Checklist

  • One bug fix, with no unrelated changes bundled in
  • Scoped diff with unrelated formatting excluded
  • Regression cases fail before the fix and pass afterward
  • Workspace tests, dashboard typecheck, and formatting verified as described above
  • Reviewed the complete diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant