Skip to content

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

Keep the tools toolbar in its own stacking context

klarkxy310d57ccb71b
diff --git a/ds-bot/client.js b/ds-bot/client.js
index afdb07af..7b7b1ce3 100644
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@ -3055,10 +3055,12 @@ html:not([data-windows-titlebar]) [class*="_footArea"],:not([class*="_collapsed"
.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-tools{position:absolute;bottom:0;left:100%;margin-left:6px;display:flex;gap:2px;opacity:0;visibility:hidden;transition:opacity .12s ease,visibility .12s}
+.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
- blocks text selection and link clicks there. */
+ blocks text selection and link clicks there. Its z-index:-1 only stays under
+ the toolbar, not under the full-width .bt-astack, because z-index:0 above
+ gives the toolbar its own stacking context. */
.bt-tools::after{content:"";position:absolute;top:-8px;bottom:-8px;right:100%;width:10px;z-index:-1}
.bt-msg:hover>.bt-msg-line>.bt-tools,.bt-msg:focus-within>.bt-msg-line>.bt-tools,.bt-tools[data-open]{opacity:1;visibility:visible}
/* The flat layout: a Bot's text has no bubble and takes its own share of the column
diff --git a/ds-bot/src/client/styles.js b/ds-bot/src/client/styles.js
index ee6bf549..72245dbc 100644
--- a/ds-bot/src/client/styles.js
+++ b/ds-bot/src/client/styles.js
@@ -663,10 +663,12 @@ html:not([data-windows-titlebar]) [class*="_footArea"],:not([class*="_collapsed"
.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-tools{position:absolute;bottom:0;left:100%;margin-left:6px;display:flex;gap:2px;opacity:0;visibility:hidden;transition:opacity .12s ease,visibility .12s}
+.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
- blocks text selection and link clicks there. */
+ blocks text selection and link clicks there. Its z-index:-1 only stays under
+ the toolbar, not under the full-width .bt-astack, because z-index:0 above
+ gives the toolbar its own stacking context. */
.bt-tools::after{content:"";position:absolute;top:-8px;bottom:-8px;right:100%;width:10px;z-index:-1}
.bt-msg:hover>.bt-msg-line>.bt-tools,.bt-msg:focus-within>.bt-msg-line>.bt-tools,.bt-tools[data-open]{opacity:1;visibility:visible}
/* The flat layout: a Bot's text has no bubble and takes its own share of the column
diff --git a/ds-bot/test/styles.test.js b/ds-bot/test/styles.test.js
index fb1c2ff8..39a48178 100644
--- a/ds-bot/test/styles.test.js
+++ b/ds-bot/test/styles.test.js
@@ -176,3 +176,12 @@ test('message tools anchor to the bottom of a long reply in both layouts', () =>
assert.match(css, /body\[data-bt-layout=flat\] \.bt-tools\{bottom:-14px;/)
assert.doesNotMatch(css, /\.bt-tools\{position:absolute;top:50%;/)
})
+
+test('the tools toolbar keeps its own stacking context for the hover bridge', () => {
+ const css = readFileSync(new URL('../src/client/styles.js', import.meta.url), 'utf8')
+ // Without a stacking context on .bt-tools, the ::after bridge's z-index:-1
+ // sinks behind the full-width .bt-astack and the toolbar flickers when the
+ // pointer crosses the gap.
+ assert.match(css, /\.bt-tools\{position:absolute;bottom:0;z-index:0;/)
+ assert.match(css, /\.bt-tools::after\{[^}]*z-index:-1/)
+})