Skip to content

React UI: API base path centralization + Playwright E2E (smoke) and CI workflow #382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: feature/fix-react-ui-api-paths
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link

@devin-ai-integration devin-ai-integration bot commented Aug 15, 2025

React UI: API base path centralization + Playwright E2E (smoke) and CI workflow

Link to Devin run: https://app.devin.ai/sessions/a31450af5b594e0b911e42d2a25024e7
Requested by: Akinori Ishii (@yumioka)

Summary

  • Centralized API base path configuration in the React UI (core/src/main/webapp/ui) to remove hardcoded /core/rest and /core/browser occurrences and use env-driven values.
  • Introduced Playwright with a minimal smoke test and CI workflow for E2E.
  • Ensured Vite dev proxy target is configurable via VITE_PROXY_TARGET.

Key changes

  • New: src/config.ts
    • API_BASE = import.meta.env.VITE_API_BASE ?? '/core'
    • REST_BASE = ${API_BASE}/rest
    • BROWSER_BASE = ${API_BASE}/browser
  • Services updated to use centralized paths:
    • src/services/action.ts -> REST_BASE
    • src/services/saml.ts -> ${REST_BASE}/repo/...
    • src/services/oidc.ts -> ${REST_BASE}/repo/...
    • src/services/cmis.ts -> BROWSER_BASE/REST_BASE where needed; repository list via ${REST_BASE}/all/repositories
  • Vite config:
    • vite.config.ts: dev proxy target configurable via process.env.VITE_PROXY_TARGET (default http://localhost:8080); base remains /core/ui/dist/
  • Playwright:
    • devDeps: @playwright/test, playwright
    • scripts: test:e2e, test:e2e:headed
    • playwright.config.ts: serves Vite dev server, baseURL http://localhost:5173/core/ui/
    • tests/smoke.spec.ts: verifies UI root loads
  • CI:
    • .github/workflows/ui-e2e.yml runs Playwright on UI changes
  • Docs:
    • core/src/main/webapp/ui/README.md updated with setup, env, dev, build, type-check, and E2E instructions

How to run locally

Notes

  • TypeScript type-check currently has pre-existing warnings/errors unrelated to these specific changes; Playwright smoke test runs independently and passes locally.
  • The test-results/ folder is untracked.
  • Future enhancement: Add API-dependent E2E by running backend in CI or mocking API routes.

Screenshots

  • N/A (smoke test is headless and basic)

…t E2E with smoke test; dev proxy env-configurable; docs and CI workflow

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 9 commits August 15, 2025 00:31
…E2E_WITH_BACKEND; AuthService uses REST_BASE; add backend CI workflow

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…E tests (documents, search, folder CRUD); tsconfig includes Node types; README backend E2E docs

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…NAPSHOT jars before starting Jetty; extend readiness wait

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…safe env access; CI: add containerized backend fallback and extended readiness; centralize REST repo endpoint

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…OM_BASE; add ATOM_BASE to config. CI: reorder OpenCMIS SNAPSHOT install before mvn install

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…ion) before root mvn install

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…s:1.2.0-SNAPSHOT) into local Maven before build

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
…0-SNAPSHOT parent POM and jars; pre-install suspended nemakiware-action

Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
Co-Authored-By: Akinori Ishii <yumioka> <akinori@sanwa-c.com>
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.

0 participants