feat: complete test infrastructure and Docker/HTTPS setup#44
Open
FabienPineau wants to merge 21 commits intoSylius:mainfrom
Open
feat: complete test infrastructure and Docker/HTTPS setup#44FabienPineau wants to merge 21 commits intoSylius:mainfrom
FabienPineau wants to merge 21 commits intoSylius:mainfrom
Conversation
docs: add comprehensive contributing guidelines
- Switch package manager from npm to pnpm - Update all dependencies to latest versions - Adapt compose.yaml to use corepack and pnpm - Update .gitignore to include pnpm-specific files
feat(ai): integrate Claude Code and MOAI SDK
fix(router): import BrowserRouter from react-router-dom
…ate-deps chore: migrate to pnpm and update project configuration
…01) (#7) * feat(ui): install TailwindCSS v4 and shadcn/ui (SPEC-UI-001) - Add @tailwindcss/vite plugin to vite.config.ts (replaces PostCSS) - Add @ path alias in Vite and tsconfig.app.json for shadcn/ui imports - Create src/index.css with Tailwind v4 CSS-first config: - @theme: --color-primary #22B99A, --breakpoint-lg 992px - @layer components: icon utilities, btn-icon, link-reset - Initialize shadcn/ui (components.json, src/lib/utils.ts) - Add 12 shadcn/ui components to src/components/ui/: accordion, alert, badge, breadcrumb, button, card, dropdown-menu, input, label, select, sheet, table - Bootstrap coexists during this phase; removed in SPEC-UI-002 🗿 MoAI <[email protected]> * feat(ui): migrate Bootstrap 5 to TailwindCSS v4 + shadcn/ui (SPEC-UI-001) Complete UI modernisation of the FrontWing headless Sylius frontend: Phase 2 — Bootstrap Removal: - Replace all Bootstrap classes with Tailwind equivalents across 48 files - Migrate Navbar to shadcn/ui Sheet (mobile) + NavigationMenu (desktop) - Remove bootstrap, @types/bootstrap, sass packages - Remove all data-bs-* attributes and SCSS files Phase 3 — shadcn/ui Component Adoption: - Replace native <input>, <button>, <select>, <table>, <textarea> with shadcn/ui - Replace <input type="checkbox"> with <Checkbox> component - Replace inline badge spans with <Badge>, error divs with <Alert> - Add FlashMessages → Sonner toast notifications - Remove @radix-ui/react-* (replaced by @base-ui/react base-vega style) - Fix TypeScript any types in cart/order ProductRow components - Update ESLint config to exclude auto-generated schema/ directory Sync: - Update SPEC-UI-001 to completed status (v3.2.0) - Add CHANGELOG.md (Keep a Changelog format) - Update README.md to reflect current tech stack Refs: SPEC-UI-001 (all REQ-001 through REQ-018 ✅) https://adk.mo.ai.kr Co-Authored-By: Claude <[email protected]>
…-DEVOPS-001) (#8) * feat(devops): setup Prettier, Husky, lint-staged, EditorConfig (SPEC-DEVOPS-001) - Prettier v3 with prettier-plugin-tailwindcss (semi, double quotes, printWidth 100) - Husky v9 pre-commit hook running lint-staged on staged .ts/.tsx files - lint-staged: eslint --fix + prettier --write on TypeScript files - .editorconfig: UTF-8, LF, 2-space indent, trim trailing whitespace - eslint-config-prettier added (last in config) to disable conflicting rules - react-refresh/only-export-components disabled for ui/ and context/ dirs - Fix react-hooks/exhaustive-deps in ProductList.tsx and ProductPage.tsx - pnpm format script for manual full-codebase formatting Refs: SPEC-DEVOPS-001 (REQ-001 through REQ-005) https://adk.mo.ai.kr Co-Authored-By: Claude <[email protected]> * style: apply Prettier baseline formatting to entire codebase One-time formatting pass to establish consistent code style. No logic changes — formatting only (double quotes, semicolons, trailing commas, 100 char line width, Tailwind class sorting via prettier-plugin-tailwindcss). Refs: SPEC-DEVOPS-001 https://adk.mo.ai.kr Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
…validateAddress (#9)
* feat(static): add 404 NotFoundPage with catch-all route 🗿 MoAI <[email protected]> * fix(routing): render NotFoundPage when taxon code is not found When /:parentCode or /:parentCode/:childCode matches an unknown slug, fetchTaxonDetails returns null (API 404). After loading, if taxonDetails is still null and no network error occurred, render NotFoundPage directly so the catch-all * route is no longer needed for this case. 🗿 MoAI <[email protected]> * fix(routing): improve ProductList 404 handling and UX - Add taxonExists tri-state (null/true/false) for pre-flight check - Skip products fetch entirely when taxon returns 404 (saves API call) - Show spinner during pre-flight instead of skeleton → avoids flicker - Show "End of results" footer when all products are loaded - Fix: Promise<any> → typed, unused catch binding removed 🗿 MoAI <[email protected]>
* feat(auth): add RegisterPage, ForgotPasswordPage, ResetPasswordPage; remove change-password route 🗿 MoAI <[email protected]> * fix(auth): fix RegisterPage — unified formData state, gender Select, plainPassword field - Replace 5 separate useState hooks with single formData object + handleInputChange - Add missing handleGenderChange and gender field to formData - Fix API body: password → plainPassword (Sylius API requirement) - Add gender Select component with m/f/u options 🗿 MoAI <[email protected]> * fix(auth): update register href to /register; fix SelectTrigger width - UserNavigation: fix Register link href from /en_US/register to /register - RegisterPage: add w-full class to SelectTrigger for consistent width 🗿 MoAI <[email protected]> * feat(auth): enhance LoginPage and RegisterPage UX LoginPage: - Add password show/hide toggle (IconEye/IconEyeOff) - Add value prop to email input (controlled input) - Rename label Username → Username / Email - Show loading state on submit button (Logging in...) RegisterPage: - Add password strength indicator (4-bar visual, useMemo) - Add show/hide toggle on password and confirm fields - Add subscribedToNewsletter checkbox - Improve layout: two-column grid with side panel - Extract genderOptions array and genderLabel helper - Validate password strength score (4/4) instead of min length - Wrap handleInputChange in useCallback 🗿 MoAI <[email protected]>
…OR-001) (#13) * chore(deps): install @tanstack/react-form, zod v3, @tanstack/zod-form-adapter REQ-001 — SPEC-REFACTOR-001 🗿 MoAI <[email protected]> * feat(schemas): add Zod schemas for auth, address, account, review (REQ-002) 🗿 MoAI <[email protected]> * refactor(auth): migrate Login/Register/ForgotPassword/ResetPassword to TanStack Form (REQ-003) 🗿 MoAI <[email protected]> * fix(auth): use TanStack Form v1 Standard Schema API, remove deprecated zodValidator 🗿 MoAI <[email protected]> * refactor(forms): migrate AddressPage, ProfilePage, ChangePasswordPage to TanStack Form (REQ-004) 🗿 MoAI <[email protected]> * refactor(forms): migrate AddressForm, Add/EditAddress, AddReview to TanStack Form (REQ-004) 🗿 MoAI <[email protected]> * fix(forms): resolve all TypeScript build errors for TanStack Form v1 migration - Remove explicit useForm<T> generics (requires 12 type args) — let TS infer from defaultValues - Fix form.useStore() → useStore(form.store, ...) imported from @tanstack/react-form - Fix schema optional field mismatches: remove .optional() from always-present form fields (gender, subscribedToNewsletter in registerSchema; birthday/gender/phone in profileSchema; company/provinceName/phoneNumber in addressSchema; remember_me in loginSchema) - Fix AddressForm AnyFormApi: export structural type with explicit FieldApi to avoid noImplicitAny; parent components use `as unknown as AnyFormApi` (no `any` involved) Build: 0 errors, 0 lint errors 🗿 MoAI <[email protected]> * fix(forms): fix [object Object] error display with TanStack Form v1 + Zod TanStack Form v1 via StandardSchemaV1 stores Zod issue objects { message: string } in field.state.meta.errors[], not plain strings. String(issue) produced [object Object]. Add formError() helper in src/lib/utils.ts that extracts .message from objects or falls back to string coercion. Replace all String(field.state.meta.errors[0]) calls across 9 form files. 🗿 MoAI <[email protected]> * fix(forms): standardize validation, noValidate and aria-invalid across all TanStack Form pages - AddressPage: replace field-level Zod schema validators with a centralized form-level validator using safeParse, add noValidate to prevent browser native validation, fix pre-fill timing so form waits for customer/order to load before marking initialized - All form pages: add noValidate to <form> elements (ChangePasswordPage, ProfilePage, AddAddressPage, EditAddressPage, AddReviewPage) - All form inputs: add aria-invalid attribute on every validated field (LoginPage, RegisterPage, ForgotPasswordPage, ResetPasswordPage, ProfilePage, AddReviewPage, AddressForm, AddressPage) 🗿 MoAI <[email protected]> * docs(changelog): add v0.4.0 entry for TanStack Form + Zod migration (SPEC-REFACTOR-001) Summarizes all changes introduced on feat/tanstack-form-refactor: - Added @tanstack/react-form v1, zod v3, centralized src/schemas/ - Migrated 10 form pages to useForm + form.Field render-prop pattern - Added formError() helper, noValidate, and aria-invalid across all forms - AddressPage pre-fill timing fix and nested field form-level validation 🗿 MoAI <[email protected]>
…nk (#14) Base UI Button with render={<Link>} must set nativeButton={false} to prevent double-rendering of the native <button> element alongside the React Router Link. Affects: PaymentPage, ShippingPage, NotFoundPage, DashboardPage, AddressCards. 🗿 MoAI <[email protected]>
…ssword (#15) - Add ChangePasswordPage to accountRoutes (route was missing, causing a 404) - Fix Account layout sidebar: replace <a href> with <Link to="/account/change-password"> - Remove duplicate src/pages/account/ResetPasswordPage.tsx (same logic as ChangePasswordPage, wrong name and path) 🗿 MoAI <[email protected]>
- Add FieldError shared component with isTouched/isSubmitted guard - Add applyServerErrors() — maps API violations to form fields via errorMap.onServer - Add clearServerErrors() + submitForm() — clears server errors before each submit to unblock TanStack Form v1 canSubmit when onServer errors are present - Add passwordComplexity shared Zod validator (8+ chars, uppercase, digit, symbol) - Strengthen changePasswordSchema.newPassword and profileSchema.birthday (required, not in future, min 18 years old, max 120 years) - Migrate all 10 form pages: onBlur validators, FieldError, submitForm - Add aria-describedby on all inputs/selects/radiogroups linked to FieldError (WCAG 2.1 AA) - Add auto-focus on first invalid field after failed submit - Add PasswordStrength indicator on password fields (RegisterPage, ChangePasswordPage) - Add cross-field confirmation validation with onChangeListenTo/onBlurListenTo 🗿 MoAI <[email protected]>
- Vitest v4 unit tests: schemas, utilities, UI components (48 tests) - Playwright v1.58 E2E tests with Page Object Model pattern - Auth fixture seeding JWT via Sylius API - Docker multi-stage test stack (unit-tests, app-serve, api-proxy, e2e-tests) - GitHub Actions CI workflow: unit (blocking) → E2E on main/dev/feat/** - eslint.config.js: disable React rules for Playwright e2e files - tsconfig.node.json: add DOM lib and Node types for e2e/vitest configs 🗿 MoAI <[email protected]>
…EVOPS-002) - Unified multi-stage Dockerfile (deps/dev/builder/production/test stages, ARG PNPM_VERSION) - docker/app/compose.yml: dev container with mkcert certs volume mount - docker/app/compose.prod.yml: production nginx container (VITE_REACT_APP_API_URL build ARG) - docker/app/nginx.conf: gzip, security headers, SPA fallback routing - Makefile: Docker-only workflow (dev, prod, test, lint, format, certs, init targets) - vite.config.ts: mkcert cert loading with @vitejs/plugin-basic-ssl fallback - make certs: mkcert generation + automatic Sylius nginx cert sync (SYLIUS_SSL_DIR) - tsconfig.app.json / tsconfig.json: remove deprecated baseUrl (moduleResolution: bundler) - .env: switch VITE_REACT_APP_API_URL to https://localhost - .env.example, .dockerignore: add project templates - compose.yaml: removed (replaced by docker/app/compose.yml) 🗿 MoAI <[email protected]>
… SPEC-DEVOPS-002 - README: Docker-first workflow, mkcert setup, Sylius cert sync, production section - CHANGELOG: add entries for test infrastructure and Docker/HTTPS infrastructure - CONTRIBUTING: fix outdated Makefile command names (docker-up → up, test-unit-run → test-unit, etc.) 🗿 MoAI <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
• Add Vitest v4 unit tests (48 tests) + Playwright v1.58 E2E tests with POM pattern
• Add unified multi-stage Dockerfile with dev/production stages + Docker Compose
• Add mkcert-based local TLS with automatic Sylius nginx cert sync
• Add Makefile with Docker-only workflow for dev, test, build, and production
• Update vite.config.ts for mkcert HTTPS support with basicSsl fallback
• Clean up TypeScript: remove deprecated baseUrl (moduleResolution: bundler)
• Update documentation (README, CHANGELOG, CONTRIBUTING)
Implementation Details
SPEC-TEST-001 — Test Infrastructure
SPEC-DEVOPS-002 — Docker & HTTPS Infrastructure
Files Changed
🗿 MoAI [email protected]