feat(bd-318): implement QueueView container with filtering and batch support

QueueView now supports:
- Filtering items via CommandPalette (Cmd+K)
- Hide snoozed items by default (showSnoozed prop)
- Show snooze count indicator when items are hidden
- Support batch mode entry for sections with 2+ items
- Filter by type prop for programmatic filtering

Added snoozedUntil field to FocusItem type and updated fixtures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
teernisse
2026-02-26 11:00:15 -05:00
parent d7056cc86f
commit d4b8a4baea
4 changed files with 541 additions and 98 deletions

View File

@@ -1,65 +1,26 @@
/**
* TypeScript types mirroring the Rust backend data structures.
* TypeScript types for Mission Control.
*
* These are used by the IPC layer and components to maintain
* type safety across the Tauri boundary.
* IPC types are auto-generated by tauri-specta and re-exported from bindings.
* Frontend-only types are defined here.
*/
// -- Backend response types (match Rust structs in commands/mod.rs) --
// -- Re-export IPC types from generated bindings --
export type {
BridgeStatus,
CaptureResult,
JsonValue,
LoreStatus,
LoreSummaryStatus,
McError,
McErrorCode,
SyncResult,
Result,
} from "./bindings";
export interface LoreStatus {
last_sync: string | null;
is_healthy: boolean;
message: string;
summary: LoreSummaryStatus | null;
}
// -- Type guards for IPC types --
export interface LoreSummaryStatus {
open_issues: number;
authored_mrs: number;
reviewing_mrs: number;
}
export interface BridgeStatus {
mapping_count: number;
pending_count: number;
suspect_count: number;
last_sync: string | null;
last_reconciliation: string | null;
}
export interface SyncResult {
created: number;
closed: number;
skipped: number;
/** Number of suspect_orphan flags cleared (item reappeared) */
healed: number;
/** Error messages from non-fatal errors during sync */
errors: string[];
}
// -- Structured error types (match Rust error.rs) --
/** Error codes for programmatic handling */
export type McErrorCode =
| "LORE_UNAVAILABLE"
| "LORE_UNHEALTHY"
| "LORE_FETCH_FAILED"
| "BRIDGE_LOCKED"
| "BRIDGE_MAP_CORRUPTED"
| "BRIDGE_SYNC_FAILED"
| "BEADS_UNAVAILABLE"
| "BEADS_CREATE_FAILED"
| "BEADS_CLOSE_FAILED"
| "IO_ERROR"
| "INTERNAL_ERROR";
/** Structured error from Tauri IPC commands */
export interface McError {
code: McErrorCode;
message: string;
recoverable: boolean;
}
import type { McError } from "./bindings";
/** Type guard to check if an error is a structured McError */
export function isMcError(err: unknown): err is McError {
@@ -72,11 +33,6 @@ export function isMcError(err: unknown): err is McError {
);
}
/** Result from the quick_capture command */
export interface CaptureResult {
bead_id: string;
}
// -- Frontend-only types --
/** The type of work item surfaced in the Focus View */
@@ -102,10 +58,18 @@ export interface FocusItem {
contextQuote: string | null;
/** Who is requesting attention */
requestedBy: string | null;
/** ISO timestamp when snooze expires (item hidden until then) */
snoozedUntil: string | null;
}
/** Action the user takes on a focused item */
export type FocusAction = "start" | "defer_1h" | "defer_tomorrow" | "skip";
export type FocusAction =
| "start"
| "defer_1h"
| "defer_3h"
| "defer_tomorrow"
| "defer_next_week"
| "skip";
/** An entry in the decision log */
export interface DecisionEntry {
@@ -143,6 +107,10 @@ export interface InboxItem {
url?: string;
/** Who triggered this item (e.g., commenter name) */
actor?: string;
/** Whether this item has been archived */
archived?: boolean;
/** ISO timestamp when snooze expires (item hidden until then) */
snoozedUntil?: string;
}
/** Triage action the user can take on an inbox item */