feat: implement Inbox view with triage actions
- Add InboxItem types and TriageAction/DeferDuration types - Create Inbox component with: - Accept/Defer/Archive actions for each item - Keyboard shortcuts (A/D/X) for fast triage - Defer duration picker popup - Inbox Zero celebration state - Type-specific badges with colors - Add comprehensive tests for all functionality Closes bd-qvc Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,39 @@ export interface DecisionEntry {
|
||||
/** Staleness level derived from item age */
|
||||
export type Staleness = "fresh" | "normal" | "amber" | "urgent";
|
||||
|
||||
// -- Inbox types --
|
||||
|
||||
/** Type of work item in the inbox */
|
||||
export type InboxItemType = "mention" | "mr_feedback" | "review_request" | "assignment" | "manual";
|
||||
|
||||
/** A work item awaiting triage in the inbox */
|
||||
export interface InboxItem {
|
||||
/** Unique identifier */
|
||||
id: string;
|
||||
/** Human-readable title */
|
||||
title: string;
|
||||
/** Type of inbox item */
|
||||
type: InboxItemType;
|
||||
/** Whether this item has been triaged */
|
||||
triaged: boolean;
|
||||
/** When the item was created/arrived */
|
||||
createdAt: string;
|
||||
/** Optional snippet/preview */
|
||||
snippet?: string;
|
||||
/** Source project */
|
||||
project?: string;
|
||||
/** Web URL for opening in browser */
|
||||
url?: string;
|
||||
/** Who triggered this item (e.g., commenter name) */
|
||||
actor?: string;
|
||||
}
|
||||
|
||||
/** Triage action the user can take on an inbox item */
|
||||
export type TriageAction = "accept" | "defer" | "archive";
|
||||
|
||||
/** Duration options for deferring an item */
|
||||
export type DeferDuration = "1h" | "3h" | "tomorrow" | "next_week";
|
||||
|
||||
/** Compute staleness from an ISO timestamp */
|
||||
export function computeStaleness(updatedAt: string | null): Staleness {
|
||||
if (!updatedAt) return "normal";
|
||||
|
||||
Reference in New Issue
Block a user