Files
co-lite/openspec/changes/polish-e2e-followups/tasks.md
T
ngqileandClaude Opus 5.5 5e68478670 feat: switched-on password rules for the hint, named refusals
The system exposes the switched-on admin password rules. mobile-api
serves them to signed-in admins and, rate limited, on an exact public
route for the first-login screen. Every admin password path now refuses
with PASSWORD_RULE naming the first rule broken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2026-12-02 02:25:10 +08:00

3.3 KiB

Tasks: polish-e2e-followups

Every task is TDD, followed by the review gate. Tasks run serially (the WhatsApp change holds the other worker slot).

Verify commands:

  • Backend: mvn -T 1C -q -pl <modules> verify

  • Portal: cd solvway-admin-portal && npx vitest run; echo VITEST=$? && npx tsc --noEmit && npm run lint

  • 1. SQL: sql/01-soft-delete.sql and sql/99-rollback.sql, mirrored into local/seed/ and applied to the running local database.

    • Depends on: none
    • Scope: openspec/changes/polish-e2e-followups/sql/**, local/seed/**
    • Verify: seed load in a throwaway MySQL with the compose flags; SHOW COLUMNS lists deleted_at on both tables.
  • 2. Soft delete backend:

    • Interest delete in counter. Lists, capture options and filters exclude deleted rows. Lead views keep the name. The deleted-name duplicate error is a distinct reason.
    • Role delete in system, refused with ROLE_IN_USE and a count while any user holds the role. The role list and user role picker exclude deleted rows. Deleted-name reason.
    • mobile-api admin endpoints DELETE /api/admin/interests/{id} and DELETE /api/admin/roles/{id}, super admin only, audited.
    • Depends on: 1
    • Scope: solvway-services-counter/**, solvway-services-system/**, solvway-mobile-api/**
    • Verify: mvn -T 1C -q -pl solvway-services-counter,solvway-services-system,solvway-mobile-api verify
  • 3. Password rules backend:

    • Switched-on admin rules [{param, value}] from system.
    • mobile-api GET /api/admin/password-rules/active (any signed-in admin) and GET /api/public/password-rules (public, per-IP limited, gateway and public-path exemptions exact).
    • The named refusal: PASSWORD_RULE with param and value on every admin password path (create user, set temporary, change own, first login, reset by link).
    • Depends on: 2
    • Scope: solvway-services-system/**, solvway-mobile-api/**, solvway-api-gateway/** (security: controller reads the whole diff)
    • Verify: mvn -T 1C -q -pl solvway-services-system,solvway-mobile-api,solvway-api-gateway verify
  • 4. Portal behaviour:

    • the login hint when the company is empty;
    • PasswordRulesHint, built from the rules, on the four password screens, with the named refusal message;
    • interest Delete and Deactivate confirmations;
    • role Delete with the in-use message;
    • Cancel buttons in the add and edit dialogs;
    • the dashboard explanation lines;
    • the message keys.
    • Depends on: 3
    • Scope: solvway-admin-portal/** except app/components/ui/data-table*
    • Verify: portal verify
  • 5. Phone cards in DataTable below md:

    • title from the first column, labelled values, actions at the bottom;
    • a sort select when columns sort, and shared paging;
    • opt-out for pages with their own cards.
    • Depends on: 4
    • Scope: solvway-admin-portal/app/components/ui/data-table*, and pages only where a column needs a card label or actions marker
    • Verify: portal verify
  • 6. Live check on the local stack with Playwright at 1280 and 360 px:

    • login without a company as staff;
    • the hint with the symbol rule on and off;
    • a named refusal;
    • delete an e2e interest and an e2e role (and the refusal for a role in use);
    • the dashboard lines;
    • cards on Users, Leads, Events, Interests, Roles, Emails, Audit log, Companies and Login security.

    Record the result here.