Skip to content

Commit 2f93df9

Browse files
DexterStoreyclaude
andcommitted
clipped settings panels stay open
A panel cut off by scrolling keeps its title but drops its bottom border, so it reads as continuing into the more line instead of finished. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 89ba154 commit 2f93df9

3 files changed

Lines changed: 48 additions & 11 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
- [2026-07-22] settings shows the harnesses and scrolls
1+
- [2026-07-22] clipped settings panels stay open
2+
3+
A panel cut off by scrolling keeps its title but drops its bottom
4+
border, so it reads as continuing into the more line instead of
5+
finished.
6+
7+
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8+
- [2026-07-22] [settings shows the harnesses and scrolls
29

310
A harnesses box joins settings: green on when routed, warn off with an
411
enter hint when installed but not routed, grey when the harness is not
@@ -8,7 +15,7 @@ its rows to the terminal height with more indicators, and the 2s
815
background tick no longer holds the busy flag that was eating
916
keypresses.
1017

11-
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
18+
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>](https://github.com/RubricLab/tokenmaxx/commit/89ba154b91d73db4059f9a44704633141497e0a0)
1219
- [2026-07-22] [the proxy lifts system prompts for the chatgpt backend
1320

1421
Third-party harnesses send standard Responses requests: system messages

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@
5959
"post-commit": "bun x @rubriclab/package post-commit"
6060
},
6161
"type": "module",
62-
"version": "0.0.59"
62+
"version": "0.0.60"
6363
}

‎src/tui/dashboard.ts‎

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { Box, createCliRenderer, parseColor, type RGBA, Text } from '@opentui/core'
1+
import {
2+
type BorderSides,
3+
Box,
4+
createCliRenderer,
5+
parseColor,
6+
type RGBA,
7+
Text
8+
} from '@opentui/core'
29
import {
310
type HarnessStatus,
411
type HarnessTarget,
@@ -812,13 +819,18 @@ function buildSettingRows(snapshot: DashboardSnapshot, harnesses: HarnessStatus[
812819
]
813820
}
814821

822+
// A panel clipped by scrolling keeps its title but loses its bottom border,
823+
// so it reads as continuing into the "↓ more" line instead of complete.
824+
const openBottomBorder: BorderSides[] = ['top', 'left', 'right']
825+
815826
function settingsPanel(
816827
ctx: Ctx,
817828
snapshot: DashboardSnapshot,
818829
allRows: SettingRow[],
819830
provider: ProviderId,
820831
selected: number,
821-
visible: Set<number>
832+
visible: Set<number>,
833+
openBottom: boolean
822834
) {
823835
const state = snapshot.providers.find(s => s.provider === provider)
824836
const policy = state?.policy
@@ -904,7 +916,7 @@ function settingsPanel(
904916
const auto = policy?.enabled ? `⟳ auto ${policy.thresholdPercent}%` : 'auto off'
905917
return Box(
906918
{
907-
border: true,
919+
border: openBottom ? openBottomBorder : true,
908920
borderColor: rgb(routed ? ctx.theme.border : ctx.theme.warn),
909921
borderStyle: 'rounded',
910922
flexDirection: 'column',
@@ -924,7 +936,8 @@ function harnessPanel(
924936
statuses: HarnessStatus[],
925937
allRows: SettingRow[],
926938
selected: number,
927-
visible: Set<number>
939+
visible: Set<number>,
940+
openBottom: boolean
928941
) {
929942
const entries = allRows
930943
.map((row, index) => ({ index, row }))
@@ -963,7 +976,7 @@ function harnessPanel(
963976
})
964977
return Box(
965978
{
966-
border: true,
979+
border: openBottom ? openBottomBorder : true,
967980
borderColor: rgb(ctx.theme.border),
968981
borderStyle: 'rounded',
969982
flexDirection: 'column',
@@ -1023,11 +1036,28 @@ function settingsBody(
10231036
for (let index = start; index <= end; index += 1) {
10241037
visible.add(index)
10251038
}
1039+
const clippedBelow = (lastRow: number): boolean => end < lastRow
10261040
const children = [
10271041
...(start > 0 ? [centered(Text({ content: '↑ more', fg: rgb(ctx.theme.faint) }))] : []),
1028-
settingsPanel(ctx, snapshot, rows, 'openai', state.settingsSelected, visible),
1029-
settingsPanel(ctx, snapshot, rows, 'anthropic', state.settingsSelected, visible),
1030-
harnessPanel(ctx, harnesses, rows, state.settingsSelected, visible),
1042+
settingsPanel(
1043+
ctx,
1044+
snapshot,
1045+
rows,
1046+
'openai',
1047+
state.settingsSelected,
1048+
visible,
1049+
clippedBelow(openaiCount - 1)
1050+
),
1051+
settingsPanel(
1052+
ctx,
1053+
snapshot,
1054+
rows,
1055+
'anthropic',
1056+
state.settingsSelected,
1057+
visible,
1058+
clippedBelow(openaiCount + anthropicCount - 1)
1059+
),
1060+
harnessPanel(ctx, harnesses, rows, state.settingsSelected, visible, clippedBelow(total - 1)),
10311061
...(end < total - 1 ? [centered(Text({ content: '↓ more', fg: rgb(ctx.theme.faint) }))] : [])
10321062
].filter(child => child !== null)
10331063
return column(ctx, children, 78)

0 commit comments

Comments
 (0)