Skip to content
Merged
2 changes: 2 additions & 0 deletions docs/de/platform/projects/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Erwähnungen in der Beschreibung der Aufgabe wirken beim Speichern genauso: Die

Nutze **Teilaufgaben** für Ergebnisse, die sich einzeln prüfen lassen. Eine Teilaufgabe nennt oben in ihren Details die übergeordnete Aufgabe (**Teil von …**); klicke darauf, um zu ihr zurückzukehren. Solange Teilaufgaben offen sind, lässt sich die übergeordnete Aufgabe nicht abschließen. Unter **Abhängigkeiten** siehst du, welche Aufgaben diese Aufgabe blockieren und welche sie selbst blockiert. Kreisförmige Abhängigkeiten sind nicht zulässig.

Änderst du ein Feld, zeigt die **Aktivität** der Aufgabe seinen Wert davor und danach. Leerst du ein Feld, steht dort, was übrig bleibt, etwa **Kein Fälligkeitsdatum** oder **Nicht zugewiesen**, und nicht bloß der alte Wert. Titel, Beschreibungen, Labels und Dateinamen erscheinen genau so, wie sie geschrieben wurden, auch wenn der Text einem Statusnamen wie `done` entspricht. Status, Prioritäten, Datumsangaben und die Angaben für ein leeres Feld erscheinen in deiner Sprache.

## Wiederkehrende Aufgaben einrichten

Kommt dieselbe Arbeit regelmäßig wieder, etwa ein wöchentlicher Statusbericht, gib der Aufgabe eine Wiederholung. Jedes Mal, wenn du sie abschließt, steht die nächste Aufgabe in **Zu erledigen** bereit, fällig am nächsten Tag, den die Wiederholung vorsieht.
Expand Down
2 changes: 2 additions & 0 deletions docs/en/platform/projects/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Mentions in the task description work the same way when you save the task: the p

Use **Subtasks** to split work that has separately checkable results. A subtask names its parent at the top of its details (**Part of …**); click it to go back up. A parent task cannot close while its subtasks remain open. **Dependencies** shows which tasks block this task and which it blocks; circular dependencies are refused.

When you change a field, the task's **Activity** shows its value before and after. A field you clear shows what is left, such as **No due date** or **Unassigned**, rather than its old value alone. Titles, descriptions, labels, and file names appear exactly as they were written, even when the text is a status name such as `done`. Statuses, priorities, dates, and the words for an empty field appear in your language.

## Repeat a task

Give a task a repeat when the same work comes back on a schedule, such as a weekly status report. Each time the task closes, the next one appears in **To do**, due on the next day the repeat names.
Expand Down
2 changes: 2 additions & 0 deletions docs/fr/platform/projects/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Les mentions dans la description de la tâche agissent de la même façon quand

Utilise **Sous-tâches** pour séparer des résultats vérifiables indépendamment. Une sous-tâche nomme sa tâche parente en haut de ses détails (**Partie de …**) ; clique dessus pour y remonter. Une tâche parente ne peut pas être clôturée tant que ses sous-tâches restent ouvertes. **Dépendances** indique ce qui bloque la tâche et ce qu’elle bloque. Les dépendances circulaires sont refusées.

Quand tu modifies un champ, l’**Activité** de la tâche affiche sa valeur d’avant et celle d’après. Un champ que tu vides indique ce qui reste, par exemple **Aucune échéance** ou **Non assigné**, au lieu de répéter seulement l’ancienne valeur. Les titres, descriptions, étiquettes et noms de fichiers apparaissent exactement tels qu’ils ont été saisis, même quand le texte correspond à un nom de statut comme `done`. Les statuts, les priorités, les dates et les mentions d’un champ vide s’affichent dans ta langue.

## Rendre une tâche récurrente

