mirror of
https://github.com/azaion/ui.git
synced 2026-06-21 08:01:10 +00:00
[AZ-471] [AZ-473] [AZ-478] [AZ-479] Batch 7 - canvas/photo-mode/network/perf tests
ci/woodpecker/push/build-arm Pipeline was successful
ci/woodpecker/push/build-arm Pipeline was successful
- AZ-471 CanvasEditor draw + 8-handle resize PASS (FT-P-39 fast + e2e + FT-P-40 8 sub-tests). Three drifts pinned via it.fails(): Ctrl+click multi-select (FT-P-41), Ctrl+wheel zoom-around-cursor (FT-P-42), Ctrl+drag empty-canvas pan (FT-P-43) — all rooted in handleMouseDown's early Ctrl-gate and handleWheel's pan-not-adjusted bug. - AZ-473 PhotoMode 3 ACs all PASS in fast + e2e (FT-P-48 switch filter, FT-P-49 auto-select, FT-P-50 yoloId wire across modes P=0/20/40 — outbound classNum == classId + photoModeOffset). - AZ-478 fast 7 + e2e 2: AC-1 user-visible offline indicator, AC-2 tainted-canvas fallback, AC-3 SSE disconnect banner — all drift today (it.fails fast + test.fail e2e + control PASS for each). Service-worker negative check passes. - AZ-479 AC-1 (bundle <= 2 MB gzipped) promoted from on-demand perf script to per-commit static profile via new STC-PERF01 row + static_check_bundle_size in run-tests.sh. AC-2 (mission-planner exclusion) already covered by STC-S5. AC-3 FCP /flights <= 3 s median (chromium suite-e2e) and AC-4 30-min annotation soak (RUN_LONG_RUNNING=1, chromium) scaffolded as e2e tests. Code review: PASS (0 findings). Fast: 25/25 files, 150 passed / 13 skipped. Static: 25/25 PASS (incl. new STC-PERF01). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -370,6 +370,29 @@ if [ "$RUN_STATIC" = "true" ]; then
|
||||
return 0
|
||||
}
|
||||
|
||||
# AZ-479 NFT-PERF-01 / NFT-RES-LIM-01 — initial JS bundle ≤ 2 MB gzipped.
|
||||
# Same threshold + measurement as scripts/run-performance-tests.sh; this
|
||||
# entry routes the gate through the static profile so every commit is
|
||||
# checked (the perf script is run on demand).
|
||||
static_check_bundle_size() {
|
||||
if [ ! -d "$PROJECT_ROOT/dist/assets" ]; then
|
||||
echo "dist/assets missing — run 'bun run build' first" >&2
|
||||
return 1
|
||||
fi
|
||||
local total
|
||||
total=$(
|
||||
find "$PROJECT_ROOT/dist/assets" -maxdepth 1 -name '*.js' -print0 \
|
||||
| xargs -0 -I{} sh -c 'gzip -c "{}" | wc -c' \
|
||||
| awk '{ s += $1 } END { print (s ? s : 0) }'
|
||||
)
|
||||
local max=$((2 * 1024 * 1024))
|
||||
if [ "$total" -le "$max" ]; then
|
||||
return 0
|
||||
fi
|
||||
echo "initial JS bundle gzipped = ${total} bytes; budget = ${max} bytes (NFT-PERF-01)" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
run_static "STC-S1" "tsconfig strict mode" "AC-N1" "n/a" static_check_strict
|
||||
run_static "STC-S2" "pinned core deps + banned" "AC-N6" "70" static_check_pinned_deps
|
||||
run_static "STC-N2" "no in-browser ML libs" "AC-N2" "n/a" static_check_no_ml_libs
|
||||
@@ -393,6 +416,7 @@ if [ "$RUN_STATIC" = "true" ]; then
|
||||
run_static "STC-T1" "tsc --noEmit (test config)" "AC-6" "n/a" static_check_typecheck
|
||||
run_static "STC-B1" "vite build succeeds" "AC-6" "n/a" static_check_vite_build
|
||||
run_static "STC-S5" "mission-planner not in dist/" "AC-31" "n/a" static_check_dist_no_mission_planner
|
||||
run_static "STC-PERF01" "initial JS bundle ≤ 2 MB gz" "NFT-PERF-01" "40" static_check_bundle_size
|
||||
run_static "STC-SEC1B" "no literal OWM key in dist/" "SEC-09" "63" static_check_no_owm_key_in_dist
|
||||
|
||||
if [ "$STATIC_FAIL" = "1" ]; then
|
||||
|
||||
Reference in New Issue
Block a user