8000 Add In play board focus filter by rore · Pull Request #27 · rore/minimap · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ A single running server is shared across both modes and across any number of rep

### Optional Pallium participants

When `MINIMAP_PALLIUM_ENDPOINT` is set to an explicit loopback HTTP origin, such as `http://127.0.0.1:19836`, the visible roadmap board uses one bounded, read-only request per refresh for counts on up to 200 noncompleted board items. Recent and quieter Dormant badges classify attached, nonclosed sessions under Pallium's inclusive 24-hour session last-seen window—not activity on this feature, staffing, ownership, or completion. Older Pallium without split counts leaves classification unavailable, never all-Recent. Completed items have no board-wide badge, but their sessions remain available on demand in the item panel. If the setting is unset, Minimap makes no Pallium requests. Results beyond the 200-item bound and error or unknown states are shown as partial/unavailable, never as zero. Exact-session links remain a separate compatibility opt-in via `MINIMAP_PALLIUM_DASHBOARD_ENDPOINT`.
When `MINIMAP_PALLIUM_ENDPOINT` is set to an explicit loopback HTTP origin, such as `http://127.0.0.1:19836`, the visible roadmap board uses one bounded, read-only request per refresh for counts on up to 200 board items. By default, completed items are omitted; In play includes them only when the status filter permits them. Recent and quieter Dormant badges classify attached, nonclosed sessions under Pallium's inclusive 24-hour session last-seen window—not activity on this feature, staffing, ownership, or completion. Older Pallium without split counts leaves classification unavailable, never all-Recent. Completed items show board badges only in In play; their sessions remain available on demand in the item panel. If the setting is unset, Minimap makes no Pallium requests. Results beyond the 200-item bound and error or unknown states are shown as partial/unavailable, never as zero. Exact-session links remain a separate compatibility opt-in via `MINIMAP_PALLIUM_DASHBOARD_ENDPOINT`.

The detail panel groups sessions by lifecycle and shows session last seen; its observation may differ from the board's earlier refresh. Supported links open existing Pallium association controls. Minimap never detaches associations. Detach does not relabel captured History, but associations do not guarantee a complete historical participation record, access, or coverage.

Expand Down Expand Up @@ -203,7 +203,7 @@ Optional repo-root config:
}
```

`defaultLens` controls grouping only; List/Columns stays independent. An explicit URL grouping, including `lens=board`, wins. Filters default to common planning fields; `filters.fields` adds repo-specific frontmatter fields such as `owner` or `team`. The Milestone and Unfinished quick controls reuse those filters without changing `board.md` order or item status. Metadata owns classification and `board.md` owns one shared order; use a neutral `# Items` group for unrestricted metadata-first prioritization.
`defaultLens` controls grouping only; List/Columns stays independent. An explicit URL grouping, including `lens=board`, wins. Filters default to common planning fields; `filters.fields` adds repo-specific frontmatter fields such as `owner` or `team`. Milestone and Unfinished reuse those filters. In play shows status `in-progress` OR any confirmed attached, nonclosed session, including dormant sessions. It combines with search, metadata filters, and Unfinished using AND; Clear resets it, and `inPlay=1` preserves it in the URL. Without complete participant results, known in-progress items remain visible with an incomplete-results notice. These controls change neither `board.md` order nor item status. Metadata owns classification and `board.md` owns one shared order; use a neutral `# Items` group for unrestricted metadata-first prioritization.

For the file contract — required and optional frontmatter, expected sections, board grouping rules, preservation rules — see [`package/minimap/CONTRACT.md`](package/minimap/CONTRACT.md).

