feat: dashboard maps the activity, follows a ticket's way and the proposals

Three more blocks on the project dashboard, also by REST, GraphQL and
MCP:
- Activity: what moved each day of the last 12 weeks, in a heatmap,
  with the busiest weekday and the longest lull.
- A ticket's way: for the tickets done in the last 90 days, where the
  time from created to done went, status by status (waiting included),
  and how much of it was work (flow efficiency).
- The public's proposals: received, waiting, under way, done and
  discarded, and the most voted still unanswered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 09:29:38 +02:00
parent 9ccc3b5967
commit 1101b6e926
24 changed files with 1417 additions and 73 deletions

View File

@@ -2059,6 +2059,28 @@ export type ProjectInsightsQuery = {
none: number;
counts: Array<{ value: string; count: number }>;
}>;
heatmap: Array<{ day: string; count: number }>;
journey: {
samples: number;
leadDays: number | null;
flowEfficiency: number | null;
steps: Array<{ status: string; days: number; share: number }>;
};
proposals: {
received: number;
receivedLately: number;
waiting: number;
underWay: number;
done: number;
discarded: number;
topWaiting: Array<{
id: string;
key: string;
title: string;
votes: number;
days: number;
}>;
} | null;
};
};
};
@@ -12397,6 +12419,127 @@ export const ProjectInsightsDocument = {
],
},
},
{
kind: 'Field',
name: { kind: 'Name', value: 'heatmap' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'day' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'count' },
},
],
},
},
{
kind: 'Field',
name: { kind: 'Name', value: 'journey' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'samples' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'leadDays' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'flowEfficiency' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'steps' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'status' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'days' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'share' },
},
],
},
},
],
},
},
{
kind: 'Field',
name: { kind: 'Name', value: 'proposals' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'received' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'receivedLately' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'waiting' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'underWay' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'done' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'discarded' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'topWaiting' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'id' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'key' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'title' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'votes' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'days' },
},
],
},
},
],
},
},
],
},
},