Skip to content

feat(platform): give toasts a concise title and description (#1944) - #2123

Merged
cursor[bot] merged 2 commits into
mainfrom
tale/xs74qgm6ysx03c4pgnzjrfj3x58960wc
Jul 3, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
tale/xs74qgm6ysx03c4pgnzjrfj3x58960wc

Conversation

@larryro

@larryro larryro commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What

Resolves #1944. Splits the shared toast namespace copy into concise title + description pairs and updates every call site to pass both, establishing the title+description convention for toasts.

Changes

  • messages/{en,de,fr}.json — restructured the entire toast.success.* / toast.error.* namespace from single-line strings into { title, description } objects. de-CH inherits from de (no override needed). Titles are short headlines; descriptions carry the precise follow-up.
  • Call sites — updated all consumers of the toast namespace to pass both title and description:
    • automation-row-actions.tsx, account-form.tsx, branding-form.tsx, organization-settings.tsx, member-add-dialog.tsx, configuration.tsx, forced-change-password.$id.tsx
    • use-convex-mutation.ts — generic error fallback now uses error.generic.title + error.generic.description
    • entity-delete-dialog.tsx / use-delete-dialog.ts — added an optional successDescription so the shared delete dialog renders success.deleted as title + description
  • .claude/skills/react/SKILL.md — documented the title+description convention so new toasts follow it.

Verification

  • bun run --filter @tale/platform test (i18n suite) — green: parity + usage (orphan-key) checks pass for the new nested keys across all locales.
  • bunx tsc --noEmit (platform typecheck) — green.
  • bunx oxlint on changed files — 0 warnings, 0 errors.
  • bunx oxfmt --check on changed files — clean.

Notes

  • Scope follows the issue's concrete "Proposed change": the shared toast namespace + its call sites. Feature-local toasts that already pass a title (and often a description) are unaffected; the new convention bullet guides future ones.
  • No docs/ change: this refines existing micro-copy within shipped features rather than adding a documented feature surface.

@larryro

larryro commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Desk Review — feat(platform): give toasts a concise title and description (#1944)

Verdict: ✅ READY TO MERGE

CI

All 40 checks pass (gh pr checks): Analyze (js-ts, python), Build platform + all services, Lint, Format, Knip, Migrations, Opengrep, Smoke test, and all 16 Playwright (platform) shards + Playwright (web/docs). No red, none pending.

Tests I ran locally (branch checked out, bun install)

  • i18n parity + usage (bunx vitest --run --project server lib/i18n/messages.test.ts) → 23 passed. parity and usage run in enforce mode, so this mechanically confirms: every toast key exists in en/de/fr with matching structure, every code reference resolves, and no key is orphaned.
  • Affected component tests (vitest --config vitest.ui.config.ts on entity-delete-dialog, use-convex-mutation, automation-row-actions, branding-form, member-add-dialog) → 25 passed.

What's correct

  • All 22 migrated call sites across 11 files reference the new *.title / *.description paths, and every referenced key exists as a {title, description} object in en/de/fr.
  • Zero stragglers: a repo-wide grep across all services found no toast.success.* / toast.error.* flat reference left without a .title/.description suffix — so nothing renders an object by accident.
  • member-add-dialog conditional (existingUserAdded vs newMemberCreated) uses the same guard for title and description — stays in sync.
  • useConvexMutation generic fallback (error.generic.title / .description) is sound; both keys exist.
  • entity-delete-dialog passes the optional successDescription; the Toaster guards {description && …}, so undefined renders cleanly. The 4 delete-dialog consumers (customer/website/vendor/knowledge-entry) all go through the shared hook and get title+description; their feature-local *deleteError keys are unchanged and still exist.
  • e2e specs (rbac, settings, settings-depth) updated to assert *.title; no other spec references a migrated flat key.
  • de/fr translations are genuine (not English copies) and keep the informal du/tu register consistent with surrounding strings.
  • The title+description convention is documented in .claude/skills/react/SKILL.md (issue's 3rd bullet).
  • de-CH.json has no toast namespace — it never did on main, and the regional loader falls back de→en, so de-CH is unaffected (no regression; parity test accepts it).

Non-blocking observation

~146 feature-local toast calls (outside the shared toast namespace, e.g. tasks/projects/discussions) remain title-only. The issue's concrete "Proposed change" scopes the work to "the toast namespace", and SKILL.md establishes the convention for future toasts — so this is reasonably out of scope for this PR, not a defect. Flagging for visibility only.

No blocking issues found. Approving.

@cursor
cursor Bot force-pushed the tale/xs74qgm6ysx03c4pgnzjrfj3x58960wc branch from f4228ca to 860fd66 Compare July 3, 2026 22:03
@cursor
cursor Bot merged commit 938f91e into main Jul 3, 2026
44 of 47 checks passed
@cursor
cursor Bot deleted the tale/xs74qgm6ysx03c4pgnzjrfj3x58960wc branch July 3, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvement: Give all toasts a concise title + description

1 participant