Bug fixes (Flutter): - Wrap multi-statement DB writes (insert/update/delete note, deleteDocument, deletePageData, OCR FTS merge, migrations) in transactions to prevent data loss on interruption and a read-modify-write FTS race. - Fix PdfDocument leaks on exception (try/finally dispose) and preserve image aspect ratio when stamping images onto PDF pages. - Guard file-picker against empty selection (was .single -> crash). - Fix eraser ConcurrentModificationError and unmodifiable-list crash on PDF pages; capture page synchronously on save to stop wrong-page data loss. - Fix Riverpod DB-not-ready races, broken pull-to-refresh, settings load race, and search N+1; transform stored annotations on PDF page rotation. - Normalize pen pressure for devices without a pressure range. - PPT: single source of truth for slide strokes so ink displays and exports. UI/UX: - Material 3 typography, theme-aware colors (dark-mode fixes), hover cursors and right-click/visible actions on desktop, keyboard shortcuts (undo/redo/ save/find), toolbar overflow handling, friendlier empty states, semantic OCR status badges, relative timestamps, 1-based page indicators, large-deck PPT navigation, and a scratchpad-scope label in split view. Server (optional backend): - Persist JWT secret (was per-process random), block path traversal in storage, fix CORS '*'+credentials, add OCR job ownership checks, last-writer-wins sync guard, constant-time login, and split out heavy OCR deps so the API/tests run without them. CI: Gitea workflows for format+analyze+test (Linux, system sqlite) and a Windows release build; pristine `flutter analyze`, all Flutter and server tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
102 lines
2.6 KiB
YAML
102 lines
2.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
# Allow builds to find SQLite / Flutter artifacts behind a corporate proxy.
|
|
# Configure repo/org secrets HTTP_PROXY / HTTPS_PROXY in Gitea if needed.
|
|
env:
|
|
FLUTTER_VERSION: "3.41.4"
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze (Flutter)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
channel: stable
|
|
cache: true
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Verify formatting
|
|
run: dart format --output=none --set-exit-if-changed lib test
|
|
|
|
- name: Static analysis
|
|
run: flutter analyze
|
|
|
|
test:
|
|
name: Test (Flutter, Linux)
|
|
runs-on: ubuntu-latest
|
|
needs: analyze
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
channel: stable
|
|
cache: true
|
|
|
|
# The sqlite3 Dart package downloads a precompiled binary from GitHub
|
|
# releases when building native assets. On Linux CI we instead link the
|
|
# system libsqlite3 to avoid the download (faster + works offline).
|
|
# This override is applied only in CI; the committed pubspec.yaml stays
|
|
# clean so the Windows build downloads the bundled sqlite3.dll normally.
|
|
- name: Install system SQLite
|
|
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
|
|
|
|
- name: Use system SQLite for native assets (CI only)
|
|
run: |
|
|
cat >> pubspec.yaml <<'EOF'
|
|
|
|
hooks:
|
|
user_defines:
|
|
sqlite3:
|
|
source: system
|
|
EOF
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Run tests
|
|
run: flutter test --reporter expanded
|
|
|
|
server:
|
|
name: Test (Server, optional)
|
|
runs-on: ubuntu-latest
|
|
# The server is an optional/experimental backend. Keep it from blocking
|
|
# the pipeline, but still surface failures.
|
|
continue-on-error: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
|
|
- name: Install dependencies
|
|
working-directory: server
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run tests
|
|
working-directory: server
|
|
run: pytest -q
|