You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge the constructorfabric/insight-front repository into the constructorfabric/insight monorepo under src/frontend/, preserving git history.
Why it's cheap
The monorepo already treats the frontend as a component: src/frontend/helm/ is a first-class subchart of the umbrella chart (image ghcr.io/constructorfabric/insight-front), and build-images.yml already accepts a frontend_tag via cross-repo workflow_dispatch from insight-front's docker.yml. Only the sources and CI need to move. There are no path collisions (src/frontend/ contains only helm/; the front repo has no helm/ dir) and no JS tooling in the monorepo to conflict with. API coupling is relative /api/* paths only — no shared types or codegen.
Long-lived branches must be merged before cutover or carried over via cherry-pick afterwards.
Phase 1 — import history into src/frontend/
git clone https://github.com/constructorfabric/insight-front.git /tmp/front-merge
cd /tmp/front-merge && git filter-repo --to-subdirectory-filter src/frontend
cd insight && git checkout -b merge/insight-front
git remote add front /tmp/front-merge && git fetch front
git merge --allow-unrelated-histories front/main
Cleanup commit in the same PR (history keeps everything, working tree gets trimmed):
drop src/frontend/{cypilot,.agents,.codex,.windsurf,.claude,.github} (duplicates the monorepo's cf-studio tooling); replace the near-empty front AGENTS.md/CLAUDE.md with a short src/frontend/AGENTS.md;
drop dead eslint-plugin-local/ (compiled dist/ only, referenced nowhere);
drop front's LICENSE/NOTICE/SECURITY.md (monorepo has its own).
⚠️ The merge PR must land as a merge commit, not squash — squashing destroys the imported history. Needs a temporary branch-protection exception / admin merge.
Phase 2 — CI/CD
New frontend-ci.yml (port of front's ci.yml: test / lint / typecheck / diff-coverage ≥80%) with paths: [src/frontend/**] and working-directory: src/frontend; its scripts/ci/*.py move to src/frontend/scripts/ci/.
build-images.yml: add frontend to the dorny/paths-filter set + a build job (context src/frontend). Keep the image name ghcr.io/constructorfabric/insight-front so charts, values, and environments stay untouched.
Simplify the release: remove the frontend_tag dispatch input and insight-front's dispatch-umbrella job; publish-chart bumps src/frontend/helm/Chart.yamlappVersion directly when the frontend filter fires — same as api-gateway/analytics/identity. Side benefits: closes the documented manual-frontend-tag-pinning gap (deployment DESIGN.md) and fixes the amd64-only image (front's build matrix is amd64+arm64).
Note: e2e-bronze-to-api, functional-k3s, openapi-specs have no path filters, so frontend PRs will trigger heavy backend e2e. Either accept or add path filters in a separate PR (they are required checks — handle carefully).
Phase 3 — dev ergonomics
docker-compose.yml: FRONTEND_MODE=built/dev builds from src/frontend instead of a sibling clone; remove the "git clone insight-front" branch from deploy/compose/insight-init.sh.
Optional: JS hooks in .pre-commit-config.yaml, a src/frontend/ rule in CODEOWNERS.
Keep front's README as src/frontend/README.md, fix links; add a frontend section to the root README.
Phase 4 — cutover
Land the merge PR; verify the first push to main builds the frontend image and publish-chart bumps the umbrella with the frontend appVersion.
Goal
Merge the
constructorfabric/insight-frontrepository into theconstructorfabric/insightmonorepo undersrc/frontend/, preserving git history.Why it's cheap
The monorepo already treats the frontend as a component:
src/frontend/helm/is a first-class subchart of the umbrella chart (imageghcr.io/constructorfabric/insight-front), andbuild-images.ymlalready accepts afrontend_tagvia cross-repoworkflow_dispatchfrom insight-front'sdocker.yml. Only the sources and CI need to move. There are no path collisions (src/frontend/contains onlyhelm/; the front repo has nohelm/dir) and no JS tooling in the monorepo to conflict with. API coupling is relative/api/*paths only — no shared types or codegen.Plan
Phase 0 — preparation (insight-front)
Phase 1 — import history into
src/frontend/Cleanup commit in the same PR (history keeps everything, working tree gets trimmed):
src/frontend/{cypilot,.agents,.codex,.windsurf,.claude,.github}(duplicates the monorepo's cf-studio tooling); replace the near-empty frontAGENTS.md/CLAUDE.mdwith a shortsrc/frontend/AGENTS.md;eslint-plugin-local/(compileddist/only, referenced nowhere);LICENSE/NOTICE/SECURITY.md(monorepo has its own).Phase 2 — CI/CD
frontend-ci.yml(port of front'sci.yml: test / lint / typecheck / diff-coverage ≥80%) withpaths: [src/frontend/**]andworking-directory: src/frontend; itsscripts/ci/*.pymove tosrc/frontend/scripts/ci/.build-images.yml: addfrontendto thedorny/paths-filterset + a build job (contextsrc/frontend). Keep the image nameghcr.io/constructorfabric/insight-frontso charts, values, and environments stay untouched.frontend_tagdispatch input and insight-front'sdispatch-umbrellajob;publish-chartbumpssrc/frontend/helm/Chart.yamlappVersiondirectly when thefrontendfilter fires — same as api-gateway/analytics/identity. Side benefits: closes the documented manual-frontend-tag-pinning gap (deployment DESIGN.md) and fixes the amd64-only image (front's build matrix is amd64+arm64).e2e-bronze-to-api,functional-k3s,openapi-specshave no path filters, so frontend PRs will trigger heavy backend e2e. Either accept or add path filters in a separate PR (they are required checks — handle carefully).Phase 3 — dev ergonomics
docker-compose.yml:FRONTEND_MODE=built/devbuilds fromsrc/frontendinstead of a sibling clone; remove the "git clone insight-front" branch fromdeploy/compose/insight-init.sh..pre-commit-config.yaml, asrc/frontend/rule in CODEOWNERS.src/frontend/README.md, fix links; add a frontend section to the root README.Phase 4 — cutover
mainbuilds the frontend image andpublish-chartbumps the umbrella with the frontend appVersion.insight-front(do not delete — monorepo specs referenceinsight-front#66); point its README to the monorepo.main.Risks
ubuntu-24.04-armrunners work in the monorepo's CI.Estimate
Phases 1–3 are one careful PR plus ~a day of CI debugging; cutover is ~an hour of admin work.