Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Keep buttons' focus rings and labels inside the boxes that clip them

AdamPlatin12362bec23260b8
diff --git a/app/src/start/start.css b/app/src/start/start.css
index 1cb9c99a..4ad6d701 100644
--- a/app/src/start/start.css
+++ b/app/src/start/start.css
@@ -116,7 +116,8 @@ html[data-shimmer] .voice[data-on]>span{color:transparent;background:linear-grad
.card{position:absolute;inset:0 0 auto;max-height:100%;box-sizing:border-box;padding:14px 16px;display:flex;flex-direction:column;transition:opacity .22s ease-out .07s,filter .22s ease-out .07s}
@starting-style{.card{opacity:0;filter:blur(6px)}}
.card-scroll,.log{scrollbar-width:thin;scrollbar-color:var(--bt-line-2) transparent}
-.card-scroll{position:relative;min-height:0;flex:0 1 auto;overflow:auto}
+/* The padding keeps the 2px + 2px focus rings inside the scroll clip; the negative margin keeps the layout where it was. */
+.card-scroll{position:relative;min-height:0;flex:0 1 auto;overflow:auto;padding:4px;margin:-4px}
.card-scroll>*+*{margin-top:6px}
.card-scroll>.card-actions{margin-top:12px}
.card-title{font-size:15px;line-height:20px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
diff --git a/app/src/start/start.js b/app/src/start/start.js
index 29208b1c..9dc34346 100644
--- a/app/src/start/start.js
+++ b/app/src/start/start.js
@@ -481,7 +481,7 @@ function toggleDetails(button) {
setTimeout(() => {
pre.textContent = (s.failure?.log ?? s.card?.log ?? []).slice(-200).join('\n')
pre.parentElement.scrollTop = 1e6
- card.querySelector('.card-scroll').scrollTop = button.offsetTop - 14
+ card.querySelector('.card-scroll').scrollTop = button.offsetTop - 18
}, reduced() ? 0 : spring('shape').duration)
}
function copiedLabel(button) {
diff --git a/ds-bot/client.js b/ds-bot/client.js
index cd6415bd..7105ddcf 100644
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@ -2651,6 +2651,8 @@ body[data-bt-motion=quiet] .bt-mark[data-poke]{cursor:default}
.bt-row{display:flex;align-items:center;gap:8px;min-height:54px;padding:8px;border:0;border-radius:12px;background:transparent;color:var(--bt-ink);text-align:left;cursor:pointer;width:100%;box-sizing:border-box;font-family:inherit;transition:background-color .12s ease}
.bt-row:hover{background:var(--bt-hover)}
.bt-row[aria-current=page]{background:var(--bt-active)}
+/* Inset: the .bt-list scroll box clips anything drawn outside the row. */
+.bt-row:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-row[aria-current=page] .bt-row-name{font-weight:500}
.bt-row-body{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.bt-row-name{display:flex;align-items:center;gap:6px;min-width:0;font-size:14px;line-height:20px;font-weight:400}
@@ -3072,6 +3074,8 @@ button.bt-set-row:hover{background:var(--bt-hover)}
.bt-set-hint{font-size:12px;line-height:16px;color:color-mix(in srgb,var(--bt-ink-2) 50%,var(--bt-ink-3))}
.bt-set-control{flex:none;display:flex;align-items:center;gap:6px}
.bt-set-places .bt-set-control{flex:0 1 auto;max-width:50%;min-width:0}
+/* Shrinkable, so a long model name gets its ellipsis instead of pushing Reset out of the card. */
+.bt-set-model .bt-set-control{flex:0 1 auto;min-width:0;max-width:65%}
.bt-set-places .bt-set-hint{overflow-wrap:anywhere}
.bt-set-value{font-size:13px;color:var(--bt-ink-2);text-align:right}
.bt-set-bot{flex:1;display:flex;align-items:center;gap:8px;min-width:0}
@@ -3177,7 +3181,9 @@ html:not([data-windows-titlebar]) [class*="_footArea"],:not([class*="_collapsed"
.bt-msg-line{position:relative;display:flex;align-items:flex-end;gap:8px;max-width:100%}
.bt-msg-line>.bt-bubble{max-width:none;min-width:0}
/* The same bubble width as beside an avatar column: the share of (100% - 30px), plus the 30px. */
-.bt-astack[data-lead]>.bt-msg{max-width:min(calc(var(--bt-msg-w) * (100% - 30px) + 30px),calc(100% - 52px))}
+.bt-astack[data-lead]>.bt-msg{max-width:min(calc(var(--bt-msg-w) * (100% - 30px) + 30px),calc(100% - 82px))}
+/* The indent of earlier rows comes out of their line, so their toolbar keeps its 82px too. */
+.bt-astack[data-lead]>.bt-msg:not(:last-child)>.bt-msg-line{max-width:calc(100% - 30px)}
.bt-tools{position:absolute;bottom:0;z-index:0;left:100%;margin-left:6px;display:flex;gap:2px;opacity:0;visibility:hidden;transition:opacity .12s ease,visibility .12s}
/* The hover bridge spans only the 6px gap (plus a little overlap) between the
bubble's edge and the toolbar: wider, it sits over the bubble's tail and
@@ -3452,6 +3458,7 @@ body[data-ds-dark-theme] .bt-theme-chip i{background:var(--da)}
.bt-settings-scroll{overflow-x:clip}
.bt-set-row{flex-direction:column;align-items:stretch;gap:8px}
.bt-set-row>.bt-set-copy{width:100%}
+ .bt-set-model .bt-set-control{max-width:none}
.bt-avedit{width:min(300px,calc(100vw - 32px))}
.bt-shape-row{grid-template-columns:repeat(4,1fr)}
}
@@ -4270,7 +4277,8 @@ function GoalPanel({ goal, view, room: room2, roster, actions, working }) {
(0, import_react5.useEffect)(() => {
const box = stepper.current;
if (box === null || typeof ResizeObserver !== "function") return void 0;
- const measure = () => box.querySelectorAll(".bt-goal-step").forEach((node) => node.classList.toggle("bt-goal-mini", node.clientWidth < 14));
+ const min = view.stages.length >= 10 ? 17 : 14;
+ const measure = () => box.querySelectorAll(".bt-goal-step").forEach((node) => node.classList.toggle("bt-goal-mini", node.clientWidth < min));
const observer = new ResizeObserver(measure);
observer.observe(box);
measure();
@@ -4523,12 +4531,13 @@ var GOAL_CSS = `
.bt-goal-step:first-child::before{left:50%}
.bt-goal-step:last-child::before{right:50%}
.bt-goal-node{position:relative;z-index:1;box-sizing:border-box;width:min(20px,100%);aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--bt-main);border:1.5px solid var(--bt-line-2);color:var(--bt-ink-3);font-size:10px;line-height:1;font-variant-numeric:tabular-nums}
-.bt-goal-node>svg{width:12px;height:12px}
+.bt-goal-node>svg{flex:none;width:min(12px,70%);height:auto}
.bt-goal-step[data-step=passed]>.bt-goal-node{background:var(--bt-green);border-color:var(--bt-green);color:var(--bt-main)}
.bt-goal-step[data-step=current]>.bt-goal-node{border-color:var(--bt-accent);color:var(--bt-accent);font-weight:600}
.bt-goal-step[data-step=waiting]>.bt-goal-node{border-color:var(--bt-star);color:var(--bt-star);font-weight:600}
.bt-goal-step[data-sel]:not([aria-current])>.bt-goal-node{box-shadow:0 0 0 1.5px var(--bt-ink)}
.bt-goal-step.bt-goal-mini .bt-goal-node{font-size:0}
+.bt-goal-step.bt-goal-mini .bt-goal-node>svg{display:none}
/* The selected stage below the stepper. */
.bt-goal-bstage{display:flex;flex-direction:column;padding:4px 14px 14px;font-size:13px;line-height:18px;animation:bt-veil-in .22s ease-out backwards}
.bt-goal-bline{display:flex;align-items:baseline;gap:8px}
@@ -11100,6 +11109,8 @@ var SIDEBAR_CSS = `
.bt-agent-sub-row{display:flex;align-items:center;gap:8px;width:100%;padding:5px 10px 5px 8px;border:0;border-radius:8px;background:none;color:var(--bt-ink-2);font:inherit;font-size:13px;line-height:20px;text-align:left;cursor:pointer}
.bt-agent-sub-row:hover{background:var(--bt-hover);color:var(--bt-ink)}
.bt-agent-sub-row[aria-current=page]{background:var(--bt-hover);color:var(--bt-ink);font-weight:500}
+/* .bt-agent-sub-in clips for the expand animation and the rows touch its edges, so the ring goes inside. */
+.bt-agent-sub-row:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-agent-sub-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt-agent-sub-time{flex:none;font-size:11px;color:var(--bt-ink-3)}
.bt-agent-new{color:var(--bt-ink-3)}
@@ -12608,7 +12619,8 @@ var MODEL_CSS = `
.bt-model-none{padding:8px;font-size:13px;line-height:18px;color:var(--bt-ink-2)}
/* DSH centers the message column inside its scroll padding, which can sit a few px off this dock's center; the side shadows keep the band over the column's edges. */
.bt-model-dock{width:100%;max-width:var(--dsh-chat-content-width,748px);margin:0 auto;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0 0 10px;box-sizing:border-box;background:var(--bt-main);box-shadow:-12px 0 0 var(--bt-main),12px 0 0 var(--bt-main);animation:bt-model-in ${SPRING_POP.duration}ms ${SPRING_POP.easing} backwards}
-.bt-model-chips{display:flex;flex-wrap:wrap;gap:6px;margin-left:30px;max-width:min(560px,calc(100% - 30px));max-height:min(240px,36vh);max-height:min(240px,36dvh);overflow-y:auto;scrollbar-width:thin}
+/* The scroll box clips at its padding edge, so 3px of padding keeps the chips' focus rings visible; the negative margins cancel it so the chips stay in place. */
+.bt-model-chips{display:flex;flex-wrap:wrap;gap:6px;box-sizing:border-box;padding:3px;margin:-3px 0 -3px 27px;max-width:min(566px,calc(100% - 27px));max-height:min(246px,calc(36vh + 6px));max-height:min(246px,calc(36dvh + 6px));overflow-y:auto;scrollbar-width:thin}
.bt-model-choice-group{display:flex;flex-direction:column;gap:6px;width:100%;min-width:0}
.bt-model-choice-provider{padding-top:4px;font-size:12px;line-height:16px;font-weight:500;color:var(--bt-ink-2);overflow-wrap:anywhere}
.bt-model-choice-chips{display:flex;flex-wrap:wrap;gap:6px}
@@ -13968,6 +13980,7 @@ var AVATAR_LIBRARY_CSS = `
.bt-lib-del{position:absolute;right:0;top:0;width:28px;height:28px;padding:0;border:1px solid var(--bt-line-2);border-radius:50%;background:var(--bt-main);color:var(--bt-ink-2);display:flex;align-items:center;justify-content:center;cursor:pointer}
.bt-lib-del:hover{color:var(--bt-ink)}
.bt-lib-del svg{width:14px;height:14px}
+.bt-lib-pick:focus-visible,.bt-lib-del:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-lib-more{display:flex;align-items:center;gap:8px}
.bt-lib-report{display:flex;flex-direction:column;gap:4px}
`;
@@ -16907,7 +16920,10 @@ function UsagePage({ roster, actions, focusId }) {
var USAGE_CSS = `
.bt-us{--bt-us-ease:cubic-bezier(.22,1,.36,1);--bt-us-rest:color-mix(in srgb,var(--bt-ink) 30%,var(--bt-card));--bt-us-more:color-mix(in srgb,var(--bt-ink) 16%,var(--bt-card));display:flex;flex-direction:column;gap:14px;padding-bottom:4px}
.bt-us-top{position:relative;z-index:4;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
-.bt-us-tabs{position:relative;display:inline-flex;flex:none;padding:3px;border-radius:999px;background:var(--bt-hover)}
+/* Scrolls instead of running past the page when the column is narrower than the tabs. */
+.bt-us-tabs{position:relative;display:inline-flex;flex:none;max-width:100%;overflow-x:auto;scrollbar-width:none;padding:3px;border-radius:999px;background:var(--bt-hover)}
+.bt-us-tabs::-webkit-scrollbar{display:none}
+.bt-us-tabs button:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-us-tabs button{position:relative;z-index:1;display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 12px;border:0;border-radius:999px;background:none;color:var(--bt-ink-2);font:inherit;font-size:12px;line-height:26px;white-space:nowrap;cursor:pointer;transition:color .15s ease}
.bt-us-tabs button svg{flex:none;width:13px;height:13px;margin-left:-2px}
.bt-us-pick{position:absolute;top:calc(100% + 8px);left:0;max-width:100%;box-sizing:border-box;padding:14px 16px 12px;border-radius:18px;border:.5px solid var(--bt-line-2);background:var(--bt-card);box-shadow:0 22px 50px -18px rgba(0,0,0,.32),0 2px 8px rgba(0,0,0,.05);transform-origin:24px 0;animation:bt-us-drop .2s var(--bt-us-ease)}
@@ -17061,7 +17077,6 @@ button.bt-us-row:hover{background:var(--bt-hover)}
.bt-us-stat{padding:12px}
.bt-us-stat-value{font-size:19px;line-height:24px;white-space:normal;flex-wrap:wrap}
.bt-us-stat-main .bt-us-stat-value{font-size:26px;line-height:32px}
- .bt-us-tabs{max-width:100%;overflow-x:auto}
.bt-us-month{width:min(252px,100%)}
.bt-us-weekdays,.bt-us-days{grid-template-columns:repeat(7,minmax(0,1fr))}
.bt-us-pair{grid-template-columns:1fr}
@@ -17961,7 +17976,8 @@ var PROVIDERS_CSS = `
.bt-provider-form .bt-secret-field{min-height:36px;align-items:center;gap:8px}
.bt-provider-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bt-provider-models-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
-.bt-provider-found{max-height:180px;overflow-y:auto;scrollbar-width:thin}
+/* Room for the pills' focus rings inside the scroll box; the margin keeps them in line with the fields. */
+.bt-provider-found{max-height:180px;overflow-y:auto;scrollbar-width:thin;padding:3px;margin:-3px}
.bt-provider-found code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px}
.bt-provider-found .bt-secret-bot{padding:0 10px}
@media (prefers-reduced-motion:reduce){.bt-provider-add{animation:none}}
@@ -18086,7 +18102,7 @@ function GeneralPage({ roster, actions, run: run2 }) {
{ key: "new", title: t("New Bots") },
(0, import_react47.createElement)(
SetRow,
- { label: t("Default model") },
+ { label: t("Default model"), className: "bt-set-model" },
(0, import_react47.createElement)(ModelMenu, {
bot: { id: "new-bots", name: t("New Bots"), model: prefs.defaultBotModel },
roster,
@@ -20090,7 +20106,8 @@ var BROWSER_CSS = `
.bt-bcard{position:relative;border:.5px solid var(--bt-line-2);border-radius:12px;overflow:hidden;background:var(--bt-main);animation:bt-bcard-in .24s cubic-bezier(.16,1,.3,1) both;transition:border-color .12s ease,box-shadow .12s ease}
@keyframes bt-bcard-in{from{opacity:0;filter:blur(4px);transform:translateY(4px)}}
.bt-bcard[data-active]{border-color:var(--bt-accent,#4D6BFE);box-shadow:0 0 0 1px var(--bt-accent,#4D6BFE)}
-.bt-bcard-shot{position:relative;display:block;width:100%;aspect-ratio:16/10;border:0;background:var(--bt-hover);padding:0;cursor:pointer}
+.bt-bcard-shot{position:relative;display:block;width:100%;aspect-ratio:16/10;border:0;border-radius:12px 12px 0 0;background:var(--bt-hover);padding:0;cursor:pointer}
+.bt-bcard-shot:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-bcard-blank{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--bt-ink-3);font-size:12px}
.bt-bcard-blank svg{width:20px;height:20px}
.bt-bcard-preview{position:absolute;inset:0;display:flex;flex-direction:column;gap:6px;padding:14px 16px;text-align:left;background:linear-gradient(to bottom,var(--bt-main),var(--bt-hover));overflow:hidden}
diff --git a/ds-bot/src/client/avatar-library.js b/ds-bot/src/client/avatar-library.js
index 1281f99a..209f8c69 100644
--- a/ds-bot/src/client/avatar-library.js
+++ b/ds-bot/src/client/avatar-library.js
@@ -153,6 +153,7 @@ export const AVATAR_LIBRARY_CSS = `
.bt-lib-del{position:absolute;right:0;top:0;width:28px;height:28px;padding:0;border:1px solid var(--bt-line-2);border-radius:50%;background:var(--bt-main);color:var(--bt-ink-2);display:flex;align-items:center;justify-content:center;cursor:pointer}
.bt-lib-del:hover{color:var(--bt-ink)}
.bt-lib-del svg{width:14px;height:14px}
+.bt-lib-pick:focus-visible,.bt-lib-del:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-lib-more{display:flex;align-items:center;gap:8px}
.bt-lib-report{display:flex;flex-direction:column;gap:4px}
`
diff --git a/ds-bot/src/client/browser-pane.js b/ds-bot/src/client/browser-pane.js
index 2bebcf8d..e34d0224 100644
--- a/ds-bot/src/client/browser-pane.js
+++ b/ds-bot/src/client/browser-pane.js
@@ -807,7 +807,8 @@ export const BROWSER_CSS = `
.bt-bcard{position:relative;border:.5px solid var(--bt-line-2);border-radius:12px;overflow:hidden;background:var(--bt-main);animation:bt-bcard-in .24s cubic-bezier(.16,1,.3,1) both;transition:border-color .12s ease,box-shadow .12s ease}
@keyframes bt-bcard-in{from{opacity:0;filter:blur(4px);transform:translateY(4px)}}
.bt-bcard[data-active]{border-color:var(--bt-accent,#4D6BFE);box-shadow:0 0 0 1px var(--bt-accent,#4D6BFE)}
-.bt-bcard-shot{position:relative;display:block;width:100%;aspect-ratio:16/10;border:0;background:var(--bt-hover);padding:0;cursor:pointer}
+.bt-bcard-shot{position:relative;display:block;width:100%;aspect-ratio:16/10;border:0;border-radius:12px 12px 0 0;background:var(--bt-hover);padding:0;cursor:pointer}
+.bt-bcard-shot:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-bcard-blank{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--bt-ink-3);font-size:12px}
.bt-bcard-blank svg{width:20px;height:20px}
.bt-bcard-preview{position:absolute;inset:0;display:flex;flex-direction:column;gap:6px;padding:14px 16px;text-align:left;background:linear-gradient(to bottom,var(--bt-main),var(--bt-hover));overflow:hidden}
diff --git a/ds-bot/src/client/goal.js b/ds-bot/src/client/goal.js
index e9344c46..d64720f5 100644
--- a/ds-bot/src/client/goal.js
+++ b/ds-bot/src/client/goal.js
@@ -158,12 +158,13 @@ function GoalPanel({ goal, view, room, roster, actions, working }) {
const timer = setTimeout(() => setArmed(false), STOP_ARM_MS)
return () => clearTimeout(timer)
}, [armed])
- // Nodes under 14px drop their number so the stepper still fits.
+ // Nodes too narrow for their number (14px, or 17px for two digits) drop it so the stepper still fits.
const stepper = useRef(null)
useEffect(() => {
const box = stepper.current
if (box === null || typeof ResizeObserver !== 'function') return undefined
- const measure = () => box.querySelectorAll('.bt-goal-step').forEach(node => node.classList.toggle('bt-goal-mini', node.clientWidth < 14))
+ const min = view.stages.length >= 10 ? 17 : 14
+ const measure = () => box.querySelectorAll('.bt-goal-step').forEach(node => node.classList.toggle('bt-goal-mini', node.clientWidth < min))
const observer = new ResizeObserver(measure)
observer.observe(box)
measure()
@@ -353,12 +354,13 @@ export const GOAL_CSS = `
.bt-goal-step:first-child::before{left:50%}
.bt-goal-step:last-child::before{right:50%}
.bt-goal-node{position:relative;z-index:1;box-sizing:border-box;width:min(20px,100%);aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--bt-main);border:1.5px solid var(--bt-line-2);color:var(--bt-ink-3);font-size:10px;line-height:1;font-variant-numeric:tabular-nums}
-.bt-goal-node>svg{width:12px;height:12px}
+.bt-goal-node>svg{flex:none;width:min(12px,70%);height:auto}
.bt-goal-step[data-step=passed]>.bt-goal-node{background:var(--bt-green);border-color:var(--bt-green);color:var(--bt-main)}
.bt-goal-step[data-step=current]>.bt-goal-node{border-color:var(--bt-accent);color:var(--bt-accent);font-weight:600}
.bt-goal-step[data-step=waiting]>.bt-goal-node{border-color:var(--bt-star);color:var(--bt-star);font-weight:600}
.bt-goal-step[data-sel]:not([aria-current])>.bt-goal-node{box-shadow:0 0 0 1.5px var(--bt-ink)}
.bt-goal-step.bt-goal-mini .bt-goal-node{font-size:0}
+.bt-goal-step.bt-goal-mini .bt-goal-node>svg{display:none}
/* The selected stage below the stepper. */
.bt-goal-bstage{display:flex;flex-direction:column;padding:4px 14px 14px;font-size:13px;line-height:18px;animation:bt-veil-in .22s ease-out backwards}
.bt-goal-bline{display:flex;align-items:baseline;gap:8px}
diff --git a/ds-bot/src/client/model-menu.js b/ds-bot/src/client/model-menu.js
index 2d309ff3..9a8b4528 100644
--- a/ds-bot/src/client/model-menu.js
+++ b/ds-bot/src/client/model-menu.js
@@ -342,7 +342,8 @@ export const MODEL_CSS = `
.bt-model-none{padding:8px;font-size:13px;line-height:18px;color:var(--bt-ink-2)}
/* DSH centers the message column inside its scroll padding, which can sit a few px off this dock's center; the side shadows keep the band over the column's edges. */
.bt-model-dock{width:100%;max-width:var(--dsh-chat-content-width,748px);margin:0 auto;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0 0 10px;box-sizing:border-box;background:var(--bt-main);box-shadow:-12px 0 0 var(--bt-main),12px 0 0 var(--bt-main);animation:bt-model-in ${SPRING_POP.duration}ms ${SPRING_POP.easing} backwards}
-.bt-model-chips{display:flex;flex-wrap:wrap;gap:6px;margin-left:30px;max-width:min(560px,calc(100% - 30px));max-height:min(240px,36vh);max-height:min(240px,36dvh);overflow-y:auto;scrollbar-width:thin}
+/* The scroll box clips at its padding edge, so 3px of padding keeps the chips' focus rings visible; the negative margins cancel it so the chips stay in place. */
+.bt-model-chips{display:flex;flex-wrap:wrap;gap:6px;box-sizing:border-box;padding:3px;margin:-3px 0 -3px 27px;max-width:min(566px,calc(100% - 27px));max-height:min(246px,calc(36vh + 6px));max-height:min(246px,calc(36dvh + 6px));overflow-y:auto;scrollbar-width:thin}
.bt-model-choice-group{display:flex;flex-direction:column;gap:6px;width:100%;min-width:0}
.bt-model-choice-provider{padding-top:4px;font-size:12px;line-height:16px;font-weight:500;color:var(--bt-ink-2);overflow-wrap:anywhere}
.bt-model-choice-chips{display:flex;flex-wrap:wrap;gap:6px}
diff --git a/ds-bot/src/client/providers-page.js b/ds-bot/src/client/providers-page.js
index a3f8bc8d..adf3565e 100644
--- a/ds-bot/src/client/providers-page.js
+++ b/ds-bot/src/client/providers-page.js
@@ -188,7 +188,8 @@ export const PROVIDERS_CSS = `
.bt-provider-form .bt-secret-field{min-height:36px;align-items:center;gap:8px}
.bt-provider-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bt-provider-models-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
-.bt-provider-found{max-height:180px;overflow-y:auto;scrollbar-width:thin}
+/* Room for the pills' focus rings inside the scroll box; the margin keeps them in line with the fields. */
+.bt-provider-found{max-height:180px;overflow-y:auto;scrollbar-width:thin;padding:3px;margin:-3px}
.bt-provider-found code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px}
.bt-provider-found .bt-secret-bot{padding:0 10px}
@media (prefers-reduced-motion:reduce){.bt-provider-add{animation:none}}
diff --git a/ds-bot/src/client/settings.js b/ds-bot/src/client/settings.js
index 50e37262..4febdb81 100644
--- a/ds-bot/src/client/settings.js
+++ b/ds-bot/src/client/settings.js
@@ -108,7 +108,7 @@ function GeneralPage({ roster, actions, run }) {
h(SetRow, { label: t('Bubble width') }, h(WidthSlider, { label: t('Bubble width'), value: widthOf(prefs), save: width => run(actions.setPrefs({ width })) })),
h(SetRow, { label: t('Show thinking') }, h(Switch, { label: t('Show thinking'), on: thinkingShown(prefs), onChange: thinking => run(actions.setPrefs({ thinking })) }))),
h(SetSection, { key: 'new', title: t('New Bots') },
- h(SetRow, { label: t('Default model') },
+ h(SetRow, { label: t('Default model'), className: 'bt-set-model' },
h(ModelMenu, {
bot: { id: 'new-bots', name: t('New Bots'), model: prefs.defaultBotModel },
roster, actions, run, wide: true, withEfforts: false,
diff --git a/ds-bot/src/client/sidebar.js b/ds-bot/src/client/sidebar.js
index 32a79fb4..24c3b9e7 100644
--- a/ds-bot/src/client/sidebar.js
+++ b/ds-bot/src/client/sidebar.js
@@ -1041,6 +1041,8 @@ export const SIDEBAR_CSS = `
.bt-agent-sub-row{display:flex;align-items:center;gap:8px;width:100%;padding:5px 10px 5px 8px;border:0;border-radius:8px;background:none;color:var(--bt-ink-2);font:inherit;font-size:13px;line-height:20px;text-align:left;cursor:pointer}
.bt-agent-sub-row:hover{background:var(--bt-hover);color:var(--bt-ink)}
.bt-agent-sub-row[aria-current=page]{background:var(--bt-hover);color:var(--bt-ink);font-weight:500}
+/* .bt-agent-sub-in clips for the expand animation and the rows touch its edges, so the ring goes inside. */
+.bt-agent-sub-row:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-agent-sub-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt-agent-sub-time{flex:none;font-size:11px;color:var(--bt-ink-3)}
.bt-agent-new{color:var(--bt-ink-3)}
diff --git a/ds-bot/src/client/styles.js b/ds-bot/src/client/styles.js
index 484cb475..30211ba0 100644
--- a/ds-bot/src/client/styles.js
+++ b/ds-bot/src/client/styles.js
@@ -139,6 +139,8 @@ body[data-bt-motion=quiet] .bt-mark[data-poke]{cursor:default}
.bt-row{display:flex;align-items:center;gap:8px;min-height:54px;padding:8px;border:0;border-radius:12px;background:transparent;color:var(--bt-ink);text-align:left;cursor:pointer;width:100%;box-sizing:border-box;font-family:inherit;transition:background-color .12s ease}
.bt-row:hover{background:var(--bt-hover)}
.bt-row[aria-current=page]{background:var(--bt-active)}
+/* Inset: the .bt-list scroll box clips anything drawn outside the row. */
+.bt-row:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-row[aria-current=page] .bt-row-name{font-weight:500}
.bt-row-body{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.bt-row-name{display:flex;align-items:center;gap:6px;min-width:0;font-size:14px;line-height:20px;font-weight:400}
@@ -560,6 +562,8 @@ button.bt-set-row:hover{background:var(--bt-hover)}
.bt-set-hint{font-size:12px;line-height:16px;color:color-mix(in srgb,var(--bt-ink-2) 50%,var(--bt-ink-3))}
.bt-set-control{flex:none;display:flex;align-items:center;gap:6px}
.bt-set-places .bt-set-control{flex:0 1 auto;max-width:50%;min-width:0}
+/* Shrinkable, so a long model name gets its ellipsis instead of pushing Reset out of the card. */
+.bt-set-model .bt-set-control{flex:0 1 auto;min-width:0;max-width:65%}
.bt-set-places .bt-set-hint{overflow-wrap:anywhere}
.bt-set-value{font-size:13px;color:var(--bt-ink-2);text-align:right}
.bt-set-bot{flex:1;display:flex;align-items:center;gap:8px;min-width:0}
@@ -665,7 +669,9 @@ html:not([data-windows-titlebar]) [class*="_footArea"],:not([class*="_collapsed"
.bt-msg-line{position:relative;display:flex;align-items:flex-end;gap:8px;max-width:100%}
.bt-msg-line>.bt-bubble{max-width:none;min-width:0}
/* The same bubble width as beside an avatar column: the share of (100% - 30px), plus the 30px. */
-.bt-astack[data-lead]>.bt-msg{max-width:min(calc(var(--bt-msg-w) * (100% - 30px) + 30px),calc(100% - 52px))}
+.bt-astack[data-lead]>.bt-msg{max-width:min(calc(var(--bt-msg-w) * (100% - 30px) + 30px),calc(100% - 82px))}
+/* The indent of earlier rows comes out of their line, so their toolbar keeps its 82px too. */
+.bt-astack[data-lead]>.bt-msg:not(:last-child)>.bt-msg-line{max-width:calc(100% - 30px)}
.bt-tools{position:absolute;bottom:0;z-index:0;left:100%;margin-left:6px;display:flex;gap:2px;opacity:0;visibility:hidden;transition:opacity .12s ease,visibility .12s}
/* The hover bridge spans only the 6px gap (plus a little overlap) between the
bubble's edge and the toolbar: wider, it sits over the bubble's tail and
@@ -940,6 +946,7 @@ body[data-ds-dark-theme] .bt-theme-chip i{background:var(--da)}
.bt-settings-scroll{overflow-x:clip}
.bt-set-row{flex-direction:column;align-items:stretch;gap:8px}
.bt-set-row>.bt-set-copy{width:100%}
+ .bt-set-model .bt-set-control{max-width:none}
.bt-avedit{width:min(300px,calc(100vw - 32px))}
.bt-shape-row{grid-template-columns:repeat(4,1fr)}
}
diff --git a/ds-bot/src/client/usage-page.js b/ds-bot/src/client/usage-page.js
index 0d705b24..13afcd0e 100644
--- a/ds-bot/src/client/usage-page.js
+++ b/ds-bot/src/client/usage-page.js
@@ -594,7 +594,10 @@ export function UsagePage({ roster, actions, focusId }) {
export const USAGE_CSS = `
.bt-us{--bt-us-ease:cubic-bezier(.22,1,.36,1);--bt-us-rest:color-mix(in srgb,var(--bt-ink) 30%,var(--bt-card));--bt-us-more:color-mix(in srgb,var(--bt-ink) 16%,var(--bt-card));display:flex;flex-direction:column;gap:14px;padding-bottom:4px}
.bt-us-top{position:relative;z-index:4;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
-.bt-us-tabs{position:relative;display:inline-flex;flex:none;padding:3px;border-radius:999px;background:var(--bt-hover)}
+/* Scrolls instead of running past the page when the column is narrower than the tabs. */
+.bt-us-tabs{position:relative;display:inline-flex;flex:none;max-width:100%;overflow-x:auto;scrollbar-width:none;padding:3px;border-radius:999px;background:var(--bt-hover)}
+.bt-us-tabs::-webkit-scrollbar{display:none}
+.bt-us-tabs button:focus-visible{outline:2px solid var(--bt-accent);outline-offset:-2px}
.bt-us-tabs button{position:relative;z-index:1;display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 12px;border:0;border-radius:999px;background:none;color:var(--bt-ink-2);font:inherit;font-size:12px;line-height:26px;white-space:nowrap;cursor:pointer;transition:color .15s ease}
.bt-us-tabs button svg{flex:none;width:13px;height:13px;margin-left:-2px}
.bt-us-pick{position:absolute;top:calc(100% + 8px);left:0;max-width:100%;box-sizing:border-box;padding:14px 16px 12px;border-radius:18px;border:.5px solid var(--bt-line-2);background:var(--bt-card);box-shadow:0 22px 50px -18px rgba(0,0,0,.32),0 2px 8px rgba(0,0,0,.05);transform-origin:24px 0;animation:bt-us-drop .2s var(--bt-us-ease)}
@@ -748,7 +751,6 @@ button.bt-us-row:hover{background:var(--bt-hover)}
.bt-us-stat{padding:12px}
.bt-us-stat-value{font-size:19px;line-height:24px;white-space:normal;flex-wrap:wrap}
.bt-us-stat-main .bt-us-stat-value{font-size:26px;line-height:32px}
- .bt-us-tabs{max-width:100%;overflow-x:auto}
.bt-us-month{width:min(252px,100%)}
.bt-us-weekdays,.bt-us-days{grid-template-columns:repeat(7,minmax(0,1fr))}
.bt-us-pair{grid-template-columns:1fr}