@agentprojectcontext/apx 1.75.0 → 1.76.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.
@@ -18,7 +18,7 @@
18
18
  <link rel="apple-touch-icon" href="/favicon/dark/apple-touch-icon.png" media="(prefers-color-scheme: dark)" />
19
19
  <link rel="manifest" href="/favicon/white/site.webmanifest" media="(prefers-color-scheme: light)" />
20
20
  <link rel="manifest" href="/favicon/dark/site.webmanifest" media="(prefers-color-scheme: dark)" />
21
- <script type="module" crossorigin src="/assets/index-CXeqTvfy.js"></script>
21
+ <script type="module" crossorigin src="/assets/index-Bjlk9ttU.js"></script>
22
22
  <link rel="stylesheet" crossorigin href="/assets/index-CQ5kyFej.css">
23
23
  </head>
24
24
  <body class="bg-background text-foreground antialiased">
@@ -426,6 +426,7 @@ export const en = {
426
426
  },
427
427
 
428
428
  global_tasks: {
429
+ any_status: "any status",
429
430
  title: "Tasks (all projects)",
430
431
  subtitle: "Aggregated tasks from all registered projects.",
431
432
  empty: "No tasks.",
@@ -427,6 +427,7 @@ export const es = {
427
427
  },
428
428
 
429
429
  global_tasks: {
430
+ any_status: "cualquier estado",
430
431
  title: "Tasks (todos los proyectos)",
431
432
  subtitle: "Tareas agregadas de todos los proyectos registrados.",
432
433
  empty: "Sin tasks.",
@@ -25,8 +25,12 @@ export const Tasks = {
25
25
  // (globalPage). Each returns the requested window plus the full total.
26
26
  listPage: (pid: string, { state, limit, offset }: { state: TaskEntry["state"] | "all"; limit: number; offset: number }) =>
27
27
  http.get<unknown>(`/projects/${pid}/tasks?state=${state}&limit=${limit}&offset=${offset}`).then((b) => unwrapPage<TaskEntry>(b)),
28
- globalPage: ({ state, limit, offset }: { state: TaskEntry["state"] | "all"; limit: number; offset: number }) =>
29
- http.get<unknown>(`/tasks?state=${state}&limit=${limit}&offset=${offset}`).then((b) => unwrapPage<GlobalTaskEntry>(b)),
28
+ globalPage: ({ state, limit, offset, status }: { state: TaskEntry["state"] | "all"; limit: number; offset: number; status?: TaskStatus | "" }) =>
29
+ http
30
+ .get<unknown>(
31
+ `/tasks?state=${state}&limit=${limit}&offset=${offset}` + (status ? `&status=${status}` : ""),
32
+ )
33
+ .then((b) => unwrapPage<GlobalTaskEntry>(b)),
30
34
  get: (pid: string, id: string) => http.get<TaskEntry>(`/projects/${pid}/tasks/${id}`),
31
35
  add: (pid: string, body: Partial<TaskEntry>) =>
32
36
  http.post<TaskEntry>(`/projects/${pid}/tasks`, body),
@@ -1,6 +1,7 @@
1
1
  import { useState } from "react";
2
2
  import { useNavigate } from "react-router-dom";
3
3
  import { Tasks } from "../../lib/api";
4
+ import type { TaskStatus } from "../../types/daemon";
4
5
  import { Section } from "../../components/Section";
5
6
  import { PagedList, usePagedQuery } from "../../components/Pager";
6
7
  import { Badge, Button, Empty, Loading } from "../../components/ui";
@@ -10,10 +11,14 @@ import { t } from "../../i18n";
10
11
  export function GlobalTasksTab() {
11
12
  const navigate = useNavigate();
12
13
  const [state, setState] = useState<"open" | "done" | "dropped" | "all">("open");
14
+ // Workflow sub-status is a different question from state: "what is blocked
15
+ // right now" is not "what is open". Only meaningful for open tasks.
16
+ const [status, setStatus] = useState<TaskStatus | "">("");
17
+ const effectiveStatus = state === "open" ? status : "";
13
18
  const paged = usePagedQuery({
14
- key: `/tasks?state=${state}`,
15
- fetchPage: (limit, offset) => Tasks.globalPage({ state, limit, offset }),
16
- resetKey: state,
19
+ key: `/tasks?state=${state}&status=${effectiveStatus}`,
20
+ fetchPage: (limit, offset) => Tasks.globalPage({ state, limit, offset, status: effectiveStatus }),
21
+ resetKey: `${state}|${effectiveStatus}`,
17
22
  });
18
23
 
19
24
  return (
@@ -29,6 +34,19 @@ export function GlobalTasksTab() {
29
34
  </div>
30
35
  }
31
36
  >
37
+ {state === "open" ? (
38
+ <div className="mb-3 flex flex-wrap gap-1">
39
+ <Button size="sm" variant={status === "" ? "primary" : "ghost"} onClick={() => setStatus("")}>
40
+ {t("project.global_tasks.any_status")}
41
+ </Button>
42
+ {(["pending", "running", "in_review", "blocked"] as const).map((s) => (
43
+ <Button key={s} size="sm" variant={status === s ? "primary" : "ghost"} onClick={() => setStatus(s)}>
44
+ {s.replace("_", " ")}
45
+ </Button>
46
+ ))}
47
+ </div>
48
+ ) : null}
49
+
32
50
  {paged.isLoading && <Loading />}
33
51
  {!paged.isLoading && paged.total === 0 && <Empty>{t("project.global_tasks.empty")}</Empty>}
34
52
  <PagedList paged={paged} fullHeight>