Si le même travail revient régulièrement, comme un point d’avancement hebdomadaire, rends la tâche récurrente. Chaque fois que tu la clôtures, la tâche suivante apparaît dans **À faire**, avec pour échéance le prochain jour prévu par la répétition.
Expand Down
92 changes: 49 additions & 43 deletions services/platform/app/features/tasks/components/task-timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { parseTaskRepeat, type TaskRepeat } from '@/lib/shared/task-repeat';
import { useTaskActivity, useTaskAgentRuns } from '../hooks/queries';
import { useActorDirectory } from '../hooks/use-actor-directory';
import {
TASK_ACTIVITY_FIELD,
TASK_ACTIVITY_LABEL_KEY,
TASK_PRIORITY_LABEL_KEY,
TASK_RUN_REFUSAL_LABEL_KEY,
Expand Down Expand Up @@ -181,56 +182,61 @@ export function TaskTimelineEntry({
const displayName = isWorkflowSentinel(entry.actorType, entry.actorId)
? (preview?.name ?? t('timeline.unresolvedWorkflow'))
: actor.name;
// Each value reads as the field the action changed, never by what its text
// spells: a title renamed from `todo` to `done` stays those words.
const field = TASK_ACTIVITY_FIELD[entry.action];
// An empty side is the `''` a cleared field stores, or the end a writer
// leaves out for "nobody" and "does not repeat".
const isEmptySide = (value: string | undefined) =>
value === '' || (value === undefined && field?.absentIsEmpty === true);
const emptyWords = () => {
if (field?.kind === 'repeat') return repeatNever;
return field?.emptyKey ? t(field.emptyKey) : undefined;
};
const formatActivityValue = (
value: string | undefined,
): string | undefined => {
// A repeat change names both rules; a missing end is "Never",
// so setting and stopping a series each read as the change they were.
// A rule keeps when it creates its next task, so a change of that alone
// reads as one too.
if (entry.action === 'repeat.changed') {
if (!value) return repeatNever;
const rule = storedRepeatRule(value);
return rule ? repeatLabel(rule) : undefined;
}
// An empty side names the absence, so setting, changing and clearing
// each read as the change they were.
if (isEmptySide(value)) return emptyWords();
// An end the row never recorded: nothing is invented for it.
if (value === undefined) return undefined;
// `priority.changed` uses the empty string as the "no priority" sentinel;
// map it before the generic empty-string pass-through below would
// otherwise drop the cleared case.
if (entry.action === 'priority.changed') {
const key = TASK_PRIORITY_LABEL_KEY[value];
return key ? t(key) : value;
}
if (!value) return undefined;
if (entry.action === 'assignee.changed') {
return resolveAssigneeId(value);
}
if (entry.action === 'reviewer.changed') {
return resolveAssigneeId(value);
}
if (
entry.action === 'startDate.changed' ||
entry.action === 'dueDate.changed'
) {
const parsed = Number(value);
if (Number.isFinite(parsed)) {
return formatDate(new Date(parsed), 'short');
switch (field?.kind) {
case 'status':
return isTaskStatus(value) ? t(`status.${value}`) : value;
case 'priority': {
const key = TASK_PRIORITY_LABEL_KEY[value];
return key ? t(key) : value;
}
return value;
}
if (isTaskStatus(value)) {
return t(`status.${value}`);
}
if (
entry.action === 'agent_run.refused' &&
TASK_RUN_REFUSAL_LABEL_KEY[value]
) {
return t(TASK_RUN_REFUSAL_LABEL_KEY[value]);
case 'person':
return resolveAssigneeId(value);
case 'date': {
const parsed = Number(value);
if (!Number.isFinite(parsed)) return value;
// A stored day no `Date` can hold reads as no date, as the board
// reads it, never as the other side alone.
return formatDate(new Date(parsed), 'short') || emptyWords();
}
case 'repeat': {
// A rule keeps when it creates its next task, so a change of that
// alone reads as one too.
const rule = storedRepeatRule(value);
return rule ? repeatLabel(rule) : undefined;
}
case 'refusal': {
const key = TASK_RUN_REFUSAL_LABEL_KEY[value];
return key ? t(key) : value;
}
default:
// Titles, descriptions, label and file names, task keys: as stored.
return value;
}
return value;
};
const from = formatActivityValue(entry.fromValue);
const to = formatActivityValue(entry.toValue);
// Empty on both sides (an assignee cleared that was already clear) names no
// change, only that the row was written.
const unchanged = isEmptySide(entry.fromValue) && isEmptySide(entry.toValue);
const from = unchanged ? undefined : formatActivityValue(entry.fromValue);
const to = unchanged ? undefined : formatActivityValue(entry.toValue);
const detail = from && to ? `${from} → ${to}` : (to ?? from);

return (
Expand Down
Loading
Loading