Skip to content

test(platform): pin translated labels in task status notifications - #5094

Closed
tale-code-bot wants to merge 1 commit into
mainfrom
test/task-status-notification-labels
Closed

tale-code-bot wants to merge 1 commit into
mainfrom
test/task-status-notification-labels

Conversation

@tale-code-bot

Copy link
Copy Markdown
Collaborator

Closes #3634

Task: TALE-27 on Tale's Development board, "Bug: Task status notifications show raw status identifiers instead of translated labels".

What this changes

This PR adds regression coverage only; it changes no product code.

The defect reported at 44e0dcf254975286c0e9dea443b5cd1ca6b23347 showed the board's status ids in the bell's task-status sentence: Robin hat "Proof task" von in_progress nach in_review verschoben. It is already fixed on main by #4017 (a29ec1d2b3321516db265f4a37b99e9d79ac7ad3, merged 2026-09-30; the reported pin is its ancestor). Since then, NotificationListPanel passes each personal row's params through readableNotificationParams (lib/shared/notification-params.ts), which names a task status by its tasks.status.* label.

#4017 was filed for #3790 and did not reference this issue, though, and no test rendered the bell's task-status sentence, in any language. Removing the panel's mapping failed no test: the helper's own test uses stand-in labels, and the REST mirror is a different surface. A refactor of the panel could bring the raw ids back unnoticed.

  • app/features/notifications/components/notification-list-panel.test.tsx
    • Renders personal task-status rows the way notifyTaskStatusChanged (backend/domains/collab/service.ts) writes them: { title, projectId, from: 'in_progress', to: 'in_review', actor? } plus taskId.
    • Covers both sentences, taskStatusChangedByBody (with an actor) and taskStatusChangedBody (without), under the real en, de and fr catalogs.
    • Asserts each exact sentence with the labels the task controls show: In progress / In review, In Bearbeitung / In Prüfung, En cours / En revue. French keeps its non-breaking spaces inside « ».
    • Asserts that no in_progress or in_review reaches the page.
  • backend/core/notifications/mirror_message.test.ts: adds French to the REST notification mirror's status-label cases (GET /api/v1/notifications/sync). English and German were already covered.
  • tests/manual/reference/automation.md: lists the panel test on the row that already claims "the bell and the REST notification mirror name task statuses by their labels" (the server and component halves of NOTIF-F20 / NOTIF-F21). NOTIF-F20 stays a manual box, since the running app is still judged by hand.

The locale cases load the language's dayjs data before they render, as the app's shell does on mount (onChange: loadDayjsLocale in app/main.tsx). They also reset the language inside act(), because the panel is still mounted when it goes back to English. Without these two steps, the rows repaint after the assertions and React logs act() warnings.

Other surfaces checked

  • The panel's organization stream renders no task-status rows: notifyTaskStatusChanged is the only writer of taskStatusChanged, and it notifies people one by one.
  • Activity log (ActivityLogView): renders audit summaries, not notification payloads, so it never shows this sentence.
  • Email: task_status_changed is not in ACTIONABLE_NOTIFICATION_TYPES (lib/shared/attention.ts), so the sentence is never emailed.
  • The bell and the REST mirror are therefore the only surfaces, and both are now held in en, de and fr.
  • Domain spec: the notifications spec lists "the wording of each notification in each language" under Not yet. This PR adds no rule card, so the new test names no rule.

How it was tested

Run on this branch's head 8c3219893a0f50df58bebf1d19d27ff96716863f (tree db4bcdb2885083c8a081566dea38a8dd4e6a27f8), from services/platform unless noted, with the GitHub credential removed from the environment:

  • bunx vitest --run --config vitest.ui.config.ts app/features/notifications/components/notification-list-panel.test.tsx: 49/49 passed, including the three new locale cases, with nothing on stderr.

  • bunx vitest --run --project server backend/core/notifications/mirror_message.test.ts lib/shared/notification-params.test.ts: 10/10 passed, including the new French case.

  • bunx commitlint --from HEAD~1 --to HEAD (repository root): 0 problems.

  • Revert proof. I put back the panel's code from before fix(platform): end the dead ends after a task goes to an agent #4017 by passing the raw params instead of the mapped ones (tInbox(n.titleKey, params as never) and tInbox(n.bodyKey, params as never)). The three new cases then fail (3 failed, 46 passed), and the rendered DOM holds the issue's sentences verbatim, plus the English and impersonal forms:

    • Robin hat "Proof task" von in_progress nach in_review verschoben.
    • Robin a fait passer « Proof task » de in_progress à in_review.
    • Robin moved "Proof task" from in_progress to in_review.

    The panel was restored afterwards (git diff clean).

