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:
@@ -280,19 +280,36 @@ export class ProjectsResolver {
|
||||
|
||||
@Tool({
|
||||
name: 'get_project_activity',
|
||||
description: 'Latest activity of a project (newest first).',
|
||||
paramsSchema: z.object({ project: projectRef, limit: limit(200, 30) }),
|
||||
description:
|
||||
'Latest activity of a project (newest first), or that of one day (UTC) with day.',
|
||||
paramsSchema: z.object({
|
||||
project: projectRef,
|
||||
limit: limit(200, 30),
|
||||
day: z
|
||||
.string()
|
||||
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
||||
.optional()
|
||||
.describe('YYYY-MM-DD: only what happened that day (UTC)'),
|
||||
}),
|
||||
annotations: READ,
|
||||
})
|
||||
activity(
|
||||
{ project, limit }: { project: string; limit: number },
|
||||
{ project, limit, day }: { project: string; limit: number; day?: string },
|
||||
ctx: McpContext,
|
||||
) {
|
||||
const window = day
|
||||
? {
|
||||
after: `${day}T00:00:00.000Z`,
|
||||
before: new Date(
|
||||
Date.parse(`${day}T00:00:00Z`) + 86_400_000,
|
||||
).toISOString(),
|
||||
}
|
||||
: {};
|
||||
return toolResult(async () =>
|
||||
(
|
||||
await this.api.data(
|
||||
this.api.as(ctx).GET('/api/projects/{project}/activity', {
|
||||
params: { path: { project }, query: { limit } },
|
||||
params: { path: { project }, query: { limit, ...window } },
|
||||
}),
|
||||
)
|
||||
).map((a) => ({
|
||||
|
||||
Reference in New Issue
Block a user