Skip to content

fix(platform): keep cleared and typed values in task history - #3813

Merged
yannickmonney merged 7 commits into
mainfrom
fix/task-history-field-values
Sep 29, 2026
Merged

yannickmonney merged 7 commits into
mainfrom
fix/task-history-field-values

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Task history now reads each stored value as the field it changed. A cleared field names its absence instead of repeating the old value, and text that a person typed stays exactly as typed.

What was wrong

What changed

  • TASK_ACTIVITY_FIELD in app/features/tasks/lib/display.ts states, per stored action, what its values are:
    • statuses (created, status.changed) and priorities read as words;
    • assignee and reviewer read by name, dates as dates, repeat rules as sentences, refusal codes as phrases;
    • everything else (title, description, label and file names, task keys, unknown actions) is shown exactly as stored.
  • Each nullable field names its empty side. Existing words are reused (No priority, Unassigned, No reviewer). New tasks.activity.empty.* words cover dates, description, labels and attachments in en, de and fr. de-CH needs no override (no ß).
  • An end a row never recorded is not treated as cleared, and nothing is invented for it. For the two writers that leave the empty side out (assignee, repeat), the table marks absence as empty.
  • Edge rows read the way the board reads the data:
    • a row empty on both ends (the assign door writes one when an unassigned task is unassigned again) names no change;
    • a stored day no Date can hold reads as no date;
    • the retired claim door's claimed rows name the member.
  • New guard app/features/tasks/lib/display.test.ts walks the task writers. It fails when an action they record has no label, or stores a value without a declared field kind, so a new action cannot quietly render as text.
  • TaskTimelineEntry switches on the field kind. The task dialog's Activity and the task page's conversation share it, so both are fixed.
  • No backend or data change: the stored rows were already correct.
  • Docs: one paragraph in docs/{en,de,fr}/platform/projects/tasks.md.
  • Manual: new box TASK-F51 plus a reference/automation.md row. Main's feat(platform): let members create tasks and work their own #3810 took TASK-F50. The suite's Cost is 93 after main was merged in, and readme.md's totals are recounted to 982. fix(ui): give filter radios one Tab stop and the arrow keys #3853 adds one accessibility box too, so whichever lands second counts 983.

How it was verified

  • New task-timeline.values.test.tsx, 12 cases (4 per locale). It uses the real en/de/fr catalogs and real date formatting. The door's own JSON (null for an end left out, '' for a cleared one) is projected by the real activity adapter and handed to the timeline in place of its query hooks; the member directory is a fixture.
    • Cases: set / change / clear for due and start dates, assignee, reviewer, description, labels, attachments and priority; each status token as a literal title and label; a priority and a refusal code as a literal title; real status moves and created; rows that never recorded an end; unknown actions; a date no Date can hold; a no-op assignee row; a legacy claim.
    • The first 9 cases fail on fac88dfc2, and all 12 pass here. The fixture days are local noon, so they read the same in every time zone.
  • display.test.ts, 3 cases (the guard). It fails when a declaration is removed, for example dependency.added.
  • Other suites:
    • the existing task-timeline.test.tsx: 8 pass;
    • all app/features/tasks and app/features/home client tests: 64 files, 464 tests pass;
    • app/lib/backend/tasks.test.ts and backend/domains/tasks/service.activity.test.ts: pass;
    • the platform i18n suite: 185 tests pass.
  • Real UI. Local stack: own Postgres 16, backend/main.ts with ROLE=all, vite preview of the production build; loopback only, synthetic organizations.
    • The final runs used a production build of ae45466a0. The maintainer's later merge of main (a653b0e2a) leaves every file these runs exercise byte-identical (git diff --quiet).
    • Rows written through the native POST /api/app/tasks/{id} / assign / status routes render correctly in en, de and fr, both in the board's task dialog and on the task page. For example: due date changed: 10/01/2026 → No due date, fälligkeitsdatum geändert: 01.10.2026 → Kein Fälligkeitsdatum, titre modifié: todo → done, statut modifié: À faire → Terminé.
    • In the actual task dialog, the owner cleared the due date with its ✕ from the keyboard, unassigned through the picker, renamed the task to todo then done, and moved it to Done. A second member had the task page open in German in another session and saw each new line within 1 s without a reload; a reload showed the same lines.
  • oxlint --type-aware --type-check and oxfmt on the changed files, bun run lint:manual, and check-guide.ts on suites/tasks.md (no new findings against origin/main) all pass. The docs locale and structure checks pass: 8 files, 20 tests.

