Skip to content

General: Rewrite global toast error messages with context and guidance - #2517

Merged
az108 merged 3 commits into
mainfrom
general/1188-improve-toast-error-messages
May 21, 2026
Merged

General: Rewrite global toast error messages with context and guidance#2517
az108 merged 3 commits into
mainfrom
general/1188-improve-toast-error-messages

Conversation

@az108

@az108 az108 commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Checklist

General

Client

Motivation and Context

Closes #1188.

The issue points out that most toast error messages in global.json were too terse to actually help the user. Concretely, 17 of them used the literal summary "Error" / "Fehler", and many details were one short sentence like "This is not a valid jobId." — no context for what action failed, no guidance for what to do next.

This PR walks the toast/error sections of global.json (EN + DE) and rewrites each message against the three-part pattern from the issue:

  • Context — the summary names what failed ("Invalid job link", "Could not load application", "Email required").
  • Cause — included in the detail only when it's user-relevant ("the link may be broken or the position may have been removed", "the code may be expired or incorrect").
  • Guidance — every detail ends with a concrete next step ("browse available positions", "open it from your applications overview", "reload the page", "request a new code", "contact us if the problem persists").

Description

Edited only string values; every JSON key is preserved so no Angular component code needs touching.

Sections rewritten in both EN and DE:

Path What changed
entity.toast.applyFlow.* 20 entries reworked. The 17 that had summary: "Error" / "Fehler" now have meaningful contextual summaries. Details rewritten to follow Context + (Cause) + Guidance.
entity.toast.applicationOverview.delete.error Added "or contact us if the problem persists" guidance so a stuck delete has an escape hatch.
entity.upload.error.{upload,delete,rename}_failed "Failed to X. Please try again." → "We couldn't X. Please [specific guidance], or contact us if the problem persists."
entity.aiExtraction.aiExtractionFailed Now hints at a likely cause ("not a clear, readable PDF") and offers a manual fallback.
imageUpload.error.uploadFailed Added connection-check + support fallback guidance.
reference.uploadFailed External referees were getting "We could not save your letter. Please try again." — now also points them at the support email since they typically don't have an account to log a ticket through.

Withdraw-related toasts (entity.toast.applyFlow.applicationWithdrawn, errorWithdrawingApplication, applicationOverview.withdraw.*) were left untouched here because PR #2515 (Unsubmit / issue #1523) already rewrites them with copy specific to the new "move back to draft" semantics. Avoiding the conflict means the two PRs can land in either order.

Out of scope for this PR: toast messages outside global.json (e.g. job.json, evaluation.json, interview.json, settings.json). The issue title calls out global.json specifically as the worst offender, and bundling every i18n file would blow up the diff. Happy to follow up with per-file passes if you want.

Steps for Testing

The fastest way to eyeball the changes is to read the diff — but for live verification:

  1. Open the app, navigate to Apply for a job with a deliberately bad URL like /application/creation?jobId=not-a-uuid. You should see the "Invalid job link" toast with the new wording, not the old "Error / This is not a valid jobId.".
  2. Open My applications, click Edit on a submitted (non-draft) application — verify the "Application no longer editable" toast appears with the new explanatory text.
  3. Try to upload an oversized document on the application page — confirm the existing size-limit toasts still trigger (they were already informative and weren't touched).
  4. Switch UI language to German and repeat 1–3 to verify the German strings.

Review Progress

Code Review

  • Code Review 1

Manual Tests

  • Trigger an applyFlow toast in EN and read it as a user — does it actually help?
  • Same in DE
  • Document upload error toasts

Test Coverage

Client

Class/File Line Coverage Lines Expects Ratio
toast-service.ts 100.00% 73 10 13.7

Last updated: 2026-05-21 12:59:33 UTC

…dance

Audit all toast error messages in i18n/{en,de}/global.json against the
Context (what failed) + optional Cause + Guidance (what to do next)
pattern from issue #1188. Every message now has a meaningful summary
instead of the generic "Error" / "Fehler" placeholder, and every detail
ends with a concrete next step the user can take (retry, reload, open a
specific page, contact support).

Sections touched: entity.toast.applyFlow.* (17 of these were summary
"Error"), entity.toast.applicationOverview.delete.error,
entity.upload.error.{upload,delete,rename}_failed,
entity.aiExtraction.aiExtractionFailed, imageUpload.error.uploadFailed,
reference.uploadFailed. Withdraw-related toasts are intentionally left
alone because PR #2515 (unsubmit) already rewrites them.

JSON keys are unchanged, so no component code needs updating.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the client Pull requests that update TypeScript code. (Added Automatically!) label May 14, 2026
@codacy-production

codacy-production Bot commented May 14, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 high

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Security 1 high

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Cathy0123456789 Cathy0123456789 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, some error messages are too long to be read within the 3 sec they pop up approximately.

…ng messages

The previous wording was friendly but too long to read inside the 3-second
toast window. This:

- Bumps the default toast life to 5s for warnings and 6s for errors (success
  and info stay at 3s) so users actually get a chance to read them.
- Trims every error detail string in EN and DE down to roughly one short
  sentence with a clear next step (try again, reload, open from overview,
  contact us).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the tests label May 16, 2026
@az108
az108 requested a review from Cathy0123456789 May 16, 2026 14:49
@az108
az108 merged commit 3fd25fd into main May 21, 2026
16 of 17 checks passed
@az108
az108 deleted the general/1188-improve-toast-error-messages branch May 21, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Pull requests that update TypeScript code. (Added Automatically!) ready for review tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve toast error messages

2 participants