Skip to content

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

Space out the collapsed sidebar rail

klarkxy0e7de956119a
diff --git a/ds-bot/client.js b/ds-bot/client.js
index 24d0962b..a3ee81a3 100644
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@ -2555,16 +2555,18 @@ html[data-bt-collapsing] [class*="_frame"]:has(>[class*="_sidebarCol"]){transiti
.bt-leftcol[data-left=drawer]{background:var(--bt-sidebar);box-shadow:8px 0 24px rgba(0,0,0,.14)}
.bt-leftcol>.bt-side{width:100%}
.bt-leftcol-foot{display:flex;align-items:center;gap:9px;padding-top:8px;flex:none}
-.bt-rail{align-items:center;padding:0}
+.bt-rail{align-items:center;gap:6px;padding:0}
.bt-rail .bt-row{justify-content:center;width:56px;height:56px;min-height:56px;padding:0;border-radius:16px}
-.bt-rail-top{display:flex;flex-direction:column;align-items:center;gap:6px;padding-bottom:8px}
+.bt-rail-top{display:flex;flex-direction:column;align-items:center;gap:8px;padding-bottom:8px}
.bt-rail-sep{width:24px;height:1px;flex:none;background:var(--bt-line)}
.bt-rail .bt-agent-ava{width:44px;height:44px}
-.bt-rail .bt-list{align-self:stretch;align-items:center;gap:4px}
+/* Icon rows breathe the way the open column's rows do: 8px of gap puts ~20px
+ between avatar edges, the open list's 19px (8px padding + 3px gap + 8px). */
+.bt-rail .bt-list{align-self:stretch;align-items:center;gap:8px}
/* The rail's list spans the whole column: the badges and dots that sit on a row's
edge need room beside the 56px rows, or the list scrolls sideways. */
.bt-leftcol[data-left=rail]{padding:calc(var(--bt-lc-clear) + 8px) 0 8px}
-.bt-leftcol-foot-rail{flex-direction:column;gap:6px}
+.bt-leftcol-foot-rail{flex-direction:column;gap:8px}
/* A drag that crosses the rail's snap line rides the spring to its target: the
content is pinned at the target size so only the column's edge moves. */
.bt-leftcol[data-folding]{overflow:hidden;transition:width ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}
diff --git a/ds-bot/src/client/styles.js b/ds-bot/src/client/styles.js
index 324919f8..e24cf76e 100644
--- a/ds-bot/src/client/styles.js
+++ b/ds-bot/src/client/styles.js
@@ -162,16 +162,18 @@ html[data-bt-collapsing] [class*="_frame"]:has(>[class*="_sidebarCol"]){transiti
.bt-leftcol[data-left=drawer]{background:var(--bt-sidebar);box-shadow:8px 0 24px rgba(0,0,0,.14)}
.bt-leftcol>.bt-side{width:100%}
.bt-leftcol-foot{display:flex;align-items:center;gap:9px;padding-top:8px;flex:none}
-.bt-rail{align-items:center;padding:0}
+.bt-rail{align-items:center;gap:6px;padding:0}
.bt-rail .bt-row{justify-content:center;width:56px;height:56px;min-height:56px;padding:0;border-radius:16px}
-.bt-rail-top{display:flex;flex-direction:column;align-items:center;gap:6px;padding-bottom:8px}
+.bt-rail-top{display:flex;flex-direction:column;align-items:center;gap:8px;padding-bottom:8px}
.bt-rail-sep{width:24px;height:1px;flex:none;background:var(--bt-line)}
.bt-rail .bt-agent-ava{width:44px;height:44px}
-.bt-rail .bt-list{align-self:stretch;align-items:center;gap:4px}
+/* Icon rows breathe the way the open column's rows do: 8px of gap puts ~20px
+ between avatar edges, the open list's 19px (8px padding + 3px gap + 8px). */
+.bt-rail .bt-list{align-self:stretch;align-items:center;gap:8px}
/* The rail's list spans the whole column: the badges and dots that sit on a row's
edge need room beside the 56px rows, or the list scrolls sideways. */
.bt-leftcol[data-left=rail]{padding:calc(var(--bt-lc-clear) + 8px) 0 8px}
-.bt-leftcol-foot-rail{flex-direction:column;gap:6px}
+.bt-leftcol-foot-rail{flex-direction:column;gap:8px}
/* A drag that crosses the rail's snap line rides the spring to its target: the
content is pinned at the target size so only the column's edge moves. */
.bt-leftcol[data-folding]{overflow:hidden;transition:width ${SPRING_SHAPE.duration}ms ${SPRING_SHAPE.easing}}
diff --git a/ds-bot/test/sidebar-switch.test.js b/ds-bot/test/sidebar-switch.test.js
index 0c05300a..abb26bbb 100644
--- a/ds-bot/test/sidebar-switch.test.js
+++ b/ds-bot/test/sidebar-switch.test.js
@@ -429,6 +429,18 @@ test('the Bot footer lays out the account, another plugin\'s entry and the setti
assert.equal(columnOf(document.querySelector('.x_settingsArea')), '3')
})
+// 公开#502: the rail's icons keep the open column's rhythm — its row gap puts
+// the same ~20px between avatar edges that the open list's padding and gap do,
+// and the stacks and sections breathe on the same 6–8px steps.
+test('the rail spaces its icons on the open column\'s rhythm', () => {
+ const all = [...rulesOf(SHELL_CSS), ...rulesOf(SIDEBAR_CSS)]
+ const bodyOf = selector => all.filter(rule => rule.selector === selector).map(rule => rule.body).pop() ?? ''
+ assert.match(bodyOf('.bt-rail .bt-list'), /(^|;)gap:8px/)
+ assert.match(bodyOf('.bt-rail-top'), /(^|;)gap:8px/)
+ assert.match(bodyOf('.bt-leftcol-foot-rail'), /(^|;)gap:8px/)
+ assert.match(bodyOf('.bt-rail'), /(^|;)gap:6px/)
+})
+
// #452: the Connect plugins button left the footer; what DS Bot puts there is
// the account menu and the way back from Agent mode.
test('the Bot footer holds the account and the return button only', () => {