Expand Down
4 changes: 3 additions & 1 deletion package/minimap/CONTRACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ Filters are intentionally curated. Common planning fields (`status`, `priority`,

## Optional live participants

Pallium integration is optional and read-only. Minimap never stores live participants or work-reference associations in roadmap files. With no explicitly configured local Pallium endpoint, normal board, item, and editing behavior makes no Pallium HTTP request. With a configured loopback endpoint, the visible roadmap board uses one bounded request per refresh for counts on up to 200 noncompleted board items. Done, shipped, superseded, cancelled, and canceled items are omitted. Badges mean attached, nonclosed sessions only; they do not signal execution, ownership, or item status. Completed-item session detail remains available on demand in the existing item panel. Overflow, errors, and unknown results must remain visibly partial or unavailable, never be represented as zero. Minimap calls `GET /api/board/participant-counts`; the configured Pallium service receives `POST /relay/work-refs/participant-counts`.
Pallium integration is optional and read-only. Minimap never stores live participants or work-reference associations in roadmap files. With no explicitly configured local Pallium endpoint, normal board, item, and editing behavior makes no Pallium HTTP request. With a configured loopback endpoint, the visible roadmap board uses one bounded request per refresh for counts on up to 200 board items. Done, shipped, superseded, cancelled, and canceled items are omitted by default. In play includes completed candidates only when its status filter permits them, using `GET /api/board/participant-counts?includeCompleted=1`; absent or `0` preserves the default, and other or repeated values are rejected. The configured Pallium service receives the same bounded `POST /relay/work-refs/participant-counts`, never per-card requests. Badges mean attached, nonclosed sessions only; they do not signal execution, ownership, or item status. Completed-item board badges appear only in In play; session detail remains available on demand in the existing item panel. Overflow, errors, and unknown results must remain visibly partial or unavailable, never be represented as zero.

In play matches status `in-progress` OR a confirmed positive total of attached, nonclosed sessions, including dormant sessions. It AND-composes with search, metadata, and Unfinished in every lens and layout, persists as `inPlay=1`, and resets on Clear. Participant refresh rederives visible groups. An `ok` response to `includeCompleted=1` must echo `includeCompleted: true`; an older server that ignores the query leaves results incomplete, not complete zero. Loading, disabled, unsupported, unavailable, or partial observations retain known in-progress matches and show an incomplete-results notice rather than claiming complete zero results. Association does not imply current execution.

Recent and quieter Dormant badges classify those attached sessions using Pallium's lifecycle, not work on this feature or staffing. The upstream `relay-work-ref-counts/v1` response retains `participant_count` and adds `recent_participant_count`, `dormant_participant_count`, `as_of` UTC, and `recent_seconds: 86400`. Recent includes last seen at or after `as_of` minus 86400 seconds; total equals Recent plus Dormant, with origins deduplicated and alias/destination health irrelevant. Minimap validates and projects these fields, never a second cutoff. Legacy total-only responses leave classification unsupported, not all-Recent, and never cause per-card fallback requests. Board and detail are separate observations, not a shared snapshot.

Expand Down
14 changes: 11 additions & 3 deletions package/minimap/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,12 @@ async function handleItemParticipants(request, response, ctx) {
}
}

