Skip to content

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

Hold the switch window for the fullscreen slide

Fei241106a066e55459
diff --git a/ds-bot/client.js b/ds-bot/client.js
index 2057b5f0..e736d384 100644
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@ -17012,13 +17012,7 @@ function apply(ctx) {
const sidebar = ctx.get("sidebarRight");
if (!sidebar) return void 0;
let open = rightColumnOpen(document);
- const switchWindow = createSwitchWindow((done) => {
- const timer = setTimeout(done, 400);
- requestAnimationFrame(() => requestAnimationFrame(() => {
- clearTimeout(timer);
- done();
- }));
- });
+ const switchWindow = createSwitchWindow((done) => setTimeout(done, 400));
const collapseColumn = () => {
try {
if (sidebar.isExpanded()) sidebar.toggleExpanded();
diff --git a/ds-bot/src/client/index.js b/ds-bot/src/client/index.js
index 7468e032..648b253f 100644
--- a/ds-bot/src/client/index.js
+++ b/ds-bot/src/client/index.js
@@ -655,12 +655,8 @@ export function apply(ctx) {
const sidebar = ctx.get('sidebarRight')
if (!sidebar) return undefined
let open = rightColumnOpen(document)
- // Two frames settle the switch's DOM; the fullscreen slide is slower, so a
- // ~400 ms timer covers it and still ends the window where frames stall.
- const switchWindow = createSwitchWindow((done) => {
- const timer = setTimeout(done, 400)
- requestAnimationFrame(() => requestAnimationFrame(() => { clearTimeout(timer); done() }))
- })
+ // Long enough for a fullscreen panel's slide, which reports only once it ends.
+ const switchWindow = createSwitchWindow(done => setTimeout(done, 400))
const collapseColumn = () => {
try {
if (sidebar.isExpanded()) sidebar.toggleExpanded()
diff --git a/ds-bot/src/client/right-panel.js b/ds-bot/src/client/right-panel.js
index 4bf91987..42b318df 100644
--- a/ds-bot/src/client/right-panel.js
+++ b/ds-bot/src/client/right-panel.js
@@ -35,8 +35,7 @@ export function columnOpened(drawerOpen, moved) {
// whose store is not minted yet opens in a passive effect, and a fullscreen
// panel reports only after its slide, so the attribute flip can land several
// batches later. The switch is therefore a timed window, not the next DOM
-// batch — `settle(done)` calls `done` once the switch settled (two frames, with
-// a timer for the slide and for hidden tabs whose frames do not run). A newer
+// batch — `settle(done)` calls `done` once the switch settled. A newer
// `moved()` restarts the window; a stale settle is ignored.
export function createSwitchWindow(settle) {
let token = null