Skip to content

fix(ui): use GET-first flow for imported rooms to avoid invalid PUT #773

fix(ui): use GET-first flow for imported rooms to avoid invalid PUT

fix(ui): use GET-first flow for imported rooms to avoid invalid PUT #773

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- main
- master
- develop
- 'releases/**'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: freenet-default-runner
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache cargo-make
uses: actions/cache@v3
with:
path: ~/.cargo/bin/cargo-make
key: ${{ runner.os }}-cargo-make
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: --force cargo-make
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install Dioxus CLI
run: cargo binstall -y dioxus-cli
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install npm dependencies for Tailwind
run: npm install
working-directory: ./ui
- name: Prefetch dependencies
run: cargo fetch
- name: Build Project
run: cargo make build
- name: Test room-contract
env:
RUST_MIN_STACK: 8388608
CARGO_TARGET_DIR: ${{ github.workspace }}/target
run: cargo test --package room-contract --features net
- name: Test delegate key
env:
RUST_MIN_STACK: 8388608
CARGO_TARGET_DIR: ${{ github.workspace }}/target
run: cargo test -p river-core --test delegate_key_test
- name: Test migration entries
env:
RUST_MIN_STACK: 8388608
CARGO_TARGET_DIR: ${{ github.workspace }}/target
run: cargo test -p river-core --test migration_test
ui-playwright-tests:
runs-on: freenet-default-runner
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache cargo-make
uses: actions/cache@v3
with:
path: ~/.cargo/bin/cargo-make
key: ${{ runner.os }}-cargo-make
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: --force cargo-make
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install Dioxus CLI
run: cargo binstall -y dioxus-cli
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Tailwind and build CSS
run: npm install && npm run build:css
working-directory: ./ui
- name: Install Playwright test dependencies
run: npm install
working-directory: ./ui/tests
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium firefox webkit
working-directory: ./ui/tests
- name: Build UI with example data
run: cargo make build-ui-example-no-sync
- name: Start dev server and wait for readiness
run: |
cd ui && dx serve --port 8082 --features example-data,no-sync &
echo "Waiting for dev server to serve the app..."
SERVER_READY=false
for i in $(seq 1 90); do
if curl -s http://localhost:8082 2>/dev/null | grep -q "river-ui"; then
echo "Server ready after $((i * 3))s"
sleep 5
SERVER_READY=true
break
fi
sleep 3
done
if [ "$SERVER_READY" != "true" ]; then
echo "ERROR: Dev server failed to start within 270s"
exit 1
fi
- name: Run Playwright tests
run: npx playwright test
working-directory: ./ui/tests
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: ui/tests/test-results/
claude-ci-analysis:
name: Claude CI Analysis
runs-on: ubuntu-latest
needs: [build]
if: failure() && contains(github.event.pull_request.labels.*.name, 'claude-debug')
permissions:
contents: read
pull-requests: write
issues: read
id-token: write
actions: read
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude CI Analysis
uses: anthropics/claude-code-action@v1
with:
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
The CI workflow has failed. Please analyze the failure and provide:
1. Root cause of the failure
2. Specific steps to fix the issue
3. Whether this appears to be a flaky test or genuine bug
4. Any relevant context from the codebase
Use the repository's CLAUDE.md for guidance on testing and debugging.
After your analysis, use `gh pr comment` with your Bash tool to post your findings as a comment on the PR.
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr view:*),Bash(gh pr list:*),Bash(gh api:*),Bash(gh run view:*)"'