From 70cddb8984521942af5429acae02ebbb3b4d287e Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Fri, 10 Jul 2026 18:00:37 -0400 Subject: [PATCH 1/2] ci: fail PRs that modify the frozen frontend v1 UI The v1 UI (frontend/src/{views,components,console,layouts}) is frozen and slated for deletion; new frontend work belongs in frontend/src/v2/. This workflow fails any PR that touches v1 UI files, with an "allow-v1-changes" label escape hatch for sanctioned critical bug fixes. Generated-By: PostHog Code Task-Id: 55fda8a5-426e-479d-8221-26a8437e57bb --- .github/workflows/frontend-v1-frozen.yml | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/frontend-v1-frozen.yml diff --git a/.github/workflows/frontend-v1-frozen.yml b/.github/workflows/frontend-v1-frozen.yml new file mode 100644 index 000000000..839400e26 --- /dev/null +++ b/.github/workflows/frontend-v1-frozen.yml @@ -0,0 +1,59 @@ +name: Frontend v1 Frozen Check + +# The v1 UI is frozen and slated for deletion. New frontend work goes in +# frontend/src/v2/. This check fails if a PR modifies any v1 UI code so the +# freeze is enforced automatically. +# +# Sanctioned exception: for a critical v1 bug fix, add the "allow-v1-changes" +# label to the PR to bypass this check. + +on: + pull_request: + paths: + - "frontend/src/views/**" + - "frontend/src/components/**" + - "frontend/src/console/**" + - "frontend/src/layouts/**" + +permissions: read-all + +jobs: + check-v1-frozen: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.3.0 + with: + fetch-depth: 0 + + - name: Fail if v1 UI files changed + env: + BASE_REF: ${{ github.event.pull_request.base.ref }} + HAS_BYPASS_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'allow-v1-changes') }} + run: | + git fetch --no-tags --depth=1 origin "$BASE_REF" + + v1_files=$(git diff --name-only "origin/$BASE_REF...HEAD" -- \ + "frontend/src/views/" \ + "frontend/src/components/" \ + "frontend/src/console/" \ + "frontend/src/layouts/") + + if [ -z "$v1_files" ]; then + echo "No v1 UI files changed." + exit 0 + fi + + echo "This PR modifies frozen v1 UI files:" + echo "$v1_files" | sed 's/^/ - /' + echo "" + + if [ "$HAS_BYPASS_LABEL" = "true" ]; then + echo "The 'allow-v1-changes' label is present; allowing v1 changes." + exit 0 + fi + + echo "::error::The v1 UI (frontend/src/{views,components,console,layouts}) is frozen." + echo "New frontend work must go in frontend/src/v2/." + echo "For a sanctioned critical bug fix, add the 'allow-v1-changes' label to this PR." + exit 1 From cbf134a57624b762f1628bf877534c22557f955d Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi <3247106+gantoine@users.noreply.github.com> Date: Fri, 10 Jul 2026 18:10:21 -0400 Subject: [PATCH 2/2] Update .github/workflows/frontend-v1-frozen.yml Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .github/workflows/frontend-v1-frozen.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/frontend-v1-frozen.yml b/.github/workflows/frontend-v1-frozen.yml index 839400e26..26c615ef3 100644 --- a/.github/workflows/frontend-v1-frozen.yml +++ b/.github/workflows/frontend-v1-frozen.yml @@ -9,6 +9,7 @@ name: Frontend v1 Frozen Check on: pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] paths: - "frontend/src/views/**" - "frontend/src/components/**"