Skip to content

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

fix(client): wrap view segments and media at phone widths

Fei2411c881b4f778ee
diff --git a/ds-bot/client.js b/ds-bot/client.js
index cc54a653..5ec9e019 100644
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@ -2605,6 +2605,7 @@ body{--bt-msg-w:.8;--bt-flat-w:1}
.bt-bubble [class*="_markdown"] li::marker{color:var(--bt-ink-2)}
/* line-height:1 keeps the monospace line box from making an inline code line taller. */
.bt-bubble [class*="_markdown"] :not(pre)>code{line-height:1;-webkit-box-decoration-break:clone;box-decoration-break:clone}
+.bt-bubble :is(img,video),.bt-ububble :is(img,video),[data-chat-flow] [class*="_bubble"] :is(img,video){max-width:100%;height:auto}
.bt-bubble a[href^="${MENTION_ORIGIN}"]{text-decoration:none;font-weight:400;cursor:pointer;white-space:nowrap}
.bt-bubble a[href^="${MENTION_ORIGIN}"]::before{content:"";display:inline-block;width:16px;height:16px;margin-right:3px;vertical-align:-3px;background:currentColor;-webkit-mask:${DEFAULT_MASK} center/contain no-repeat;mask:${DEFAULT_MASK} center/contain no-repeat}
.bt-group-msg{display:flex;flex-direction:column;gap:4px;margin:16px 0 0}
@@ -6809,6 +6810,11 @@ body{
.bt-q-inline .dv-q{margin:0;max-width:min(550px,86%);order:0}
body[data-bt-layout=flat] .bt-q-inline .dv-view{max-width:calc(var(--bt-flat-w,1) * 100%)}
.bt-q-inline:has(>.dv-view-bare){margin:8px 0 12px}
+/* A row of segmented options is only as wide as its labels; at phone widths a
+ few longer ones would spill past the card. Let them wrap and let a label wrap
+ inside its own button instead. */
+.dv-seg.dv-view-seg{flex-wrap:wrap}
+.dv-seg.dv-view-seg button{flex:0 1 auto;height:auto;min-height:30px;min-width:0;padding-block:5px;white-space:normal;overflow-wrap:anywhere}
`;
// src/client/secret-card.js
diff --git a/ds-bot/src/client/styles.js b/ds-bot/src/client/styles.js
index eac6ea54..277249bd 100644
--- a/ds-bot/src/client/styles.js
+++ b/ds-bot/src/client/styles.js
@@ -215,6 +215,7 @@ body{--bt-msg-w:.8;--bt-flat-w:1}
.bt-bubble [class*="_markdown"] li::marker{color:var(--bt-ink-2)}
/* line-height:1 keeps the monospace line box from making an inline code line taller. */
.bt-bubble [class*="_markdown"] :not(pre)>code{line-height:1;-webkit-box-decoration-break:clone;box-decoration-break:clone}
+.bt-bubble :is(img,video),.bt-ububble :is(img,video),[data-chat-flow] [class*="_bubble"] :is(img,video){max-width:100%;height:auto}
.bt-bubble a[href^="${MENTION_ORIGIN}"]{text-decoration:none;font-weight:400;cursor:pointer;white-space:nowrap}
.bt-bubble a[href^="${MENTION_ORIGIN}"]::before{content:"";display:inline-block;width:16px;height:16px;margin-right:3px;vertical-align:-3px;background:currentColor;-webkit-mask:${DEFAULT_MASK} center/contain no-repeat;mask:${DEFAULT_MASK} center/contain no-repeat}
.bt-group-msg{display:flex;flex-direction:column;gap:4px;margin:16px 0 0}
diff --git a/ds-bot/src/client/widget-cell.js b/ds-bot/src/client/widget-cell.js
index 00e913f6..2cabeb11 100644
--- a/ds-bot/src/client/widget-cell.js
+++ b/ds-bot/src/client/widget-cell.js
@@ -129,4 +129,9 @@ body{
.bt-q-inline .dv-q{margin:0;max-width:min(550px,86%);order:0}
body[data-bt-layout=flat] .bt-q-inline .dv-view{max-width:calc(var(--bt-flat-w,1) * 100%)}
.bt-q-inline:has(>.dv-view-bare){margin:8px 0 12px}
+/* A row of segmented options is only as wide as its labels; at phone widths a
+ few longer ones would spill past the card. Let them wrap and let a label wrap
+ inside its own button instead. */
+.dv-seg.dv-view-seg{flex-wrap:wrap}
+.dv-seg.dv-view-seg button{flex:0 1 auto;height:auto;min-height:30px;min-width:0;padding-block:5px;white-space:normal;overflow-wrap:anywhere}
`