feat: formatted text, a list view, ticket details, public proposals and votes

Formatted text
- Descriptions, comments, replies and release notes render Markdown,
  sanitised with DOMPurify (tested against scripts, handlers and
  javascript: links). A pasted image is uploaded and written as
  ![name](attachment:<id>); the web fetches it with the reader's session,
  so it works on private projects. Every text box has a preview. The
  attachment upload now answers its attachmentId.

List view
- /p/:key/list: every ticket as rows, sortable by any column, filtered by
  text, open/closed, type, priority and assignee; status, priority and
  assignee change in place; bulk edit (the backlog's bar, now shared).

Ticket details
- Reactions on comments (GitHub's eight), for members and viewers.
- Duplicate a ticket: what it says, not where it stands.
- blockedBy: open tickets it waits for (BLOCKS / DEPENDS_ON), worked out
  when reading with one query per board or page; shown on cards, list
  rows and the ticket.

Public proposals
- A public project can take bug reports and ideas from anyone
  (acceptsProposals): POST /api/explore/projects/{project}/proposals and
  the form at /p/:key/proponer. They become tickets labelled «propuesta»,
  opened by TaskStream; a honeypot field and 5 per address every 15
  minutes keep spam out. No e-mail is asked: it would be public.

Votes
- Anyone signed in votes on a public project's tickets, members on a
  private one (voteIssue, PUT/DELETE /api/issues/{issue}/vote): votes and
  voted on each ticket, buttons on the ticket and the roadmap, a column
  in the list. The showcase carries votes and the open proposals.

MCP: vote_issue, duplicate_issue, react_to_comment; listings show
blockers and votes. Docs, Word and PDF updated; chat notifications
(Discord, Slack, Telegram) noted for later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 21:36:11 +02:00
parent 298766ad1a
commit f2001aca88
116 changed files with 17997 additions and 650 deletions

View File

@@ -31,6 +31,18 @@ export class CommentResolver {
return this.comments.edit(me.id, commentId, body);
}
@Mutation(() => CommandResultGql, {
description: 'React (👍 👎 😄 🎉 😕 ❤️ 🚀 👀) or take it back (on: false)',
})
reactToComment(
@CurrentUser() me: User,
@Args('commentId', { type: () => ID }) commentId: string,
@Args('emoji') emoji: string,
@Args('on') on: boolean,
) {
return this.comments.react(me.id, commentId, emoji, on);
}
@Mutation(() => CommandResultGql, { description: 'Author or project admin' })
deleteComment(
@CurrentUser() me: User,

View File

@@ -74,6 +74,14 @@ export class UpdateProjectInput {
@IsOptional()
@IsBoolean()
isPublic?: boolean;
@Field({
nullable: true,
description:
'Take bug reports and ideas from anyone through the public form (while public)',
})
@IsOptional()
@IsBoolean()
acceptsProposals?: boolean;
}
@InputType()

View File

@@ -14,6 +14,7 @@ import {
OptionalAuth,
} from '@task-stream/api/identity/presenters';
import {
BlockersService,
CommentsService,
IssuesService,
WorkflowsService,
@@ -44,6 +45,7 @@ import {
EpicGql,
IssueGql,
IssuePageGql,
IssueParentGql,
} from './types';
@Resolver(() => IssueGql)
@@ -52,6 +54,7 @@ export class IssueResolver {
private readonly issuesService: IssuesService,
private readonly commentsService: CommentsService,
private readonly workflows: WorkflowsService,
private readonly blockers: BlockersService,
) {}
@OptionalAuth()
@@ -154,6 +157,22 @@ export class IssueResolver {
return this.workflows.allowedTransitions(issue);
}
@ResolveField(() => [IssueParentGql], {
description:
'Open tickets it waits for: the ones that block it and the ones it depends on',
})
blockedBy(@Parent() issue: IssueReadModel) {
return this.blockers.blockedBy(issue);
}
@ResolveField(() => Boolean, { description: 'Whether I voted for it' })
voted(
@CurrentUser() me: User | undefined,
@Parent() issue: IssueReadModel,
): boolean {
return !!me && issue.voterIds.includes(me.id);
}
@ResolveField(() => [IssueGql], { description: 'Linked tickets I can see' })
linkedIssues(
@CurrentUser() me: User | undefined,
@@ -307,6 +326,29 @@ export class IssueResolver {
return this.issuesService.trash(me.id, issueId);
}
@Mutation(() => CommandResultGql, {
description:
'A new ticket like this one: what it says, not where it stands (the key comes in the result)',
})
duplicateIssue(
@CurrentUser() me: User,
@Args('issueId', { type: () => ID }) issueId: string,
) {
return this.issuesService.duplicate(me.id, issueId);
}
@Mutation(() => CommandResultGql, {
description:
'Vote for a ticket (on) or take the vote back: anyone signed in on a public project, members on a private one',
})
voteIssue(
@CurrentUser() me: User,
@Args('issueId', { type: () => ID }) issueId: string,
@Args('on') on: boolean,
) {
return this.issuesService.vote(me.id, issueId, on);
}
@Mutation(() => CommandResultGql, { description: 'Back from the trash' })
restoreIssue(
@CurrentUser() me: User,

View File

@@ -102,6 +102,10 @@ export class ProjectGql {
@Field(() => String, { nullable: true }) description!: string | null;
@Field({ description: 'Anyone can read it, also without signing in' })
isPublic!: boolean;
@Field({
description: 'Takes bug reports and ideas from anyone (while public)',
})
acceptsProposals!: boolean;
@Field(() => UserRefGql) owner!: UserRefGql;
@Field(() => [ProjectMemberGql]) members!: ProjectMemberGql[];
@Field() createdAt!: string;
@@ -374,6 +378,8 @@ export class IssueGql {
})
devLinks!: DevLinkGql[];
@Field(() => Int) commentCount!: number;
@Field(() => Int, { description: 'How many want it done' })
votes!: number;
@Field() createdAt!: string;
@Field() updatedAt!: string;
@Field(() => Int) version!: number;
@@ -440,6 +446,13 @@ export class BoardColumnGql {
@Field(() => Int) total!: number;
}
@ObjectType('CommentReaction', { description: 'One emoji on a comment' })
export class CommentReactionGql {
@Field() emoji!: string;
@Field(() => [UserRefGql], { description: 'Who chose it' })
users!: UserRefGql[];
}
@ObjectType('Comment')
export class CommentGql {
@Field(() => ID) id!: string;
@@ -456,6 +469,10 @@ export class CommentGql {
description: 'Deleted, but kept (without its text) while it has replies',
})
deleted!: boolean;
@Field(() => [CommentReactionGql], {
description: 'In the order they are offered; only the ones somebody chose',
})
reactions!: CommentReactionGql[];
@Field() createdAt!: string;
@Field(() => String, { nullable: true }) editedAt!: string | null;
@Field(() => Int) version!: number;