Skip to content

chore(web): React UI v2.0 — Phase 8 (ESLint + size budget + CI + air-gap packaging + docs)#36

Merged
aksOps merged 7 commits into
mainfrom
feat/web-v2-phase-8
May 16, 2026
Merged

chore(web): React UI v2.0 — Phase 8 (ESLint + size budget + CI + air-gap packaging + docs)#36
aksOps merged 7 commits into
mainfrom
feat/web-v2-phase-8

Conversation

@aksOps

@aksOps aksOps commented May 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 8 of v2.0-rc1. Ships the build / deploy / CI story:

  • Task 62 — ESLint flat config (@eslint/js, typescript-eslint, react-hooks, react-refresh). npm run lint → 0 errors.
  • Task 63scripts/check-size.mjs + npm run check:size. Budget: 400 kB raw / 130 kB gzip. Current: 309 kB / 94 kB.
  • Task 64.github/workflows/web.yml: lint / typecheck / unit+coverage / build / size on PRs touching web/**.
  • Task 65.github/workflows/web-e2e.yml: boots backend (uvicorn) + builds SPA + runs Playwright on PRs touching web/** or src/runtime/**. Uploads playwright-report + uvicorn.log on failure.
  • Tasks 66+67scripts/package_airgap.py composes dist/airgap/{app.py, ui.py, web/, README.txt}. Pre-existing runtime/api_static.mount_static_assets already serves the SPA via ASR_WEB_DIST or web/dist default.
  • Task 68docs/RELEASE.md documents the v2.0.0-rc1 release procedure.
  • Task 69 — README + docs/AIRGAP_INSTALL.md updated for the React UI quickstart + air-gap layout.

Stacked PRs

Based on #35 (Phase 7). After #35 merges, this PR will retarget to main.

Verification

  • npm run lint — 0 errors / 2 warnings
  • npm run check:size — ✓ within budget
  • Manual: cd web && npm run build && cd .. && uv run python scripts/package_airgap.pydist/airgap/ ready for copy-only deploy.

Test plan

🤖 Generated with Claude Code

@socket-security

socket-security Bot commented May 16, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​typescript-eslint@​8.59.31001007498100
Addednpm/​globals@​15.15.01001008593100
Addednpm/​eslint-plugin-react-refresh@​0.4.2610010010085100
Addednpm/​eslint-plugin-react-hooks@​5.2.09810010095100

View full report

@aksOps aksOps force-pushed the feat/web-v2-phase-7 branch from bf20833 to 0f19207 Compare May 16, 2026 09:46
aksOps added 7 commits May 16, 2026 09:51
- web/eslint.config.js: flat config with js.configs.recommended +
  typescript-eslint recommended + react-hooks + react-refresh rules.
  Ignores dist/, node_modules/, coverage/, playwright-report/,
  test-results/. Tests relax react-refresh + no-explicit-any.
- Devdeps: @eslint/js@^9, typescript-eslint@^8,
  eslint-plugin-react-hooks@^5, eslint-plugin-react-refresh@^0.4,
  globals@^15.

Verified: npm run lint → 0 errors, 2 warnings (react-refresh hints
on selectedRef.tsx export shape — accepted as v2 known limitation).
- web/scripts/check-size.mjs: reads dist/assets/index-*.js, fails
  with exit 1 if raw > 400 kB or gzip > 130 kB. Uses node:zlib —
  no new deps.
- web/package.json: 'check:size' script.

Current: 309 kB raw / 94 kB gzip (well under budget).
- .github/workflows/web.yml: runs lint, typecheck, vitest+coverage,
  vite build, check:size. Triggers on pushes/PRs touching web/** or
  the workflow file. Uploads web/dist artifact on PR builds.
- Working dir scoped to web/ via defaults.run.

YAML parse OK; commands match local 'npm run' verbs.
- .github/workflows/web-e2e.yml: builds SPA, boots uvicorn backend
  (which serves both /api/v1 and the React SPA via Phase 0 StaticFiles
  mount), then runs Playwright at E2E_BASE_URL=http://localhost:8000.
  Uploads playwright-report + test-results + uvicorn.log on failure.
- Triggers on PRs touching web/**, src/runtime/**, or the workflow.

Ready to be exercised once the E2E specs land (Tasks 55, 56).
- scripts/package_airgap.py: composes dist/airgap/ with:
  - app.py     <- dist/apps/incident-management.py
  - ui.py      <- dist/ui.py
  - web/       <- web/dist/ (built React SPA)
  - README.txt with run instructions
  --allow-partial mode emits whatever inputs exist; default fails fast
  when a piece is missing.
- .gitignore: dist/airgap/ (local artifact, never committed).

Task 67 verified pre-existing: src/runtime/api_static.py exposes
mount_static_assets which is already called in build_app at L1034.
ASR_WEB_DIST env var or web/dist default. 4/4 tests pass in
tests/test_api_static_serve.py.
- docs/RELEASE.md: step-by-step for cutting a release candidate —
  verify package.json version, regen dist/ bundles, build SPA,
  run package_airgap.py, sanity gates, then git tag on main.
- .gitignore: allowlist docs/RELEASE.md and docs/REACT_UI_PARITY.md
  (Task 71).

package.json version is already 2.0.0-rc1. The actual `git tag` lives
in Task 21 (final ship + verify) once all PRs merge to main.
- README.md: quickstart now leads with `uvicorn runtime.api:get_app`
  (backend that also serves the SPA) + `cd web && npm run dev` for
  the Vite dev path. Streamlit demoted to "legacy / deprecated".
  Status block calls out v2.0.0-rc1 and points to RELEASE.md +
  REACT_UI_PARITY.md.
- docs/AIRGAP_INSTALL.md: new "v2.0 — React UI in the air-gap payload"
  section. Describes the build + package_airgap.py flow, the
  dist/airgap/ layout, and ASR_WEB_DIST env var resolution.
@aksOps aksOps force-pushed the feat/web-v2-phase-8 branch from 6a0cc3e to a218c83 Compare May 16, 2026 09:51
@aksOps aksOps changed the base branch from feat/web-v2-phase-7 to main May 16, 2026 09:51
@aksOps aksOps merged commit 382c737 into main May 16, 2026
2 checks passed
@aksOps aksOps deleted the feat/web-v2-phase-8 branch May 16, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant