Feature/omnibus august UI fixes round 2 - #583
Open
jtwatts wants to merge 4 commits into
Open
Conversation
…request One rescue wrapped the whole action, so a bad parent id, a missing template and an unpublished template all rendered "No published Supporting Files request template was found". Split into SupportRequestTemplateMissingError, SupportRequestTemplateError and RecordNotFound, each with its own message, all 404 to match esp_application_controller. Pass the exception to render_error so it is logged; detail: was being dropped. Adds this controller's first spec.
Cards always read "Requested: <created>" and claimed an admin uploaded. Branch on the linked application instead: new_draft shows Requested with the request date, every other state shows Submitted with signed_off_at, and the wording follows the audience type. Falls back to generic copy when no file list was given, drops the leftover "..." from uploadFilesText, and shows the reference number in the card header so cards are distinguishable while collapsed. Exposes signed_off_at on minimal_with_documents, used only by SupportRequestBlueprint, and asserts the fields the card reads.
Contributor
There was a problem hiding this comment.
Pull request overview
Improves support-request UI details and distinguishes template configuration failures from missing records.
Changes:
- Enhances support-request cards with dates, reference numbers, and pathway-specific messaging.
- Adds targeted support-request error handling and translations.
- Adds controller regression coverage and serializes submission timestamps.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
spec/controllers/api/support_requests_controller_spec.rb |
Covers creation, serialization, and error cases. |
config/locales/en.yml |
Adds support-request errors and copy edits. |
app/services/support_requests/base_service.rb |
Raises specific template errors. |
app/frontend/i18n/i18n.ts |
Adds card labels and messaging. |
app/frontend/components/shared/energy-savings-applications/support-request-list.tsx |
Enhances support-request card presentation. |
app/errors/support_request_template_missing_error.rb |
Defines missing-template error subtype. |
app/errors/support_request_template_error.rb |
Defines template error base class. |
app/controllers/api/support_requests_controller.rb |
Maps failures to targeted responses. |
app/blueprints/permit_application_blueprint.rb |
Exposes support-request submission time. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| 'An agent has reviewed your {{submissionType}} and needs more information. Please review and update your {{submissionType}}.', | ||
| supportingFileSubmissionText: 'An admin has submitted supporting files on your behalf.', | ||
| uploadFilesText: 'Please upload... {{additionalText}}', | ||
| supportingFileParticipantSubmissionText: 'You have submitted the requested supporting files.', |
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.
No description provided.