feat: a day of the activity map opens what happened, ticket by ticket

On the project dashboard, a day with activity can be picked on the map:
a side panel lists that day's moves grouped by ticket (each key opens
it), with the time of each, and the project's own (sprints, releases,
members) apart.

The activity feed takes an `after` date (GraphQL, REST), so with
`before` it reads a window such as a day; the MCP's
get_project_activity takes a `day`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 20:42:30 +02:00
parent de9c8a7780
commit d66b1f3ece
25 changed files with 512 additions and 35 deletions

View File

@@ -1,5 +1,7 @@
import { inject, Injectable, Provider } from '@angular/core';
import { inject, Injectable, Provider, signal } from '@angular/core';
import { injectDispatch } from '@ngrx/signals/events';
import { Activity, ActivityGateway } from '@task-stream/web/tracker/domain';
import { describeError } from '../notifications';
import { insightsPageEvents } from '../events/insights.events';
import { InsightsStore } from '../stores/insights.store';
@@ -8,6 +10,7 @@ import { InsightsStore } from '../stores/insights.store';
export class InsightsFacade {
private readonly store = inject(InsightsStore);
private readonly dispatch = injectDispatch(insightsPageEvents);
private readonly activity = inject(ActivityGateway);
readonly insights = this.store.insights;
/** False until the first load: show skeletons, not empty states. */
@@ -21,6 +24,28 @@ export class InsightsFacade {
open(projectId: string, since: string | null = null): void {
this.dispatch.opened({ projectId, since });
}
/** The day picked on the activity map: what happened then. */
readonly day = signal<{
day: string;
entries: Activity[] | null;
error: string | null;
} | null>(null);
/** Reads what happened that day (`YYYY-MM-DD`) into `day`. */
openDay(projectId: string, day: string): void {
this.day.set({ day, entries: null, error: null });
this.activity.onDay(projectId, day).subscribe({
next: (entries) => {
if (this.day()?.day === day)
this.day.set({ day, entries, error: null });
},
error: (error) => {
if (this.day()?.day === day)
this.day.set({ day, entries: [], error: describeError(error) });
},
});
}
}
/** Store + facade of the dashboard, for its route component. */