History

refactor(execution-history): narrow status option value typing

Tighten status filter option typing so each option's value is constrained to "all" or valid execution states, improving type safety in status filtering.

Saatvik Arya committed 7 months ago

Commit f91c2ff1 parent b4111a91 file · +1 −1Browse files

Unified · Split

plugins/execution-history/react/components.tsx+1−1
@@ -72,7 +72,7 @@ const STATUS_STYLES = { · 71 unmodified lines
7272 const statusDot = (status: ExecutionStatus): string => STATUS_STYLES[status].dot;
7373 const statusText = (status: ExecutionStatus): string => STATUS_STYLES[status].text;
7474
75−const STATUS_OPTIONS: Array<{ value: string; label: string }> = [
75+const STATUS_OPTIONS: Array<{ value: "all" | ExecutionStatus; label: string }> = [
7676 { value: "all", label: "All" },
7777 { value: "completed", label: "Completed" },
7878 { value: "failed", label: "Failed" },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t