Skip to content

fix(app): stabilize session composer dock scrolling #710

fix(app): stabilize session composer dock scrolling

fix(app): stabilize session composer dock scrolling #710

Workflow file for this run

# This workflow is the PR E2E check for rendered app behavior. It must
# fail when Playwright smoke fails, while still uploading artifacts for
# debugging. The `dev` ruleset should require `e2e-artifacts` only after
# this workflow is merged, so the required check reflects real failures.
name: e2e-artifacts
on:
pull_request:
branches: [dev]
workflow_dispatch:
inputs:
suite:
description: E2E suite to run
required: true
default: full
type: choice
options:
- full
- smoke
concurrency:
group: e2e-artifacts-${{ github.event.pull_request.number || github.ref }}-${{ inputs.suite || 'pr-smoke' }}
cancel-in-progress: true
permissions:
contents: read
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers
jobs:
changes:
runs-on: ubuntu-latest
outputs:
docs_only: ${{ steps.filter.outputs.docs_only }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- id: filter
env:
EVENT_NAME: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
HEAD_SHA: ${{ github.sha }}
run: |
set -euo pipefail
is_docs_path() {
case "$1" in
README.md|README_CN.md|assets/readme/*|.github/ISSUE_TEMPLATE/*|.github/pull_request_template.md|packages/*/README.md|packages/opencode/specs/*|packages/opencode/BUN_SHELL_MIGRATION_PLAN.md|packages/app/create-effect-simplification-spec.md)
return 0
;;
*)
return 1
;;
esac
}
docs_only=false
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
echo "docs_only=false" >> "$GITHUB_OUTPUT"
exit 0
fi
if [ -z "$BASE_SHA" ] || [ "$BASE_SHA" = "0000000000000000000000000000000000000000" ]; then
BASE_SHA="$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
mapfile -t changes < <(git diff --name-status --find-renames --find-copies "$BASE_SHA" "$HEAD_SHA" --)
if [ "${#changes[@]}" -gt 0 ]; then
docs_only=true
for change in "${changes[@]}"; do
IFS=$'\t' read -r status path1 path2 <<< "$change"
case "$status" in
A*|M*|T*|D*)
if ! is_docs_path "$path1"; then
docs_only=false
break
fi
;;
R*|C*)
if ! is_docs_path "$path1" || ! is_docs_path "$path2"; then
docs_only=false
break
fi
;;
*)
docs_only=false
break
;;
esac
done
fi
echo "docs_only=$docs_only" >> "$GITHUB_OUTPUT"
e2e-artifacts:
needs: changes
if: needs.changes.outputs.docs_only != 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6
with:
persist-credentials: false
# Load-bearing: `bun install` runs `trustedDependencies`
# postinstalls from the root package.json (electron, node-pty,
# esbuild, tree-sitter at time of writing), which call `node`
# explicitly. Do not drop without first patching those scripts.
# Source of truth: grep `trustedDependencies` in package.json. (#70)
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # actions/setup-node@v6.4.0
with:
node-version: "24"
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # oven-sh/setup-bun@v2
with:
bun-version: "1.3.13"
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # actions/cache@v5
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # actions/cache@v5
with:
path: ${{ github.workspace }}/.playwright-browsers
key: playwright-${{ runner.os }}-${{ hashFiles('packages/app/package.json', 'bun.lock') }}
- run: bun install --frozen-lockfile
- name: Install Playwright browsers
working-directory: packages/app
run: bunx playwright install --with-deps chromium
- name: Run e2e
id: run_e2e
env:
CI: "true"
EVENT_NAME: ${{ github.event_name }}
E2E_SUITE: ${{ inputs.suite || '' }}
PLAYWRIGHT_JUNIT_OUTPUT: e2e/junit-linux.xml
run: |
if [ "$EVENT_NAME" = "pull_request" ] || [ "$E2E_SUITE" = "smoke" ]; then
bun --cwd packages/app test:e2e:local:smoke
else
bun --cwd packages/app test:e2e:local
fi
- name: Warn on E2E failure
if: failure()
run: |
echo "::warning::E2E failed. Download the uploaded artifacts for the Playwright report, junit output, and test results."
- name: Upload e2e artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # actions/upload-artifact@v7
with:
name: e2e-artifacts-linux-${{ github.run_attempt }}
if-no-files-found: ignore
retention-days: 7
path: |
packages/app/e2e/junit-linux.xml
packages/app/e2e/playwright-report
packages/app/e2e/test-results