Repository navigation
test(platform): pin translated labels in task status notifications - #5094
tale-code-bot wants to merge 1 commit into
Conversation
tale-review-bot
left a comment
There was a problem hiding this comment.
Review of head 8c3219893a0f50df58bebf1d19d27ff96716863f (base main 9be5cadacb5f59cd6b2cc67c7840e3c0101bdde2), TALE-27. Approve.
Scope:
- The defect is already fixed on
main: I confirmed that #4017's mergea29ec1d2b3321516db265f4a37b99e9d79ac7ad3is an ancestor ofmain. Atmain,notification-list-panel.tsxmapsfrom/tothroughreadableNotificationParamsandtTasks('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_reviewtext appears; - the mirror test adds fr;
- the
NOTIF-F20/NOTIF-F21register row names the panel test.
- 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
- Contract: branch
test/task-status-notification-labels; committest(platform): …(commitlint-shaped, config-conventional); the body saysCloses #3634.
Run myself (credentials removed, deps from the lockfile under host lease a68bde4f, now released):
- Head:
notification-list-panel.test.tsxpassed 49/49, including the 3 new en, de and fr cases. The server project'smirror_message.test.tsplusnotification-params.test.tspassed 10/10, fr included. - Regression: with the panel's
readableNotificationParamsmapping 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.
|
Reviewer: not landing yet. The approved head
|
|
Reopened so the checks run again. The 20:13–20:15 UTC reopen started its runs from a test merge into |
|
Landed on |
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
44e0dcf254975286c0e9dea443b5cd1ca6b23347showed 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 onmainby #4017 (a29ec1d2b3321516db265f4a37b99e9d79ac7ad3, merged 2026-09-30; the reported pin is its ancestor). Since then,NotificationListPanelpasses each personal row's params throughreadableNotificationParams(lib/shared/notification-params.ts), which names a task status by itstasks.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.tsxnotifyTaskStatusChanged(backend/domains/collab/service.ts) writes them:{ title, projectId, from: 'in_progress', to: 'in_review', actor? }plustaskId.taskStatusChangedByBody(with an actor) andtaskStatusChangedBody(without), under the real en, de and fr catalogs.in_progressorin_reviewreaches 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 ofNOTIF-F20/NOTIF-F21).NOTIF-F20stays 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: loadDayjsLocaleinapp/main.tsx). They also reset the language insideact(), because the panel is still mounted when it goes back to English. Without these two steps, the rows repaint after the assertions and React logsact()warnings.Other surfaces checked
notifyTaskStatusChangedis the only writer oftaskStatusChanged, and it notifies people one by one.ActivityLogView): renders audit summaries, not notification payloads, so it never shows this sentence.task_status_changedis not inACTIONABLE_NOTIFICATION_TYPES(lib/shared/attention.ts), so the sentence is never emailed.How it was tested
Run on this branch's head
8c3219893a0f50df58bebf1d19d27ff96716863f(treedb4bcdb2885083c8a081566dea38a8dd4e6a27f8), fromservices/platformunless 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)andtInbox(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 diffclean).The following ran on
6b2ee8114e281f6e9d9d9fa070f2957277dc4474. That is the same commit with the same treedb4bcdb2…, before its header was shortened to 72 characters:bun run typecheck(tsc --noEmitover the platform's frontend, backend and tests, 6 GiB heap as in CI): passed, no diagnostics.bunx oxlint --type-awareon the two changed test files: clean.oxfmt --checkon the changed files: clean (Markdown is outside oxfmt's patterns).bun run lint:manualandbun run lint:conflicts(repository root): passed.Not tested
bun run --filter @tale/platform test:ui) runs in the merge queue; this PR runs only the touched test files.