taskchef 5.10.0 → 5.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "description": "Dispatch work from a data-only workspace to visible Codex project tasks.",
5
5
  "author": {
6
6
  "name": "Favo Yang",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "description": "A non-blocking interactive dispatcher for visible Codex tasks.",
5
5
  "license": "MIT",
6
6
  "author": "Favo Yang",
@@ -2,6 +2,7 @@ import {
2
2
  findCurrentTask,
3
3
  KNOWN_TASK_STATUSES,
4
4
  nextDateFilterRefreshDelay,
5
+ notificationTitle,
5
6
  reconcileNotifications,
6
7
  taskStatusLabel,
7
8
  taskWithinDateFilter,
@@ -78,7 +79,7 @@ function notificationToast(notification) {
78
79
  text.type = "button";
79
80
  text.className = "toast-content";
80
81
  const title = document.createElement("strong");
81
- title.textContent = notification.kind === "new" ? "New task" : "Task updated";
82
+ title.textContent = notificationTitle(task, notification.kind);
82
83
  const description = document.createElement("span");
83
84
  description.textContent = `${task.title} · ${taskStatusLabel(task)}`;
84
85
  text.append(title, description);
@@ -21,6 +21,10 @@ export function taskStatusLabel(task) {
21
21
  return task.status === null ? "unresolved" : task.status.replaceAll("_", " ");
22
22
  }
23
23
 
24
+ export function notificationTitle(task, kind) {
25
+ return kind === "new" ? "New task" : `Task ${taskStatusLabel(task)}`;
26
+ }
27
+
24
28
  export function taskWithinDateFilter(task, filter, now = Date.now()) {
25
29
  const windowMs = DATE_WINDOWS_MS.get(filter);
26
30
  if (windowMs === null) return true;