Skip to content

Commit d57e210

Browse files
authored
fix(tui): place provider before cost in footer (#46808)
1 parent 44a3bf2 commit d57e210

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎packages/tui/src/mini/footer.width.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export function footerStatuslinePolicy(input: {
7373
"agent",
7474
"model",
7575
"context",
76-
"cost",
7776
"provider",
77+
"cost",
7878
"menu",
7979
]
8080
const groups = order.flatMap((id) => selected.get(id) ?? [])

‎packages/tui/test/mini/footer.responsive.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ test.each([false, true])(
124124
const model = width === 112 ? "GPT-5.6 Sol (50% Off) [max]" : mono ? "GPT-5.6... [max]" : "GPT-5.6\u2026 [max]"
125125
expect(row).toBe(
126126
(width === 112
127-
? ["Build", model, "14.1K (1%)", "$0.04", "Anomaly / OpenCode", "ctrl+p menu"]
127+
? ["Build", model, "14.1K (1%)", "Anomaly / OpenCode", "$0.04", "ctrl+p menu"]
128128
: width === 40
129129
? ["Build", model, "1% ctx"]
130130
: ["Build", model]

‎packages/tui/test/mini/footer.width.test.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,15 @@ describe("run footer width", () => {
7272

7373
test("allocation priority is separate from placement", () => {
7474
expect(footerStatuslinePolicy({ ...screenshot, width: 15 }).groups.map((group) => group.id)).toEqual(["model"])
75+
expect(footerStatuslinePolicy({ ...screenshot, width: 60 }).groups.map((group) => group.id)).toEqual([
76+
"agent",
77+
"model",
78+
"context",
79+
"cost",
80+
])
7581
const full = footerStatuslinePolicy({ ...screenshot, width: 112 })
7682
expect(full.text).toBe(
77-
"Build \u00b7 GPT-5.6 Sol (50% Off) [max] \u00b7 14.1K (1%) \u00b7 $0.04 \u00b7 Anomaly / OpenCode \u00b7 ctrl+p menu",
83+
"Build \u00b7 GPT-5.6 Sol (50% Off) [max] \u00b7 14.1K (1%) \u00b7 Anomaly / OpenCode \u00b7 $0.04 \u00b7 ctrl+p menu",
7884
)
7985
})
8086

0 commit comments

Comments
 (0)