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
72const statusDot = (status: ExecutionStatus): string => STATUS_STYLES[status].dot;72const statusDot = (status: ExecutionStatus): string => STATUS_STYLES[status].dot;
73const statusText = (status: ExecutionStatus): string => STATUS_STYLES[status].text;73const statusText = (status: ExecutionStatus): string => STATUS_STYLES[status].text;
74 74
75const STATUS_OPTIONS: Array<{ value: string; label: string }> = [75const STATUS_OPTIONS: Array<{ value: "all" | ExecutionStatus; label: string }> = [
76 { value: "all", label: "All" },76 { value: "all", label: "All" },
77 { value: "completed", label: "Completed" },77 { value: "completed", label: "Completed" },
78 { value: "failed", label: "Failed" },78 { value: "failed", label: "Failed" },