feat: a home page with life

Greeting and summary of the day, the coming week, the latest across my
projects, who is online now, the week in numbers (mine and the team's,
with a streak), sprints under way, «Retomar», project cards with their
activity, what to pick up when nothing is mine and first steps for
newcomers. REST (GET /api/me/home), GraphQL (myHome) and MCP
(get_my_week).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 19:20:41 +02:00
parent affce615a7
commit 0946e9517d
57 changed files with 3728 additions and 53 deletions

View File

@@ -1161,3 +1161,88 @@ export class PortfolioProjectDto {
epics!: EpicDto[];
@ApiProperty() updatedAt!: string;
}
export class AgendaItemDto {
@ApiProperty({ format: 'date' }) day!: string;
@ApiProperty({ enum: ['ISSUE', 'SPRINT_END', 'RELEASE'] }) kind!: string;
@ApiProperty() projectKey!: string;
@ApiProperty() title!: string;
@ApiProperty({ type: String, nullable: true }) issueKey!: string | null;
}
export class TeamWeekDto {
@ApiProperty({
type: [Number],
description: 'Finished per day, last 14, oldest first',
})
perDay!: number[];
@ApiProperty() thisWeek!: number;
@ApiProperty() lastWeek!: number;
}
export class MyWeekDto {
@ApiProperty() thisWeek!: number;
@ApiProperty() lastWeek!: number;
@ApiProperty({ description: 'Days in a row with something finished' })
streak!: number;
}
export class HomeSprintDto {
@ApiProperty() projectKey!: string;
@ApiProperty() projectName!: string;
@ApiProperty({ type: SprintPulseDto }) sprint!: SprintPulseDto;
}
export class HomeSprintBriefDto {
@ApiProperty() name!: string;
@ApiProperty() percent!: number;
@ApiProperty() behind!: boolean;
}
export class HomeProjectDto {
@ApiProperty({ format: 'uuid' }) projectId!: string;
@ApiProperty() open!: number;
@ApiProperty() overdue!: number;
@ApiProperty({
type: [Number],
description: 'Activity per day, last 14, oldest first',
})
activity!: number[];
@ApiProperty({ type: HomeSprintBriefDto, nullable: true })
sprint!: HomeSprintBriefDto | null;
}
export class SuggestionDto {
@ApiProperty({ enum: ['UNASSIGNED', 'PROPOSALS', 'QA_WAITING'] })
kind!: string;
@ApiProperty() projectKey!: string;
@ApiProperty() count!: number;
}
export class FirstStepsDto {
@ApiProperty() project!: boolean;
@ApiProperty() invited!: boolean;
@ApiProperty() ticket!: boolean;
@ApiProperty() calendar!: boolean;
}
export class OnlineDto {
@ApiProperty({ type: UserRefDto }) user!: UserRefDto;
@ApiProperty() projectKey!: string;
@ApiProperty({ type: String, nullable: true }) issueKey!: string | null;
@ApiProperty({ type: String, nullable: true }) issueTitle!: string | null;
@ApiProperty() editing!: boolean;
@ApiProperty() at!: string;
}
export class HomeDto {
@ApiProperty({ type: [AgendaItemDto] }) agenda!: AgendaItemDto[];
@ApiProperty({ type: [ActivityDto] }) activity!: ActivityDto[];
@ApiProperty({ type: TeamWeekDto }) team!: TeamWeekDto;
@ApiProperty({ type: MyWeekDto }) me!: MyWeekDto;
@ApiProperty({ type: [HomeSprintDto] }) sprints!: HomeSprintDto[];
@ApiProperty({ type: [HomeProjectDto] }) projects!: HomeProjectDto[];
@ApiProperty({ type: [SuggestionDto] }) suggestions!: SuggestionDto[];
@ApiProperty({ type: FirstStepsDto }) firstSteps!: FirstStepsDto;
@ApiProperty({ type: [OnlineDto] }) online!: OnlineDto[];
}