async function handleBoardParticipantCounts(request, response) {
async function handleBoardParticipantCounts(request, response, ctx) {
const includeCompletedValues = ctx.url.searchParams.getAll("includeCompleted");
if (includeCompletedValues.length > 1 || includeCompletedValues.some((value) => !["0", "1"].includes(value))) {
throw new AppError("includeCompleted must be 0 or 1 and appear at most once.", 400, "bad_request");
}
const includeCompleted = includeCompletedValues[0] === "1";
if (!palliumConfig.configured) {
sendJson(response, 200, { status: "disabled", counts: [], partial: false });
return;
Expand All @@ -454,7 +459,7 @@ async function handleBoardParticipantCounts(request, response) {
const status = String(fullItem?.status || "").trim().toLowerCase();
if (
item?.missing || !fullItem || seen.has(item.id)
|| ["done", "shipped", "superseded", "cancelled", "canceled"].includes(status)
|| (!includeCompleted && ["done", "shipped", "superseded", "cancelled", "canceled"].includes(status))
) continue;
seen.add(item.id);
boardIds.push(item.id);
Expand All @@ -463,7 +468,9 @@ async function handleBoardParticipantCounts(request, response) {
const partial = boardIds.length > 200;
const itemIds = boardIds.slice(0, 200);
if (!itemIds.length) {
if (!response.destroyed) sendJson(response, 200, { status: "ok", counts: [], partial });
if (!response.destroyed) sendJson(response, 200, {
status: "ok", counts: [], partial, ...(includeCompleted ? { includeCompleted: true } : {}),
});
return;
}
const references = await resolveRoadmapItemReferences(repoRoot, workspace.roadmapPath, itemIds);
Expand All @@ -482,6 +489,7 @@ async function handleBoardParticipantCounts(request, response) {
sendJson(response, 200, {
status: result.status, counts, partial,
...(result.status === "ok" ? { asOf: result.asOf, recentSeconds: result.recentSeconds } : {}),
...(result.status === "ok" && includeCompleted ? { includeCompleted: true } : {}),
});
}
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Use existing linked Pallium session controls for explicit association cleanup; M
- Do not infer ownership, activity, acceptance, or completion from an association.
- If the tools are missing or unavailable, proceed without Pallium. Do not use a shell or HTTP substitute and do not install anything.

The optional Minimap participant panel is read-only. With a validated loopback `MINIMAP_PALLIUM_ENDPOINT`, each visible roadmap board uses one bounded count request per refresh for up to 200 noncompleted board items: Minimap `GET /api/board/participant-counts` calls Pallium `POST /relay/work-refs/participant-counts`. Done, shipped, superseded, cancelled, and canceled items are omitted from board counts; their session detail remains available on demand in the existing item panel. A badge counts attached, nonclosed sessions only—not execution, ownership, or roadmap status. Overflow and error/unknown outcomes must remain partial or unavailable, never zero. When the endpoint is disabled, Minimap makes no Pallium HTTP requests. Exact-session links separately require an explicitly configured, reviewed compatible `MINIMAP_PALLIUM_DASHBOARD_ENDPOINT`; without it, names remain plain text. These panel settings do not control whether an agent may use already-available Pallium MCP tools.
The optional Minimap participant panel is read-only. With a validated loopback `MINIMAP_PALLIUM_ENDPOINT`, each visible roadmap board uses one bounded count request per refresh for up to 200 board items: Minimap `GET /api/board/participant-counts` calls Pallium `POST /relay/work-refs/participant-counts`. Done, shipped, superseded, cancelled, and canceled items are omitted by default. In play adds completed candidates only when its status filter permits them, using `?includeCompleted=1`; absent or `0` keeps the default, and invalid or repeated values are rejected. Successful completed-inclusive responses echo `includeCompleted: true`; a server ignoring the flag leaves results incomplete and needs an update. Completed-item board badges appear only in In play; session detail remains available on demand in the existing item panel. In play means status `in-progress` OR any confirmed attached, nonclosed session, including dormant sessions—not working right now. Overflow and error/unknown outcomes remain visibly incomplete, never zero; in-progress matches still appear. When the endpoint is disabled, Minimap makes no Pallium HTTP requests. Exact-session links separately require an explicitly configured, reviewed compatible `MINIMAP_PALLIUM_DASHBOARD_ENDPOINT`; without it, names remain plain text. These panel settings do not control whether an agent may use already-available Pallium MCP tools.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ When editing items:

## Scope

Use `scope.md` for short current-focus narrative and near-term direction. Item state belongs in item files, not in scope. The Milestone and Unfinished quick-focus controls reuse the existing filters; they do not edit item metadata or reorder the canonical board.
Use `scope.md` for short current-focus narrative and near-term direction. Item state belongs in item files, not in scope. Milestone and Unfinished reuse the existing filters. In play matches status `in-progress` OR any confirmed attached, nonclosed session, including dormant sessions; it AND-composes with search, metadata, and Unfinished in every lens and layout. Clear resets it and `inPlay=1` preserves it in the URL. Unknown or partial participant results show an incomplete-results notice while retaining known in-progress matches. These controls do not edit item metadata or reorder the canonical board.

## Manual Metadata-First Migration

Expand Down
14 changes: 11 additions & 3 deletions package/minimap/skills/minimap-roadmap/runtime/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,12 @@ async function handleItemParticipants(request, response, ctx) {
}
}

async function handleBoardParticipantCounts(request, response) {
async function handleBoardParticipantCounts(request, response, ctx) {
const includeCompletedValues = ctx.url.searchParams.getAll("includeCompleted");
if (includeCompletedValues.length > 1 || includeCompletedValues.some((value) => !["0", "1"].includes(value))) {
throw new AppError("includeCompleted must be 0 or 1 and appear at most once.", 400, "bad_request");
}
const includeCompleted = includeCompletedValues[0] === "1";
if (!palliumConfig.configured) {
sendJson(response, 200, { status: "disabled", counts: [], partial: false });
return;
Expand All @@ -454,7 +459,7 @@ async function handleBoardParticipantCounts(request, response) {
const status = String(fullItem?.status || "").trim().toLowerCase();
if (
item?.missing || !fullItem || seen.has(item.id)
|| ["done", "shipped", "superseded", "cancelled", "canceled"].includes(status)
|| (!includeCompleted && ["done", "shipped", "superseded", "cancelled", "canceled"].includes(status))
) continue;
seen.add(item.id);
boardIds.push(item.id);
Expand All @@ -463,7 +468,9 @@ async function handleBoardParticipantCounts(request, response) {
const partial = boardIds.length > 200;
const itemIds = boardIds.slice(0, 200);
if (!itemIds.length) {
if (!response.destroyed) sendJson(response, 200, { status: "ok", counts: [], partial });
if (!response.destroyed) sendJson(response, 200, {
status: "ok", counts: [], partial, ...(includeCompleted ? { includeCompleted: true } : {}),
});
return;
}
const references = await resolveRoadmapItemReferences(repoRoot, workspace.roadmapPath, itemIds);
Expand All @@ -482,6 +489,7 @@ async function handleBoardParticipantCounts(request, response) {
sendJson(response, 200, {
status: result.status, counts, partial,
...(result.status === "ok" ? { asOf: result.asOf, recentSeconds: result.recentSeconds } : {}),
...(result.status === "ok" && includeCompleted ? { includeCompleted: true } : {}),
});
}
} catch (error) {
Expand Down
4 changes: 3 additions & 1 deletion package/minimap/skills/minimap-roadmap/runtime/ui/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export function createApi({ fetch: fetchImpl, getRepo } = {}) {
reorderLensGroup: (field, payload) => postJson(`/api/lenses/${id(field)}/order`, payload),
saveScope: (scopeText) => postJson("/api/scope", { scopeText }),
readItem: (itemId, options = {}) => request(`/api/items/${id(itemId)}`, options),
readBoardParticipantCounts: (options = {}) => request("/api/board/participant-counts", options),
readBoardParticipantCounts: ({ includeCompleted = false, ...options } = {}) => request(
`/api/board/participant-counts${includeCompleted === true ? "?includeCompleted=1" : ""}`, options,
),
readItemParticipants: (itemId, options = {}) => request(`/api/items/${id(itemId)}/participants`, options),
saveItem: (itemId, payload) => postJson(`/api/items/${id(itemId)}`, payload),

Expand Down
Loading
Loading
0