fix(ui): add project and task error summaries

This commit is contained in:
sechmachine
2026-08-15 01:46:23 +07:00
parent cbdbd8ee13
commit c5c143c3cd
9 changed files with 71 additions and 14 deletions
@@ -4,11 +4,12 @@
- **Requirement IDs:** `UI-003`, `UI-004`, `UI-007`, `UI-009`, `UI-013`, `I1-UI-04`
- **Scenario IDs:** `AC-UI-002`, `AC-UI-003`, `AC-UI-005`
- **Test class/method:** `com.lab.labtimesheet.feature.reporting.controller.ProjectTaskShellContractTest#projectAndTaskPageUsesSharedDesktopShell`, `com.lab.labtimesheet.feature.project.controller.ProjectControllerTest`, `com.lab.labtimesheet.feature.task.controller.TaskControllerTest`
- **Implementation commit:** `pending`
- **Implementation and final-Project integration commits:** `401f676`, `4849e0b`
## Protected behavior
Every Iteration 1 Project and Task page uses the same authenticated desktop shell, local assets, role-aware Project navigation, table containment, form controls, empty states, status badges, and `dd/MM/yyyy` date presentation. Existing capability-gated actions, server routes, validation, authentication, and CSRF contracts remain unchanged.
Project and Task forms provide both an error summary and inline field errors for failed server validation.
## Test method
@@ -70,7 +71,36 @@ BUILD SUCCESS
Total time: 4.020 s
```
The first affected attempt additionally caught Thymeleaf trying to resolve a `null` action fragment on five pages. Replacing `null` with Thymeleaf's empty fragment token made the identical 25-test command green.
The first affected attempt additionally caught Thymeleaf trying to resolve a `null` action fragment on five pages. Replacing `null` with Thymeleaf's empty fragment token made the identical 25-test command green. After merging the final Project activation pin, the one overlapping detail template retained both the shell and the capability-gated activation form; the focused Project/shell set passed 25 tests.
Final-review form-summary regression:
```text
./mvnw -Dtest=ProjectTaskShellContractTest test
RED: Tests run: 10, Failures: 2, Errors: 0, Skipped: 0
Both forms were missing #fields.hasAnyErrors() and #fields.allErrors().
./mvnw -Dtest=ProjectTaskShellContractTest,ProjectControllerTest,TaskControllerTest test
GREEN: Tests run: 29, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
Total time: 4.214 s
```
## Final delivery gate
```text
npm ci
added 34 packages; audited 35 packages; 0 vulnerabilities
npm run build
Tailwind CSS v4.3.3: Done in 68ms
./mvnw test
PostgreSQL 18.4 via Testcontainers
Tests run: 152, Failures: 0, Errors: 0, Skipped: 0
36 Surefire reports
BUILD SUCCESS
```
## External-test boundaries