/** * Who is viewing the board. Drives every permission on the page. * - `system-admin` — receiver / triage owner: vote, triage (Decline / * Start work / status changes). Cannot create requests. * - `staff` — requester / voter (company admin, advisor, staff): vote, * create requests. Cannot triage. */ export type FeedbackRole = "system-admin" | "staff"; /** The signed-in user — used to scope the "my requests" filter. */ export interface FeedbackCurrentUser { name: string; /** Display role label, e.g. "Admin", "Advisor". */ role: string; } /** * What kind of request this is. * - `idea` / `enhancement` — demand-driven, **votable**. * - `bug` — a defect; **not votable** and treated as top priority. */ export type FeedbackType = "idea" | "enhancement" | "bug"; /** Whether a request type accepts upvotes. Bugs are triaged by severity, not votes. */ export const isVotable = (type: FeedbackType): boolean => type !== "bug"; export type Priority = "low" | "medium" | "high" | "critical"; export type FeedbackStatus = "new" | "in-progress" | "resolved" | "declined"; export interface FeedbackReporter { name: string; email: string; /** Job title / position, e.g. "Senior Advisor". */ title: string; /** Optional avatar image URL — falls back to initials when absent. */ avatar?: string; } export interface FeedbackAttachment { name: string; size: number; /** Image attachments carry a preview URL so they render as a thumbnail. */ previewUrl?: string; } export interface FeedbackItem { id: string; title: string; type: FeedbackType; area: string; priority: Priority; status: FeedbackStatus; reporter: FeedbackReporter; problemStatement: string; /** Ideas / enhancements: the desired outcome ("ideal outcome" in the form). */ proposedSolution?: string; // --- Bug-only signals (captured by the bug intake form) --- /** Steps to reproduce the defect (multi-line). */ stepsToReproduce?: string; /** How often it happens — display label, e.g. "Every time". */ frequency?: string; /** How much it blocks the user — display label, e.g. "I'm blocked". */ impact?: string; // --- Idea / enhancement-only signals --- /** How the user works around the gap today. */ workaround?: string; /** Who would benefit — display labels, e.g. ["My team", "My clients"]. */ beneficiaries?: string[]; attachments: FeedbackAttachment[]; votes: number; /** ISO 8601 timestamp */ createdAt: string; /** Optional screenshot of the screen this request relates to. */ previewImage?: string; }