feat: comments marked as decisions, on top of the ticket and searchable

Whoever can change the ticket flags a comment as a decision (new event
CommentDecisionMarkedEvent on the comment). The ticket page lists its
decisions above the description, with a link to the comment in the
conversation (`?comment=<id>` scrolls to it and points at it), and the
search palette finds them by their text across my projects.

API: markDecision / PUT-DELETE /api/comments/{id}/decision; Issue.decisions
and GET /api/issues/{issue}/decisions; decisions(projectId?, search) and
GET /api/projects/{project}/decisions, GET /api/me/decisions. MCP:
mark_decision, search_decisions, and get_issue includes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 11:32:07 +02:00
parent 8f83fdefb6
commit 70e4fbd399
45 changed files with 2515 additions and 84 deletions

View File

@@ -192,6 +192,8 @@ export interface Issue extends IssueSummary {
watchers: UserRef[];
/** Whether I keep it pinned (home page and search). */
pinned: boolean;
/** Its comments marked as decisions, oldest first. */
decisions: Comment[];
checklist: ChecklistItem[];
/** Commits, branches and pull requests that mention it. */
devLinks: DevLink[];
@@ -326,10 +328,20 @@ export interface Comment {
deleted: boolean;
/** 👍… and who chose each (only the ones somebody chose). */
reactions: { emoji: string; users: UserRef[] }[];
/** Marked as a decision of the ticket: shown above it and searchable. */
decision: boolean;
/** Who marked it as a decision (null when it is not one). */
decidedBy: UserRef | null;
createdAt: string;
editedAt: string | null;
}
/** A decision found by its text, with its ticket. */
export interface Decision {
comment: Comment;
issue: { id: string; key: string; title: string };
}
export interface SprintProgress {
total: number;
/** Done or cancelled. */

View File

@@ -16,6 +16,7 @@ import {
PushDeviceSubscription,
CommandResult,
Comment,
Decision,
Epic,
GitIntegration,
GitRepository,
@@ -144,6 +145,14 @@ export abstract class IssuesGateway {
abstract pins(): Observable<IssueSummary[]>;
/** Pins the ticket for me (or unpins it): private, at most 20. */
abstract pin(issueId: string, pinned: boolean): Observable<void>;
/**
* Decisions (comments marked as such) of all my projects by their text,
* most recent first: here and not in CommentsGateway, for the palette.
*/
abstract searchDecisions(
search: string,
limit: number,
): Observable<Decision[]>;
/** Tickets hanging from `issueId`. */
abstract children(
projectId: string,
@@ -289,6 +298,11 @@ export abstract class CommentsGateway {
on: boolean,
): Observable<CommandResult>;
abstract remove(commentId: string): Observable<CommandResult>;
/** Marks it as a decision of its ticket (`on`) or unmarks it. */
abstract markDecision(
commentId: string,
on: boolean,
): Observable<CommandResult>;
}
/** A ticket's files. Uploads and downloads go through the REST API. */