Coordination and scope

Closes #3750
Closes #3751

yannickmonney and others added 2 commits September 29, 2026 10:48
A task's history read every stored value the same way. The editor stores
an empty side as '' when a field is cleared, and the timeline dropped it,
so a cleared due date read as its old date alone. Every value that spelled
a status code was also translated, so a title renamed from `todo` to
`done` read "À faire → Terminé" in French.

TASK_ACTIVITY_FIELD now says how each action's values read: statuses and
priorities as words, people by name, days as dates, repeat rules as
sentences, and titles, descriptions, label and file names exactly as
stored. An empty side names the absence (No due date, Unassigned, No
description, ...), and an end a row never recorded invents nothing. The
assignee and repeat writers leave an empty side out instead of storing
'', which the table says too. New empty-value words ship in en, de and fr.
The task dialog's Activity and the task page's conversation share the
formatter, so both read the same.

Closes #3750
Closes #3751
…d-values

Main's #3810 took TASK-F50 for its member box, so this branch's history box becomes TASK-F51 (suite box and automation register row); the suite's Cost is 93.
Review follow-ups for the task history formatter.

- A row empty on both ends, which the assign door writes when an already
  unassigned task is unassigned, names no change instead of reading
  "Unassigned → Unassigned".
- A stored day no Date can hold reads as no date, as the board reads it,
  instead of leaving the other side alone to read as the new date.
- The retired claim door's rows name the member who claimed the task.
- display.test.ts walks the task writers and fails when an action they
  record has no label, or stores a value without a declared field kind.
- The fixture dates are local noon, so the test reads the same day in
  every time zone.
- The docs no longer claim every change is recorded, and name everything
  that follows the reader's language. The manual box names its date and
  how the second member opens the task.
yannickmonney added a commit that referenced this pull request Sep 29, 2026
…ed-search-recovery

The manual readme counts main's boxes plus this branch's six (989). Three of this branch's new boxes collided with IDs other open PRs add — TASK-F51 (#3813), TASK-B28 (#3881), TASK-B29 (#3908) — so they move to TASK-F52, TASK-B32 and TASK-B33, in the suite, pins.md and the automation register.
…d-values

The manual readme keeps main's totals; its counts are recounted once after the open PRs land.
# Conflicts:
#	services/platform/tests/manual/suites/tasks.md
@yannickmonney

Copy link
Copy Markdown
Contributor Author

Scoped review of exact head 75082a710be1de6c14d9ccf36f875e89ce3408f4: no actionable defect found in the task-history changes. The field semantics map distinguishes cleared values from absent legacy data and keeps status-like user text literal. Both documented fixes are supported by the exercised controls.

Observed local verification: 23 history/guard tests, 50 task adapter/activity/i18n tests, 21 Chromium cases across EN/DE/FR/de-CH, and 31 docs checks pass. Changed-file formatting/lint/types and manual shape/reference checks pass. Browser controls include set/change/clear, literal status tokens, repeat values, unknown legacy actions and a mounted locale switch. Synthetic wire/query/directory data are explicit; the activity writer uses fake SQL. This is not a real PostgreSQL or multi-session realtime replay, whole-root check, or a full visual docs round.

Evidence and limits: /Users/yannick/.codex/notes/tale-1000-additional/review-3813/review.md. Installed Vitest/browser mismatch warning remains. Remote checks are still assessed separately; this scoped review is not a claim that all merge gates have finished. No new audit issue is counted, and no merge or deployment was performed.

@yannickmonney
yannickmonney merged commit de6c991 into main Sep 29, 2026
50 checks passed
@yannickmonney
yannickmonney deleted the fix/task-history-field-values branch September 29, 2026 15:48
yannickmonney added a commit that referenced this pull request Sep 29, 2026
…chived-project-and-parent-moves

The manual readme is recounted on the merged tree (1003 boxes), and the task suite's Cost is 100: main's TASK-F51 (#3813) and this branch's TASK-B29 each merged into a header both sides had set to 99.
yannickmonney added a commit that referenced this pull request Sep 29, 2026
Only two committed frames no longer match the merged code, out of a full
capture of every shot on it. project-task-repeat's Activity now shows the
due date's value before and after the change ("No due date ->
09/29/2026"), as #3813 records it. settings-providers names the provider
without the empty Custom pill the old frame kept. The other frames match
their fresh captures apart from the capture clock, seed order and font
rendering, so they stay as they are.
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(platform): task history translates literal text that matches status codes bug(platform): task history shows the old value when a field is cleared

1 participant