Skip to content

Commit c92fd01

Browse files
committed
Merge active-status task forest
2 parents c415358 + a55ef8f commit c92fd01

6 files changed

Lines changed: 334 additions & 36 deletions

File tree

desktop/garyx-desktop/src/renderer/src/app-shell/components/TaskForestConsole.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ const STATUS_ORDER: DesktopTaskStatus[] = [
6767
"done",
6868
];
6969

70+
const FOREST_CHIP_STATUS_ORDER: DesktopTaskStatus[] = [
71+
"in_progress",
72+
"in_review",
73+
];
74+
7075
const REFRESH_INTERVAL_MS = 5000;
7176
const CULLING_NODE_THRESHOLD = 120;
7277
const CULLING_OVERSCAN_PX = 360;
@@ -726,7 +731,7 @@ export function TaskForestConsole({
726731
<span>{t("Task Forest")}</span>
727732
</div>
728733
<div className="task-forest-status-chips">
729-
{STATUS_ORDER.map((status) => {
734+
{FOREST_CHIP_STATUS_ORDER.map((status) => {
730735
const meta = STATUS_META[status];
731736
return (
732737
<button
@@ -824,7 +829,7 @@ export function TaskForestConsole({
824829
) : !tasks.length ? (
825830
<div className="task-forest-state">
826831
{pinnedThreadIds.length
827-
? t("Pinned conversations with tasks will appear here.")
832+
? t("No active tasks right now.")
828833
: t("Pin conversations to add them to the operation room.")}
829834
</div>
830835
) : null}

desktop/garyx-desktop/src/shared/contracts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export interface DesktopTaskForestPage {
294294
skippedPinnedThreadIds: string[];
295295
}
296296

297-
export type DesktopTaskForestScope = 'all';
297+
export type DesktopTaskForestScope = 'pinned' | 'all';
298298

299299
export interface DesktopDreamSpan {
300300
spanId: string;

docs/design/task-1167-rooted-task-forest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ is rendered as a root node using thread metadata, then the gateway attaches
99
tasks whose `TaskSource.thread_id` points at that conversation and recursively
1010
attaches task children below them. Unrelated tasks are not returned.
1111

12+
Follow-up: Task 1216 keeps the pinned-root contract but changes the default task
13+
node set to active statuses only. See
14+
`docs/design/task-1216-active-status-task-forest.md` for the status filter and
15+
reparenting rules.
16+
1217
Keep the existing canvas, tidy-tree layout, cycle defense, node cards, node
1318
selection, thread detail panel, panning, zooming, minimap, and visual styling.
1419
This change only replaces the task set selection contract and wires the forest
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Task 1216 Active-Status Task Forest
2+
3+
## Goal
4+
5+
Keep the pinned-conversation task forest as the operation-room view, but only
6+
render task nodes whose status is `in_progress` or `in_review`. Historical
7+
`done` tasks and not-yet-started `todo` tasks stay out of the default forest.
8+
9+
`scope=all` remains the diagnostic escape hatch for the complete task map.
10+
11+
## Filtering Contract
12+
13+
The default forest endpoint still starts from pinned conversation roots and
14+
uses the existing recursive task subtree walk. The status filter is applied
15+
after the recursive walk has reached the subtree, not before it. This preserves
16+
active descendants below inactive intermediate tasks.
17+
18+
Thread root nodes are not task status filtered. If a pinned conversation has a
19+
task subtree but no retained active task, the response may contain only the
20+
thread root for that pinned conversation.
21+
22+
## Reparenting Contract
23+
24+
Filtering inactive task nodes can remove an intermediate parent. Every retained
25+
task is reparented as follows:
26+
27+
1. Follow the original parent chain using `parent_task_number`, with legacy
28+
`source_task_id` and `source_task_thread_id` as fallbacks.
29+
2. The first ancestor in the same pinned subtree whose status is
30+
`in_progress` or `in_review` becomes the retained task's parent.
31+
3. If no retained ancestor exists before the pinned conversation root, the task
32+
attaches directly to that thread root.
33+
4. The returned `parent_node_id`, `parent_thread_id`, and `parent_task_number`
34+
describe this rendered parent, not the filtered-out original parent.
35+
36+
The resulting graph stays connected from each pinned conversation root to the
37+
active task nodes while skipping inactive history.

0 commit comments

Comments
 (0)