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
; 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:
@@ -21,6 +21,7 @@ import {
|
||||
DeleteCommentDocument,
|
||||
EditCommentDocument,
|
||||
IssueCommentsDocument,
|
||||
ReactToCommentDocument,
|
||||
PublishReleaseDocument,
|
||||
ReleaseBurnupDocument,
|
||||
ReleaseNotesDraftDocument,
|
||||
@@ -52,6 +53,16 @@ export class GraphqlCommentsGateway extends CommentsGateway {
|
||||
.pipe(map((d) => toCommandResult(d.addComment)));
|
||||
}
|
||||
|
||||
react(
|
||||
commentId: string,
|
||||
emoji: string,
|
||||
on: boolean,
|
||||
): Observable<CommandResult> {
|
||||
return this.gql
|
||||
.mutate(ReactToCommentDocument, { commentId, emoji, on })
|
||||
.pipe(map((d) => toCommandResult(d.reactToComment)));
|
||||
}
|
||||
|
||||
edit(commentId: string, body: string): Observable<CommandResult> {
|
||||
return this.gql
|
||||
.mutate(EditCommentDocument, { commentId, body })
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
Issue,
|
||||
IssuePage,
|
||||
IssuesGateway,
|
||||
IssueListFilter,
|
||||
IssueSummary,
|
||||
LinkIssuesInput,
|
||||
MyIssuesFilter,
|
||||
@@ -25,10 +26,12 @@ import {
|
||||
BoardDocument,
|
||||
ChangeIssueStatusDocument,
|
||||
CreateIssueDocument,
|
||||
DuplicateIssueDocument,
|
||||
DueIssuesDocument,
|
||||
EpicsDocument,
|
||||
IssueChildrenDocument,
|
||||
IssueDocument,
|
||||
IssueListDocument,
|
||||
LinkIssuesDocument,
|
||||
MyIssuesDocument,
|
||||
RankIssueDocument,
|
||||
@@ -41,6 +44,7 @@ import {
|
||||
SetIssueReleaseDocument,
|
||||
UnlinkIssuesDocument,
|
||||
UnwatchIssueDocument,
|
||||
VoteIssueDocument,
|
||||
WatchIssueDocument,
|
||||
UpdateChecklistItemDocument,
|
||||
UpdateIssueDocument,
|
||||
@@ -102,6 +106,24 @@ export class GraphqlIssuesGateway extends IssuesGateway {
|
||||
);
|
||||
}
|
||||
|
||||
list(filter: IssueListFilter): Observable<IssuePage> {
|
||||
const { limit, ...criteria } = filter;
|
||||
return this.gql
|
||||
.query(IssueListDocument, {
|
||||
filter: {
|
||||
...criteria,
|
||||
search: criteria.search?.trim() || undefined,
|
||||
} as never,
|
||||
limit,
|
||||
})
|
||||
.pipe(
|
||||
map((d) => ({
|
||||
items: d.issues.items.map(toIssueSummary),
|
||||
total: d.issues.total,
|
||||
})),
|
||||
);
|
||||
}
|
||||
|
||||
search(projectId: string, text: string): Observable<IssueSummary[]> {
|
||||
return this.gql
|
||||
.query(SearchIssuesDocument, { filter: { projectId, search: text } })
|
||||
@@ -114,6 +136,12 @@ export class GraphqlIssuesGateway extends IssuesGateway {
|
||||
.pipe(map((d) => toCommandResult(d.createIssue)));
|
||||
}
|
||||
|
||||
duplicate(issueId: string): Observable<CommandResult> {
|
||||
return this.gql
|
||||
.mutate(DuplicateIssueDocument, { issueId })
|
||||
.pipe(map((d) => toCommandResult(d.duplicateIssue)));
|
||||
}
|
||||
|
||||
update(input: UpdateIssueInput): Observable<CommandResult> {
|
||||
return this.gql
|
||||
.mutate(UpdateIssueDocument, { input: input as never })
|
||||
@@ -147,6 +175,12 @@ export class GraphqlIssuesGateway extends IssuesGateway {
|
||||
.pipe(map((d) => toCommandResult(d.unlinkIssues)));
|
||||
}
|
||||
|
||||
vote(issueId: string, on: boolean): Observable<CommandResult> {
|
||||
return this.gql
|
||||
.mutate(VoteIssueDocument, { issueId, on })
|
||||
.pipe(map((d) => toCommandResult(d.voteIssue)));
|
||||
}
|
||||
|
||||
watch(issueId: string, watching: boolean): Observable<CommandResult> {
|
||||
return watching
|
||||
? this.gql
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
import {
|
||||
Attachment,
|
||||
AttachmentsGateway,
|
||||
AttachmentUploaded,
|
||||
CommandResult,
|
||||
} from '@task-stream/web/tracker/domain';
|
||||
import { from, Observable, switchMap } from 'rxjs';
|
||||
@@ -25,12 +26,14 @@ export class HttpAttachmentsGateway extends AttachmentsGateway {
|
||||
issueId: string,
|
||||
file: File,
|
||||
commentId?: string | null,
|
||||
): Observable<CommandResult> {
|
||||
): Observable<AttachmentUploaded> {
|
||||
const body = new FormData();
|
||||
body.append('file', file, file.name);
|
||||
if (commentId) body.append('commentId', commentId);
|
||||
return this.authorized((headers) =>
|
||||
this.http.post<CommandResult>(this.url(issueId), body, { headers }),
|
||||
this.http.post<AttachmentUploaded>(this.url(issueId), body, {
|
||||
headers,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { API_CONFIG } from '@task-stream/web/shared/infrastructure';
|
||||
import {
|
||||
ProposalInput,
|
||||
ProposalResult,
|
||||
ProposalsGateway,
|
||||
} from '@task-stream/web/tracker/domain';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** The public form posts over REST, without a session (`/api/explore/...`). */
|
||||
@Injectable()
|
||||
export class HttpProposalsGateway extends ProposalsGateway {
|
||||
private readonly http = inject(HttpClient);
|
||||
private readonly api = inject(API_CONFIG);
|
||||
|
||||
submit(
|
||||
projectKey: string,
|
||||
proposal: ProposalInput,
|
||||
): Observable<ProposalResult> {
|
||||
return this.http.post<ProposalResult>(
|
||||
`${this.api.restUrl}/explore/projects/${encodeURIComponent(projectKey)}/proposals`,
|
||||
{
|
||||
...proposal,
|
||||
description: proposal.description.trim() || undefined,
|
||||
author: proposal.author.trim() || undefined,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ fragment ProjectFields on Project {
|
||||
name
|
||||
description
|
||||
isPublic
|
||||
acceptsProposals
|
||||
updatedAt
|
||||
version
|
||||
owner {
|
||||
@@ -83,6 +84,13 @@ fragment IssueSummaryFields on Issue {
|
||||
key
|
||||
title
|
||||
}
|
||||
blockedBy {
|
||||
id
|
||||
key
|
||||
title
|
||||
}
|
||||
votes
|
||||
voted
|
||||
rank
|
||||
storyPoints
|
||||
startDate
|
||||
@@ -143,6 +151,12 @@ fragment CommentFields on Comment {
|
||||
body
|
||||
replyTo
|
||||
deleted
|
||||
reactions {
|
||||
emoji
|
||||
users {
|
||||
...UserRefFields
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
editedAt
|
||||
author {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -249,3 +249,30 @@ query DueIssues($filter: IssueFilterInput!) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query IssueList($filter: IssueFilterInput!, $limit: Int!) {
|
||||
issues(filter: $filter, limit: $limit) {
|
||||
items {
|
||||
...IssueSummaryFields
|
||||
}
|
||||
total
|
||||
}
|
||||
}
|
||||
|
||||
mutation ReactToComment($commentId: ID!, $emoji: String!, $on: Boolean!) {
|
||||
reactToComment(commentId: $commentId, emoji: $emoji, on: $on) {
|
||||
...CommandResultFields
|
||||
}
|
||||
}
|
||||
|
||||
mutation DuplicateIssue($issueId: ID!) {
|
||||
duplicateIssue(issueId: $issueId) {
|
||||
...CommandResultFields
|
||||
}
|
||||
}
|
||||
|
||||
mutation VoteIssue($issueId: ID!, $on: Boolean!) {
|
||||
voteIssue(issueId: $issueId, on: $on) {
|
||||
...CommandResultFields
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
import {
|
||||
ActivityGateway,
|
||||
AttachmentsGateway,
|
||||
ProposalsGateway,
|
||||
CommentsGateway,
|
||||
IssuesGateway,
|
||||
NotificationsGateway,
|
||||
@@ -28,6 +29,7 @@ import {
|
||||
import { GraphqlIssuesGateway } from './adapters/graphql-issues.gateway';
|
||||
import { GraphqlNotificationsGateway } from './adapters/graphql-notifications.gateway';
|
||||
import { HttpAttachmentsGateway } from './adapters/http-attachments.gateway';
|
||||
import { HttpProposalsGateway } from './adapters/http-proposals.gateway';
|
||||
import { GraphqlProjectsGateway } from './adapters/graphql-projects.gateway';
|
||||
import { GraphqlRealtimeGateway } from './adapters/graphql-realtime.gateway';
|
||||
import { GraphqlSavedFiltersGateway } from './adapters/graphql-saved-filters.gateway';
|
||||
@@ -46,6 +48,7 @@ export function provideTrackerInfrastructure(): EnvironmentProviders {
|
||||
{ provide: ReleasesGateway, useClass: GraphqlReleasesGateway },
|
||||
{ provide: ActivityGateway, useClass: GraphqlActivityGateway },
|
||||
{ provide: AttachmentsGateway, useClass: HttpAttachmentsGateway },
|
||||
{ provide: ProposalsGateway, useClass: HttpProposalsGateway },
|
||||
{ provide: UsersGateway, useClass: GraphqlUsersGateway },
|
||||
{ provide: NotificationsGateway, useClass: GraphqlNotificationsGateway },
|
||||
{ provide: TrackerRealtimeGateway, useClass: GraphqlRealtimeGateway },
|
||||
|
||||
Reference in New Issue
Block a user