From fa3c8268b2ac35e1fd902b7341e7151bdbb4ea97 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Tue, 2 Jun 2026 08:04:58 -0700 Subject: [PATCH] infra: add pr quality gate for client applications (#233) * add gh action for quality gate * test quality gate * fix job * rename gh action jobs * format --- .github/workflows/pr-quality-gate.yml | 68 +++++++++++++++++++ .../src/features/compose/compose-overlay.tsx | 2 +- .../particles/text-reaction-input.tsx | 2 +- 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pr-quality-gate.yml diff --git a/.github/workflows/pr-quality-gate.yml b/.github/workflows/pr-quality-gate.yml new file mode 100644 index 0000000..a7f7778 --- /dev/null +++ b/.github/workflows/pr-quality-gate.yml @@ -0,0 +1,68 @@ +name: PR Quality Gate (client applications) + +on: + pull_request: + paths: + - "js/mobile/**" + - "js/desktop/**" + branches: [ main ] + types: [ opened, synchronize, reopened ] + +jobs: + mobile: + name: Lint & format check (mobile) + runs-on: ubuntu-latest + defaults: + run: + working-directory: js/mobile + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Enable Corepack + run: corepack enable + + - name: Install dependencies + run: yarn install --immutable + + - name: Run Code Linter + run: yarn lint + + - name: Run Unit Tests + run: yarn format:check + + desktop: + name: Lint & format check (desktop) + runs-on: ubuntu-latest + defaults: + run: + working-directory: js/desktop + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Enable Corepack + run: corepack enable + + - name: Install dependencies + run: yarn install --immutable + + - name: Run Code Linter + run: yarn lint + + - name: Run Unit Tests + run: yarn format:check + + diff --git a/js/desktop/src/features/compose/compose-overlay.tsx b/js/desktop/src/features/compose/compose-overlay.tsx index ccd4ef1..ef46124 100644 --- a/js/desktop/src/features/compose/compose-overlay.tsx +++ b/js/desktop/src/features/compose/compose-overlay.tsx @@ -412,7 +412,7 @@ export function ComposeOverlay({ setStepSync, createChildParticle, cancel, - handleQuotaError + handleQuotaError, ]); // New stream mode: create stream + first child diff --git a/js/desktop/src/features/particles/text-reaction-input.tsx b/js/desktop/src/features/particles/text-reaction-input.tsx index c3dd3cc..e44b2c8 100644 --- a/js/desktop/src/features/particles/text-reaction-input.tsx +++ b/js/desktop/src/features/particles/text-reaction-input.tsx @@ -28,7 +28,7 @@ export function TextReactionInput({ // NOTE: perform side effects here when opening if (open) { - setValue('') + setValue(''); } }