fix: replace error cards with toast notifications and auto-reporting#2
fix: replace error cards with toast notifications and auto-reporting#2
Conversation
Submission errors now show inline toast notifications with a "Report" action that auto-files a support ticket, instead of navigating to a full-page error card. The submit button changes to a destructive "Retry Submission" state so users can correct and resubmit without losing form data. On the server side, a model validator strips project detail fields that do not match the selected project type, preventing stale data from causing validation failures when users switch between project types mid-form. Refs: #1
There was a problem hiding this comment.
Pull request overview
This PR improves form submission UX by replacing full-page error cards with toast-based error handling that preserves form state and enables one-click auto-reporting, while also hardening server-side validation to prevent stale project-type details from causing 422s when users switch project types mid-form.
Changes:
- Add toast-based submission error handling with a “Report” action that auto-files a support request, and update multiple request pages/forms to preserve state and show a destructive “Retry Submission” CTA.
- Add client + server sanitization to strip non-selected VM project detail payload sections before submission/validation.
- Add E2E coverage for Issue #1 reproduction, project-type switching, and retry-after-failure behavior.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| server/uv.lock | Updates uv lock options metadata. |
| server/request_server/schemas/vm_request.py | Adds a model_validator(mode="before") to strip non-matching project detail fields prior to validation. |
| e2e/tests/vm-request-edge-cases.spec.ts | Adds E2E scenarios for Issue #1 reproduction, project switching, and retry flow with form data preserved. |
| e2e/fixtures/test-data.ts | Adds a VM request test config that mirrors Issue #1. |
| client/src/services/vm-requests.ts | Sanitizes outgoing VM request payload to only include the matching project detail object. |
| client/src/pages/VMRequestPage.tsx | Replaces error-card navigation with toast error handling and a submitFailed state passed into the form. |
| client/src/pages/VMAccessRequestPage.tsx | Same toast-based error handling + submitFailed wiring for VM access requests. |
| client/src/pages/TUMGuestRequestPage.tsx | Same toast-based error handling + submitFailed wiring; uses extracted contact info for anonymous reporting. |
| client/src/pages/SupportRequestPage.tsx | Same toast-based error handling + submitFailed wiring; uses extracted contact info for anonymous reporting. |
| client/src/pages/ArtemisRequestPage.tsx | Same toast-based error handling + submitFailed wiring; uses extracted contact info for anonymous reporting. |
| client/src/lib/submission-error.ts | Introduces shared toast error + auto-reporting logic and contact-info extraction helpers. |
| client/src/index.css | Adds a shake animation used to visually emphasize retry state. |
| client/src/components/vm-request/VMRequestForm.tsx | Plumbs submitFailed into navigation to show retry state. |
| client/src/components/vm-access-request/VMAccessRequestForm.tsx | Plumbs submitFailed into navigation to show retry state. |
| client/src/components/ui/sonner.tsx | Adds a Toaster wrapper component (Sonner) with icon styling. |
| client/src/components/ui/form-navigation.tsx | Adds destructive “Retry Submission” button state + shake animation on failure. |
| client/src/components/tum-guest-request/TUMGuestRequestForm.tsx | Plumbs submitFailed into navigation to show retry state. |
| client/src/components/support-request/SupportRequestForm.tsx | Adds destructive “Retry Submission” UI state on failure. |
| client/src/components/artemis-request/ArtemisRequestForm.tsx | Plumbs submitFailed into navigation to show retry state. |
| client/src/App.tsx | Mounts the global Toaster so toast notifications render application-wide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR improves request submission UX by replacing full-page error cards with toast-based errors that support auto-reporting, while also preventing stale project-type-specific data from causing server-side validation failures when users switch project types mid-form (ref #1).
Changes:
- Client: show toast notifications on submission failure with a “Report” action, and switch the submit button into a destructive “Retry Submission” state without losing form state.
- Client/Server: strip non-selected project-type detail fields before submission / during model validation to prevent stale data from breaking validation.
- E2E: add Playwright coverage for issue #1 reproduction, project-type switching, and retry-after-failure behavior.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| server/uv.lock | Updates uv lock options to align with new exclude-newer behavior. |
| server/pyproject.toml | Configures uv to exclude packages published in the last week. |
| server/request_server/schemas/vm_request.py | Adds a Pydantic before validator to remove non-matching project detail payloads. |
| e2e/tests/vm-request-edge-cases.spec.ts | Adds new E2E coverage for project-type switching and retry-on-failure flows. |
| e2e/fixtures/test-data.ts | Adds a VM request test config reproducing issue #1. |
| client/src/services/vm-requests.ts | Cleans project detail fields before posting VM requests. |
| client/src/pages/VMRequestPage.tsx | Replaces error card flow with toast-based failure handling and submitFailed state. |
| client/src/pages/VMAccessRequestPage.tsx | Replaces error card flow with toast-based failure handling and submitFailed state. |
| client/src/pages/TUMGuestRequestPage.tsx | Replaces error card flow with toast-based failure handling and submitFailed state. |
| client/src/pages/SupportRequestPage.tsx | Replaces error card flow with toast-based failure handling and submitFailed state. |
| client/src/pages/ArtemisRequestPage.tsx | Replaces error card flow with toast-based failure handling and submitFailed state. |
| client/src/lib/submission-error.ts | Adds shared toast + auto-reporting support ticket submission helper. |
| client/src/components/ui/sonner.tsx | Adds a shared Sonner Toaster wrapper with icons and styling. |
| client/src/App.tsx | Mounts the new Toaster globally. |
| client/src/components/ui/form-navigation.tsx | Adds destructive “Retry Submission” state + shake animation on failure. |
| client/src/index.css | Adds global shake animation and reduced-motion override. |
| client/src/components/vm-request/VMRequestForm.tsx | Threads submitFailed state down to navigation controls. |
| client/src/components/vm-access-request/VMAccessRequestForm.tsx | Threads submitFailed state down to navigation controls. |
| client/src/components/tum-guest-request/TUMGuestRequestForm.tsx | Threads submitFailed state down to navigation controls. |
| client/src/components/support-request/SupportRequestForm.tsx | Updates submit button to destructive “Retry Submission” state on failure. |
| client/src/components/artemis-request/ArtemisRequestForm.tsx | Threads submitFailed state down to navigation controls. |
| client/src/components/shared/RequestErrorCard.tsx | Removes the deprecated full-page error card component. |
| client/package.json | Adds sonner dependency. |
| client/package-lock.json | Updates lockfile for sonner and related dependency bumps. |
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR updates request-form submission error handling to keep users on the form (preserving state) and surface failures via toast notifications with an optional auto-report action, while also adding e2e coverage for the “switch project type mid-form” edge case from Issue #1.
Changes:
- Replace full-page error cards with Sonner toast notifications and a “Retry Submission” destructive/animated submit state.
- Add centralized submission-failure helper that can auto-file a support ticket (“Report” action).
- Add new e2e scenarios covering project-type switching and retry-after-failure behavior; add client-side request payload cleaning for VM project details.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| server/uv.lock | Adds uv lock options related to exclude-newer / span. |
| server/pyproject.toml | Configures tool.uv.exclude-newer = "7d" for safer dependency resolution. |
| e2e/tests/vm-request-edge-cases.spec.ts | New e2e coverage for Issue #1 reproduction, project-type switching, and retry behavior. |
| e2e/fixtures/test-data.ts | Adds VM request fixture config reproducing Issue #1. |
| client/src/services/vm-requests.ts | Adds client-side cleaning to only send the selected project detail block. |
| client/src/pages/VMRequestPage.tsx | Switches failure handling from error card to toast + submitFailed UI state. |
| client/src/pages/VMAccessRequestPage.tsx | Same toast-based submission failure handling + submitFailed. |
| client/src/pages/TUMGuestRequestPage.tsx | Same toast-based submission failure handling + submitFailed. |
| client/src/pages/SupportRequestPage.tsx | Same toast-based submission failure handling + submitFailed. |
| client/src/pages/ArtemisRequestPage.tsx | Same toast-based submission failure handling + submitFailed. |
| client/src/lib/submission-error.ts | New centralized toast + auto-report support-ticket submission helper. |
| client/src/lib/api.ts | Adjusts VM request submission payload to include only the selected project detail fields. |
| client/src/index.css | Adds shake animation used for the “Retry Submission” button state (with reduced-motion support). |
| client/src/components/vm-request/VMRequestForm.tsx | Wires submitFailed to form navigation. |
| client/src/components/vm-access-request/VMAccessRequestForm.tsx | Wires submitFailed to form navigation. |
| client/src/components/ui/sonner.tsx | Adds Sonner Toaster wrapper with icon + styling configuration. |
| client/src/components/ui/form-navigation.tsx | Adds destructive “Retry Submission” state + shake animation on last step. |
| client/src/components/tum-guest-request/TUMGuestRequestForm.tsx | Wires submitFailed to form navigation. |
| client/src/components/support-request/SupportRequestForm.tsx | Updates submit button to reflect retry state + icons/animation. |
| client/src/components/shared/RequestErrorCard.tsx | Removes the full-page submission error card component. |
| client/src/components/artemis-request/ArtemisRequestForm.tsx | Wires submitFailed to form navigation. |
| client/src/App.tsx | Mounts the global <Toaster />. |
| client/package.json | Adds sonner dependency. |
| client/package-lock.json | Lockfile updates for Sonner and transitive dependency bumps. |
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR updates the client submission UX to keep users on the form after failures, showing toast-based error feedback with an optional auto-report action, and fixes VM request payload issues when users switch project types mid-form (ref #1).
Changes:
- Replaces full-page error cards with toast notifications and introduces a “Retry Submission” destructive button state to preserve form data on failure.
- Adds automatic support-ticket reporting from the failure toast (“Report” action) and exposes HTTP status codes through the client API layer to improve error categorization.
- Cleans VM request project-detail fields on submission to prevent stale project-type data from causing server-side validation failures; adds E2E coverage for switching/edge cases.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| server/uv.lock | Records uv resolver options in the lockfile (exclude-newer span). |
| server/pyproject.toml | Configures uv to avoid resolving very recent releases (supply-chain hardening). |
| e2e/tests/vm-request-edge-cases.spec.ts | Adds E2E coverage for issue #1 reproduction, project type switching, and retry-after-failure behavior. |
| e2e/fixtures/test-data.ts | Adds a VM request config for reproducing issue #1. |
| client/src/services/vm-requests.ts | Sanitizes VM request payload by stripping non-selected project details before POST. |
| client/src/pages/VMRequestPage.tsx | Switches failure handling to shared toast/report flow and passes submitFailed into the form. |
| client/src/pages/VMAccessRequestPage.tsx | Switches failure handling to shared toast/report flow and passes submitFailed into the form. |
| client/src/pages/TUMGuestRequestPage.tsx | Switches failure handling to shared toast/report flow and passes submitFailed into the form. |
| client/src/pages/SupportRequestPage.tsx | Switches failure handling to shared toast/report flow and passes submitFailed into the form. |
| client/src/pages/ArtemisRequestPage.tsx | Switches failure handling to shared toast/report flow and passes submitFailed into the form. |
| client/src/lib/submission-error.ts | Introduces shared toast + auto-report utilities for submission failures. |
| client/src/lib/api.ts | Adds statusCode to APIResponse and populates it from ApiError for better UI decisions. |
| client/src/index.css | Adds a shake animation used by “Retry Submission” destructive buttons. |
| client/src/components/vm-request/VMRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/components/vm-access-request/VMAccessRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/components/ui/sonner.tsx | Adds a centralized Toaster wrapper with consistent iconography/styling. |
| client/src/components/ui/form-navigation.tsx | Updates submit button to destructive “Retry Submission” state + shake animation on failure. |
| client/src/components/tum-guest-request/TUMGuestRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/components/support-request/SupportRequestForm.tsx | Updates submit button to destructive “Retry Submission” state + shake animation on failure. |
| client/src/components/shared/RequestErrorCard.tsx | Removes the old full-page error-card component. |
| client/src/components/artemis-request/ArtemisRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/App.tsx | Mounts the global Toaster so toasts appear app-wide. |
| client/package.json | Adds sonner dependency. |
| client/package-lock.json | Locks sonner and updates transitive dependencies. |
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR updates request submission UX to keep users on the form after failures by switching from full-page error cards to toast notifications (with an auto-report action), while also preventing stale VM project-type-specific fields from being submitted after mid-form project type switches (refs #1).
Changes:
- Replace error-card navigation with toast-based submission failure handling, including “Report” (auto-support-ticket) and a destructive “Retry Submission” state.
- Sanitize VM request payloads by stripping project detail fields that don’t match the selected project type.
- Add Playwright E2E coverage for issue #1 reproduction, project-type switching, and “retry after failure preserves form data”.
Reviewed changes
Copilot reviewed 25 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/uv.lock | Records uv resolver options (exclude-newer span) in the lockfile. |
| server/pyproject.toml | Configures uv to exclude packages published within the last week. |
| server/request_server/services/descriptions/blocks.py | Adjusts formatting of the generated account info block output. |
| e2e/tests/vm-request-edge-cases.spec.ts | Adds E2E tests for issue #1 reproduction, type switching, and retry/preservation behavior. |
| e2e/helpers/form-fillers.ts | Exports shared navigation/helpers used by the new E2E tests. |
| e2e/fixtures/test-data.ts | Adds a VM request config matching issue #1’s scenario. |
| e2e/fixtures/auth.ts | Makes Playwright route handlers async and awaits fulfill/fallback calls. |
| client/src/services/vm-requests.ts | Adds cleanProjectDetails and uses it during VM request creation. |
| client/src/pages/VMRequestPage.tsx | Uses toast-based error handling, retry state, and cleans payload before submit. |
| client/src/pages/VMAccessRequestPage.tsx | Switches to toast-based failure handling and retry state. |
| client/src/pages/TUMGuestRequestPage.tsx | Switches to toast-based failure handling and retry state. |
| client/src/pages/SupportRequestPage.tsx | Switches to toast-based failure handling and retry state. |
| client/src/pages/ArtemisRequestPage.tsx | Switches to toast-based failure handling and retry state. |
| client/src/lib/submission-error.ts | Introduces shared toast + auto-report support-ticket helper utilities. |
| client/src/lib/api.ts | Adds statusCode to API responses via ApiError to improve failure messaging. |
| client/src/index.css | Adds shake animation and respects reduced-motion preferences. |
| client/src/components/vm-request/VMRequestForm.tsx | Plumbs submitFailed into form navigation for retry UI. |
| client/src/components/vm-access-request/VMAccessRequestForm.tsx | Plumbs submitFailed into form navigation for retry UI. |
| client/src/components/tum-guest-request/TUMGuestRequestForm.tsx | Plumbs submitFailed into form navigation for retry UI. |
| client/src/components/artemis-request/ArtemisRequestForm.tsx | Plumbs submitFailed into form navigation for retry UI. |
| client/src/components/support-request/SupportRequestForm.tsx | Updates submit button UI to show retry/destructive state and icons. |
| client/src/components/ui/form-navigation.tsx | Adds destructive “Retry Submission” state and shake animation on failure. |
| client/src/components/ui/sonner.tsx | Adds a configured Sonner toaster wrapper with icon styling. |
| client/src/components/shared/RequestErrorCard.tsx | Removes the no-longer-used full-page error card component. |
| client/src/App.tsx | Mounts the global Sonner toaster. |
| client/package.json | Adds sonner dependency. |
| client/package-lock.json | Updates lockfile for sonner and related transitive dependency resolutions. |
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR improves the request submission UX by replacing full-page error cards with toast-based error handling (including a one-click “Report” action that auto-files a support ticket), while also preventing VM request validation failures caused by stale project-type-specific fields when users switch project types mid-form (ref #1).
Changes:
- Replace full-page submission error cards with toast notifications + auto-reporting, and add a “Retry Submission” destructive button state that preserves form data.
- Strip non-selected VM
projectTypedetail fields on submit to avoid sending stale data that can trigger server-side validation errors. - Add E2E coverage for issue #1 reproduction, project type switching, and “failure then retry succeeds” behavior.
Reviewed changes
Copilot reviewed 25 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/uv.lock | Records new uv resolver options related to exclude-newer. |
| server/pyproject.toml | Configures uv to avoid resolving packages published in the last 7 days. |
| server/request_server/services/descriptions/blocks.py | Tweaks account info block formatting (indentation) in ticket description blocks. |
| e2e/tests/vm-request-edge-cases.spec.ts | Adds Playwright tests covering issue #1, project-type switching, and retry after failure. |
| e2e/helpers/form-fillers.ts | Exports shared navigation/step helpers used by new E2E tests. |
| e2e/fixtures/test-data.ts | Adds a VM request fixture matching issue #1. |
| e2e/fixtures/auth.ts | Makes Playwright route handlers async/await for consistency. |
| client/src/services/vm-requests.ts | Adds cleanProjectDetails and applies it to VM request creation. |
| client/src/pages/VMRequestPage.tsx | Uses toast-based failure handling and passes submitFailed into the form. |
| client/src/pages/VMAccessRequestPage.tsx | Uses toast-based failure handling and passes submitFailed into the form. |
| client/src/pages/TUMGuestRequestPage.tsx | Uses toast-based failure handling and passes submitFailed into the form. |
| client/src/pages/SupportRequestPage.tsx | Uses toast-based failure handling and passes submitFailed into the form. |
| client/src/pages/ArtemisRequestPage.tsx | Uses toast-based failure handling and passes submitFailed into the form. |
| client/src/lib/submission-error.ts | Introduces centralized toast error handling + auto-report-to-support behavior. |
| client/src/lib/api.ts | Adds statusCode to API responses for better error classification in UI. |
| client/src/index.css | Adds animate-shake keyframes + reduced-motion handling for retry emphasis. |
| client/src/components/vm-request/VMRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/components/vm-access-request/VMAccessRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/components/tum-guest-request/TUMGuestRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/components/support-request/SupportRequestForm.tsx | Updates submit button visuals for retry state (destructive + shake). |
| client/src/components/artemis-request/ArtemisRequestForm.tsx | Threads submitFailed into shared form navigation. |
| client/src/components/ui/form-navigation.tsx | Implements “Retry Submission” destructive/shake behavior on last step. |
| client/src/components/ui/sonner.tsx | Adds a shared Sonner <Toaster> wrapper with consistent styling/icons. |
| client/src/components/shared/RequestErrorCard.tsx | Removes the now-unused full-page error card component. |
| client/src/App.tsx | Mounts the global <Toaster> instance. |
| client/package.json | Adds sonner dependency. |
| client/package-lock.json | Locks sonner and related dependency updates. |
Files not reviewed (1)
- client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# 1.0.0 (2026-05-04) ### Bug Fixes * adapt for redmine usage ([bb251d8](bb251d8)) * allow clearing image URL and description fields ([9b76dc4](9b76dc4)) * **annoucements:** fix spelling mistake ([0c93555](0c93555)) * **auth:** set token getter synchronously to prevent 401 on reload for admin page ([56c5bdc](56c5bdc)) * **privacy:** correct legal basis and data protection disclosures ([f51a19c](f51a19c)) * **privacy:** correct legal basis and data protection disclosures ([82a8b5a](82a8b5a)) * replace error cards with toast notifications and auto-reporting ([magkue#2](https://github.com/ls1admin/request/issues/2)) ([3912064](3912064)), closes [magkue#1](https://github.com/ls1admin/request/issues/1) * revert responsive design ([e02673c](e02673c)) * **server:** resolve type checker errors and pin dependency versions ([d17fd2f](d17fd2f)) * update models and adjust anonymous artemis form ([de7c054](de7c054)) ### Features * add a link to the github repository ([magkue#3](https://github.com/ls1admin/request/issues/3)) ([e29a645](e29a645)) * add external links admin with drag-and-drop and e2e tests ([f063884](f063884)) * add redmine integration ([df0b309](df0b309)) * add reusable what's new dialog and SSH key management ([564151b](564151b)) * add support requests ([ce04253](ce04253)) * improve responsiveness to different screen sizes ([472e092](472e092)) * improve VM Request Form ([854b342](854b342)) * initial release of AET Request system ([9be8e95](9be8e95)) * **retention:** add automatic data retention with GDPR-compliant privacy updates ([ce9561b](ce9561b)) * **ssh:** preselect existing key option when user has stored keys ([852f0d9](852f0d9)) * **ui:** add environment badge to header for non-production deployments ([d197bf2](d197bf2))
Submission errors now show inline toast notifications with a "Report" action that auto-files a support ticket, instead of navigating to a full-page error card. The submit button changes to a destructive "Retry Submission" state so users can correct and resubmit without losing form data.
On the client side, we strip project detail fields that do not match the selected project type, preventing stale data from causing validation failures when users switch between project types mid-form.
Refs: #1