The following ran on 6b2ee8114e281f6e9d9d9fa070f2957277dc4474. That is the same commit with the same tree db4bcdb2…, before its header was shortened to 72 characters:

  • bun run typecheck (tsc --noEmit over the platform's frontend, backend and tests, 6 GiB heap as in CI): passed, no diagnostics.
  • bunx oxlint --type-aware on the two changed test files: clean.
  • oxfmt --check on the changed files: clean (Markdown is outside oxfmt's patterns).
  • bun run lint:manual and bun run lint:conflicts (repository root): passed.
  • The commit went through the repository's hooks: conflict markers, oxfmt, opengrep and commitlint.

Not tested

  • Full UI tier and the rest of the server tier: not run here. The UI tier (bun run --filter @tale/platform test:ui) runs in the merge queue; this PR runs only the touched test files.
  • Real browser: no browser was driven. The proof is jsdom with the production panel, the real catalogs and the app's i18n.

@tale-review-bot tale-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review of head 8c3219893a0f50df58bebf1d19d27ff96716863f (base main 9be5cadacb5f59cd6b2cc67c7840e3c0101bdde2), TALE-27. Approve.

Scope:

  • The defect is already fixed on main: I confirmed that #4017's merge a29ec1d2b3321516db265f4a37b99e9d79ac7ad3 is an ancestor of main. At main, notification-list-panel.tsx maps from/to through readableNotificationParams and tTasks('status.<id>').
  • What this PR adds: only the proving test the triage and the issue's acceptance asked for, as the plan said. It is test-only, with no product code and nothing unrelated.
  • Files (3):
    • the panel test renders the personal task-status rows (with and without an actor) under the real en, de and fr catalogs, asserts the exact sentences with the board's labels, and asserts that no in_progress/in_review text appears;
    • the mirror test adds fr;
    • the NOTIF-F20/NOTIF-F21 register row names the panel test.
  • Contract: branch test/task-status-notification-labels; commit test(platform): … (commitlint-shaped, config-conventional); the body says Closes #3634.

Run myself (credentials removed, deps from the lockfile under host lease a68bde4f, now released):

  • Head: notification-list-panel.test.tsx passed 49/49, including the 3 new en, de and fr cases. The server project's mirror_message.test.ts plus notification-params.test.ts passed 10/10, fr included.
  • Regression: with the panel's readableNotificationParams mapping replaced by the raw params (the code before #4017), the 3 new cases fail (3 failed, 46 passed). Tree restored.

Required checks on this head: all 7 CI ready passed: Checks 40923632259, SAST 40923632216, E2E 40923632267, Security 40923632332, CLI 40923632263, Commitlint 40923632762, Build 40923632440. No review threads and no hold.

Not run by me: the full UI shards (merge queue only) and a real browser.

@tale-review-bot
tale-review-bot added this pull request to the merge queue Oct 29, 2026
@yannickmonney
yannickmonney removed this pull request from the merge queue due to a manual request Oct 29, 2026
@yannickmonney yannickmonney reopened this Oct 29, 2026
@tale-review-bot
tale-review-bot enabled auto-merge (squash) October 29, 2026 20:19
@tale-review-bot

Copy link
Copy Markdown
Collaborator

Reviewer: not landing yet. The approved head 8c3219893a0f50df58bebf1d19d27ff96716863f has no CI round under the current workflows.

  • The newest Checks run on this head, 40947366635 (created 20:15 UTC), checked out Merge 8c3219893a0f50df58bebf1d19d27ff96716863f into 9be5cadacb5f59cd6b2cc67c7840e3c0101bdde2 (merge commit b47cba2). That is main from before 0da08205 ("ci: land each pull request on its own, without the merge queue"), so the run uses the old workflows.
  • In that run, UI (both jobs), Browser, Performance and Backend integration were skipped. The current .github/CI.md has a pull request run every suite its paths owe. Its CI ready (Checks) job is still queued.
  • What lands it: a fresh round on the same head under the current workflows. Closing and reopening the pull request rebuilds its test merge on the current main; draft→ready does not. My approval of 8c3219893a0f50df58bebf1d19d27ff96716863f stands while the head is unchanged. Once every CI ready (...) of that round has finished green, it lands with gh pr merge --squash --auto --match-head-commit 8c3219893a0f50df58bebf1d19d27ff96716863f after a hold read.

@yannickmonney

yannickmonney commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Reopened so the checks run again. The 20:13–20:15 UTC reopen started its runs from a test merge into 9be5cada (before 0da08205), because GitHub had not refreshed it yet. This reopen's runs start from the test merge aa399187c7, into 0da08205. The head is unchanged (no new commit).

@yannickmonney

Copy link
Copy Markdown
Contributor

Landed on train as abdcda4: squashed at the approved head after the fast gate (formatting, typecheck, build). It reaches main with the merge train's pull request, so this pull request closes without merging.

yannickmonney pushed a commit that referenced this pull request Oct 30, 2026
Reviewed and approved in pull request #5094 at 8c32198.

Closes #3634
Task: TALE-27
@yannickmonney
yannickmonney deleted the test/task-status-notification-labels branch October 30, 2026 10:32
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.

Bug: Task status notifications show raw status identifiers instead of translated labels

3 participants