Skip to content

Commit ec512f3

Browse files
authored
Jrvb/UI tweaks (#144)
Tweaks to icons, spacing and header wording
1 parent b9e64da commit ec512f3

3 files changed

Lines changed: 72 additions & 35 deletions

File tree

src/components/BenchmarkMenu.tsx

Lines changed: 60 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,53 @@ import { NavigationTips } from "./NavigationTips.js";
99
import { colors } from "../utils/theme.js";
1010
import { useExitOnCtrlC } from "../hooks/useExitOnCtrlC.js";
1111

12+
/*
13+
Some useful icon chars
14+
15+
Circles:
16+
◉ FISHEYE (U+25C9) - currently used for Benchmark Defs
17+
◎ BULLSEYE (U+25CE)
18+
◐ CIRCLE LEFT HALF BLACK (U+25D0)
19+
◑ CIRCLE RIGHT HALF BLACK (U+25D1)
20+
⊕ CIRCLED PLUS (U+2295)
21+
⊗ CIRCLED TIMES (U+2297)
22+
⊙ CIRCLED DOT (U+2299)
23+
24+
Squares:
25+
▣ SQUARE W/ BLACK SMALL SQ - currently used for Orchestrator Jobs
26+
▩ SQUARE W/ DIAGONAL CROSS - currently used for Legacy Runs
27+
◧ SQUARE LEFT HALF BLACK (U+25E7)
28+
◨ SQUARE RIGHT HALF BLACK (U+25E8)
29+
◫ SQUARE W/ VERTICAL LINE (U+25EB)
30+
▦ SQUARE W/ CROSSHATCH (U+25A6)
31+
▧ SQUARE W/ DIAGONAL FILL (U+25A7)
32+
33+
Diamonds / Triangles / Stars:
34+
◈ DIAMOND W/ BLACK DIAMOND - currently used for Scenario Runs
35+
◆ BLACK DIAMOND (U+25C6)
36+
◇ WHITE DIAMOND (U+25C7)
37+
▲ BLACK UP TRIANGLE (U+25B2)
38+
△ WHITE UP TRIANGLE (U+25B3)
39+
★ BLACK STAR (U+2605)
40+
⬡ WHITE HEXAGON (U+2B21)
41+
⬢ BLACK HEXAGON (U+2B22)
42+
▶ BLACK RIGHT-POINTING TRIANGLE (U+25B6) This one renders weirdly, with an extra space
43+
▷ WHITE RIGHT-POINTING TRIANGLE (U+25B7)
44+
► BLACK RIGHT-POINTING POINTER (U+25BA)
45+
▻ WHITE RIGHT-POINTING POINTER (U+25BB)
46+
47+
✦ BLACK FOUR POINTED STAR (U+2726)
48+
✧ WHITE FOUR POINTED STAR (U+2727)
49+
✚ HEAVY GREEK CROSS (U+271A)
50+
✜ HEAVY OPEN CENTRE CROSS (U+271C)
51+
✛ OPEN CENTRE CROSS (U+271B)
52+
❖ BLACK DIAMOND MINUS WHITE X (U+2756)
53+
✥ FOUR CLUB-SPOKED ASTERISK (U+2725)
54+
❋ HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK (U+274B)
55+
✳ EIGHT SPOKED ASTERISK (U+2733)
56+
✴ EIGHT POINTED BLACK STAR (U+2734)
57+
*/
58+
1259
interface BenchmarkMenuItem {
1360
key: string;
1461
label: string;
@@ -20,25 +67,25 @@ interface BenchmarkMenuItem {
2067
const benchmarkMenuItems: BenchmarkMenuItem[] = [
2168
{
2269
key: "benchmarks",
23-
label: "Benchmarks",
70+
label: "Benchmark Defs",
2471
description: "View benchmark definitions",
2572
icon: "◉",
2673
color: colors.primary,
2774
},
28-
{
29-
key: "benchmark-runs",
30-
label: "Benchmark Runs",
31-
description: "View and manage benchmark executions",
32-
icon: "▶",
33-
color: colors.success,
34-
},
3575
{
3676
key: "benchmark-jobs",
37-
label: "Benchmark Jobs",
77+
label: "Orchestrator Jobs",
3878
description: "Run and manage benchmark jobs",
39-
icon: "",
79+
icon: "",
4080
color: colors.warning,
4181
},
82+
{
83+
key: "benchmark-runs",
84+
label: "Legacy Runs",
85+
description: "View and manage benchmark executions",
86+
icon: "◇",
87+
color: colors.success,
88+
},
4289
{
4390
key: "scenario-runs",
4491
label: "Scenario Runs",
@@ -101,14 +148,8 @@ export const BenchmarkMenu = ({ onSelect, onBack }: BenchmarkMenuProps) => {
101148
onSelect(benchmarkMenuItems[selectedIndex].key);
102149
} else if (key.escape) {
103150
onBack();
104-
} else if (input === "1") {
105-
onSelect("benchmarks");
106-
} else if (input === "2") {
107-
onSelect("benchmark-runs");
108-
} else if (input === "3") {
109-
onSelect("benchmark-jobs");
110-
} else if (input === "4") {
111-
onSelect("scenario-runs");
151+
} else if (input >= "1" && input <= String(benchmarkMenuItems.length)) {
152+
onSelect(benchmarkMenuItems[parseInt(input) - 1].key);
112153
} else if (input === "q") {
113154
exit();
114155
}
@@ -141,11 +182,11 @@ export const BenchmarkMenu = ({ onSelect, onBack }: BenchmarkMenuProps) => {
141182
<Text color={item.color} bold>
142183
{item.icon}
143184
</Text>
144-
<Text> </Text>
145185
<Text
146186
color={isSelected ? item.color : colors.text}
147187
bold={isSelected}
148188
>
189+
{" "}
149190
{item.label}
150191
</Text>
151192
{!isNarrow && (

src/components/MainMenu.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ interface MenuItem {
2424
}
2525

2626
const allMenuItems: MenuItem[] = [
27+
{
28+
key: "benchmarks",
29+
label: "Benchmarks",
30+
description: "Performance testing and evaluation",
31+
icon: "▷",
32+
color: colors.success,
33+
},
2734
{
2835
key: "devboxes",
2936
label: "Devboxes",
@@ -52,19 +59,11 @@ const allMenuItems: MenuItem[] = [
5259
icon: "▤",
5360
color: colors.secondary,
5461
},
55-
{
56-
key: "benchmarks",
57-
label: "Benchmarks",
58-
description: "Performance testing and evaluation",
59-
icon: "▶",
60-
color: colors.success,
61-
betaFeature: "benchmarks",
62-
},
6362
{
6463
key: "settings",
6564
label: "Settings",
6665
description: "Network policies, secrets, and more",
67-
icon: "",
66+
icon: "",
6867
color: colors.info,
6968
},
7069
];

src/store/betaFeatureStore.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface BetaFeatureContextValue {
2525
/**
2626
* Known beta features that can be enabled
2727
*/
28-
export type BetaFeature = "benchmarks";
28+
export type BetaFeature = never;
2929

3030
const BetaFeatureContext = React.createContext<BetaFeatureContextValue | null>(
3131
null,
@@ -43,12 +43,9 @@ export function BetaFeatureProvider({ children }: BetaFeatureProviderProps) {
4343
(feature: BetaFeature): boolean => {
4444
// Currently all beta features are gated by the same flag
4545
// This can be extended to support per-feature flags in the future
46-
switch (feature) {
47-
case "benchmarks":
48-
return betaEnabled;
49-
default:
50-
return false;
51-
}
46+
// Add cases here when new beta features are introduced
47+
void feature;
48+
return betaEnabled;
5249
},
5350
[betaEnabled],
5451
);

0 commit comments

Comments
 (0)