Skip to content

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

Default remount to the last reconciled surface

Fei2411e103cf517648
diff --git a/ds-bot/client.js b/ds-bot/client.js
index 67f496c6..0f687d17 100644
--- a/ds-bot/client.js
+++ b/ds-bot/client.js
@@ -10095,8 +10095,10 @@ function surfaceGroups(install, { onError } = {}) {
return false;
}
};
+ let lastWanted = {};
const api = {
reconcile(wanted) {
+ lastWanted = wanted;
for (const group of [...GROUPS].reverse()) if (!wanted[group]) withdraw(group);
for (const group of GROUPS) {
if (!wanted[group] || mounted[group].length > 0) continue;
@@ -10110,7 +10112,7 @@ function surfaceGroups(install, { onError } = {}) {
// `mounted`. Groups that lean on it (the conversation on the shell's
// styles) come off first and go back only through the reconcile — a
// failed remount never leaves one stranded.
- remount(group, wanted = {}) {
+ remount(group, wanted = lastWanted) {
if (!GROUPS.includes(group)) return;
for (const later of GROUPS.slice(GROUPS.indexOf(group) + 1)) withdraw(later);
withdraw(group);
@@ -19601,7 +19603,7 @@ function apply(ctx) {
if (verifyAttempts >= 3) return;
verifyAttempts += 1;
console.warn("[ds-bot] sidebar entry missing after shell mount; remounting");
- groups.remount("shell", groupsFor(surface.getSnapshot()));
+ groups.remount("shell");
verifyTimer = setTimeout(verifySidebar, 250);
};
const reconcile = () => {
diff --git a/ds-bot/src/client/index.js b/ds-bot/src/client/index.js
index 4e8897b1..13b31576 100644
--- a/ds-bot/src/client/index.js
+++ b/ds-bot/src/client/index.js
@@ -948,7 +948,7 @@ export function apply(ctx) {
if (verifyAttempts >= 3) return
verifyAttempts += 1
console.warn('[ds-bot] sidebar entry missing after shell mount; remounting')
- groups.remount('shell', groupsFor(surface.getSnapshot()))
+ groups.remount('shell')
verifyTimer = setTimeout(verifySidebar, 250)
}
const reconcile = () => {
diff --git a/ds-bot/src/client/surface.js b/ds-bot/src/client/surface.js
index 6e175ced..f3f3b742 100644
--- a/ds-bot/src/client/surface.js
+++ b/ds-bot/src/client/surface.js
@@ -46,8 +46,10 @@ export function surfaceGroups(install, { onError } = {}) {
return false
}
}
+ let lastWanted = {}
const api = {
reconcile(wanted) {
+ lastWanted = wanted
for (const group of [...GROUPS].reverse()) if (!wanted[group]) withdraw(group)
for (const group of GROUPS) {
if (!wanted[group] || mounted[group].length > 0) continue
@@ -61,7 +63,7 @@ export function surfaceGroups(install, { onError } = {}) {
// `mounted`. Groups that lean on it (the conversation on the shell's
// styles) come off first and go back only through the reconcile — a
// failed remount never leaves one stranded.
- remount(group, wanted = {}) {
+ remount(group, wanted = lastWanted) {
if (!GROUPS.includes(group)) return
for (const later of GROUPS.slice(GROUPS.indexOf(group) + 1)) withdraw(later)
withdraw(group)