Skip to content

Commit 81fb7e6

Browse files
authored
improve(ui): fold the sidebar update action into the Inbox (#129977)
* improve(ui): fold the sidebar update action into the Inbox The footer update circle duplicated the Inbox's update entry: same attention state, same dismissal, one extra permanently-tinted control plus layout shims reserving space for it. The update now surfaces only as an Inbox entry — badge for attention, full action row (update, hold, review, dismiss-until-restart) in the panel. Deletes the footer button, its hover-dismiss, sidebar-footer-update.css, and the 80px/88px width compensations; moves the floating-cluster rules to sidebar-attention-floating.css and the build-chip text rules next to their base class in layout.css. Removes the dead startSidebarUpdateAttention shortcut and two orphaned i18n keys. * fix(ui): integrate #129920 top-left alignment with the Inbox-only footer Ports the web-chrome floating-cluster geometry to sidebar-attention-floating.css and points the titlebar alignment test at the always-present Inbox button; the update no longer changes footer geometry, so its scenario plumbing goes.
1 parent e05dae2 commit 81fb7e6

16 files changed

Lines changed: 98 additions & 439 deletions

‎ui/config/control-ui-boot-modules.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@
995995
"src/agents/tools/automations-tool-name.ts",
996996
"src/auto-reply/commands-args.ts",
997997
"src/auto-reply/commands-registry.shared.ts",
998+
"src/auto-reply/heartbeat.ts",
998999
"src/auto-reply/reply/delivery-hints.ts",
9991000
"src/auto-reply/reply/inbound-context-marker.ts",
10001001
"src/auto-reply/reply/queue/normalize.ts",
@@ -1251,6 +1252,7 @@
12511252
"ui/src/components/session-icon-picker.ts",
12521253
"ui/src/components/session-leading-indicator.ts",
12531254
"ui/src/components/session-menu-access.ts",
1255+
"ui/src/components/session-menu-actions.ts",
12541256
"ui/src/components/session-menu-compact.ts",
12551257
"ui/src/components/session-menu-options.ts",
12561258
"ui/src/components/session-menu-work.ts",
@@ -1269,7 +1271,9 @@
12691271
"ui/src/components/settings-ui.ts",
12701272
"ui/src/components/sidebar-agent-card.ts",
12711273
"ui/src/components/sidebar-attention-dismissals.ts",
1274+
"ui/src/components/sidebar-attention-entries.ts",
12721275
"ui/src/components/sidebar-attention-items.ts",
1276+
"ui/src/components/sidebar-attention-update.ts",
12731277
"ui/src/components/sidebar-attention.ts",
12741278
"ui/src/components/sidebar-build-chip-format.ts",
12751279
"ui/src/components/sidebar-build-chip.ts",
@@ -1552,6 +1556,7 @@
15521556
"ui/src/pages/chat/chat-thread-items.ts",
15531557
"ui/src/pages/chat/chat-thread-run-identity.ts",
15541558
"ui/src/pages/chat/chat-thread.ts",
1559+
"ui/src/pages/chat/chat-tool-activity-coalesce.ts",
15551560
"ui/src/pages/chat/chat-turn-boundary.ts",
15561561
"ui/src/pages/chat/chat-typing-presence.ts",
15571562
"ui/src/pages/chat/chat-view-notices.ts",
@@ -1560,6 +1565,7 @@
15601565
"ui/src/pages/chat/chat-viewer-presence.ts",
15611566
"ui/src/pages/chat/components/chat-agent-run-frame.ts",
15621567
"ui/src/pages/chat/components/chat-attachment-admission.ts",
1568+
"ui/src/pages/chat/components/chat-attachment-file.ts",
15631569
"ui/src/pages/chat/components/chat-attachment-href.ts",
15641570
"ui/src/pages/chat/components/chat-attachments.ts",
15651571
"ui/src/pages/chat/components/chat-audio-coordinator.ts",
@@ -1659,6 +1665,7 @@
16591665
"ui/src/pages/chat/components/widget-export.ts",
16601666
"ui/src/pages/chat/composer-capability-catalog.ts",
16611667
"ui/src/pages/chat/composer-dictation.ts",
1668+
"ui/src/pages/chat/composer-microphone-picker.ts",
16621669
"ui/src/pages/chat/composer-persistence.ts",
16631670
"ui/src/pages/chat/connect-error.ts",
16641671
"ui/src/pages/chat/continue-in-terminal-command.ts",
@@ -1764,5 +1771,5 @@
17641771
"ui/src/pages/worktrees/route.ts",
17651772
"ui/src/styles/chat.css",
17661773
"ui/src/styles/lobster-pet.css",
1767-
"ui/src/styles/sidebar-footer-update.css"
1774+
"ui/src/styles/sidebar-attention-floating.css"
17681775
]

‎ui/src/components/sidebar-attention-layout.browser.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { afterEach, describe, expect, it } from "vitest";
22
import "../test-helpers/load-styles.ts";
33
import "../styles/hub-tabs.css";
4-
import "../styles/sidebar-footer-update.css";
4+
import "../styles/sidebar-attention-floating.css";
55
import "../styles/sidebar-issues.css";
66
import "./web-awesome-tabs.ts";
77
// Upgrade the real element: the floating layout once regressed because a base

‎ui/src/components/sidebar-attention-update.ts‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import type { ApplicationContext } from "../app/context.ts";
2-
import { hasNativeUpdateBridge } from "../app/native-link-routing.ts";
3-
import { confirmAndStartUpdate, type UpdateProgress } from "../app/update-confirmation.ts";
42
import { isUpdateActionable } from "../app/update-overlay-helpers.ts";
53
import { canCallGatewayMethod } from "../lib/gateway-methods.ts";
64
import {
@@ -66,22 +64,3 @@ export function resolveSidebarUpdateAttention(
6664
present,
6765
};
6866
}
69-
70-
export function startSidebarUpdateAttention(params: {
71-
context: SidebarUpdateContext;
72-
nativeUpdateDeclined: boolean;
73-
watchUpdateProgress?: (listener: (progress: UpdateProgress) => void) => () => void;
74-
}) {
75-
const state = resolveSidebarUpdateAttention(params.context);
76-
if (!state.actionable || state.busy || !state.canUpdate) {
77-
return;
78-
}
79-
const snapshot = params.context.overlays.snapshot;
80-
void confirmAndStartUpdate({
81-
startGatewayUpdate: () => void params.context.overlays.runUpdate(),
82-
...(params.watchUpdateProgress ? { watchUpdateProgress: params.watchUpdateProgress } : {}),
83-
updateAvailable: snapshot.updateAvailable,
84-
updateSchedule: snapshot.updateSchedule,
85-
viaNativeApp: !params.nativeUpdateDeclined && hasNativeUpdateBridge(),
86-
});
87-
}

‎ui/src/components/sidebar-attention.test.ts‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ type SidebarAttentionElement = HTMLElement & {
6969
context: ApplicationContext;
7070
updateComplete: Promise<boolean>;
7171
cronJobs: CronJob[];
72-
startUpdate(): void;
7372
modelAuthStatus: ModelAuthStatusResult | null;
7473
loadedAtMs: number;
7574
};
@@ -662,35 +661,6 @@ describe("update attention", () => {
662661

663662
expect(Boolean(entry?.dismissal)).toBe(dismissible);
664663
});
665-
666-
it("does not start an update when a failure has no actionable target", () => {
667-
const runUpdate = vi.fn();
668-
const element = document.createElement("openclaw-sidebar-attention") as SidebarAttentionElement;
669-
element.context = {
670-
gateway: {
671-
snapshot: {
672-
phase: "connected",
673-
hello: {
674-
auth: { role: "operator", scopes: ["operator.admin"] },
675-
features: { methods: ["update.run"] },
676-
},
677-
},
678-
},
679-
overlays: {
680-
runUpdate,
681-
snapshot: {
682-
updateAvailable: null,
683-
updateSchedule: null,
684-
updateRunning: false,
685-
updateStatusBanner: { tone: "danger", text: "Update failed" },
686-
},
687-
},
688-
} as unknown as ApplicationContext;
689-
690-
element.startUpdate();
691-
692-
expect(runUpdate).not.toHaveBeenCalled();
693-
});
694664
});
695665

696666
describe("reconcileSidebarAttentionDismissals", () => {

‎ui/src/components/sidebar-attention.ts‎

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { loadModelAuthStatus } from "../lib/model-auth.ts";
2020
import { normalizeAgentId } from "../lib/sessions/session-key.ts";
2121
import { OpenClawLightDomElement } from "../lit/openclaw-element.ts";
2222
import { SubscriptionsController } from "../lit/subscriptions-controller.ts";
23-
import "../styles/sidebar-footer-update.css";
23+
import "../styles/sidebar-attention-floating.css";
2424
import { icons } from "./icons.ts";
2525
import { CUSTODIAN_PANEL_TOGGLE_EVENT } from "./panel-toggle-contract.ts";
2626
import {
@@ -46,10 +46,7 @@ import {
4646
compareSidebarAttentionEntries,
4747
} from "./sidebar-attention-items.ts";
4848
import type { SidebarAttentionPanelPosition } from "./sidebar-attention-panel.runtime.ts";
49-
import {
50-
resolveSidebarUpdateAttention,
51-
startSidebarUpdateAttention,
52-
} from "./sidebar-attention-update.ts";
49+
import { resolveSidebarUpdateAttention } from "./sidebar-attention-update.ts";
5350
import type { IssueTab } from "./sidebar-issues-tabs.ts";
5451
import "./tooltip.ts";
5552

@@ -454,16 +451,6 @@ class SidebarAttention extends OpenClawLightDomElement {
454451
);
455452
}
456453

457-
private readonly startUpdate = () => {
458-
if (this.context) {
459-
startSidebarUpdateAttention({
460-
context: this.context,
461-
nativeUpdateDeclined: this.nativeUpdateDeclined,
462-
watchUpdateProgress: this.watchUpdateProgress,
463-
});
464-
}
465-
};
466-
467454
private readonly closeOnOutsidePointer = (event: PointerEvent) => {
468455
if (!this.panelOpen || event.composedPath().includes(this)) {
469456
return;
@@ -620,9 +607,6 @@ class SidebarAttention extends OpenClawLightDomElement {
620607
return nothing;
621608
}
622609
const entries = this.currentInboxEntries();
623-
const updateEntry = entries.find((entry) => entry.type === "update");
624-
const updateDismissal = updateEntry?.dismissal ?? null;
625-
const updateState = resolveSidebarUpdateAttention(this.context);
626610
const count = sidebarInboxTabCounts(entries).all;
627611
const label = t(count === 1 ? "attention.issueCount" : "attention.issueCountPlural", {
628612
count: String(count),
@@ -655,38 +639,6 @@ class SidebarAttention extends OpenClawLightDomElement {
655639
>`
656640
: nothing}
657641
</button>
658-
${updateEntry
659-
? html`<span class="sidebar-footer-update-slot">
660-
<button
661-
type="button"
662-
class="sidebar-footer-update"
663-
aria-label=${t("updates.sidebar.availableTitle")}
664-
?disabled=${updateState.busy || !updateState.actionable || !updateState.canUpdate}
665-
@click=${this.startUpdate}
666-
>
667-
<span class="sidebar-footer-update__icon" aria-hidden="true"
668-
>${updateState.busy ? icons.refresh : icons.download}</span
669-
>
670-
</button>
671-
${updateDismissal
672-
? html`<openclaw-tooltip
673-
class="sidebar-hover-tooltip"
674-
.content=${t("updates.sidebar.dismissUntilRestartOrVersion")}
675-
.delay=${600}
676-
.closeDelay=${300}
677-
>
678-
<button
679-
type="button"
680-
class="sidebar-footer-update__dismiss"
681-
aria-label=${t("updates.sidebar.dismissUntilRestartOrVersion")}
682-
@click=${() => this.dismiss(updateDismissal)}
683-
>
684-
${icons.x}
685-
</button>
686-
</openclaw-tooltip>`
687-
: nothing}
688-
</span>`
689-
: nothing}
690642
${this.panelOpen && this.panelRenderer
691643
? this.panelRenderer({
692644
context: this.context,

‎ui/src/components/sidebar-build-chip.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { CONTROL_UI_BUILD_INFO } from "../build-info.ts";
55
import { t } from "../i18n/index.ts";
66
import { shouldHandleNavigationClick } from "../lib/navigation-click.ts";
77
import { OpenClawLightDomContentsElement } from "../lit/openclaw-element.ts";
8-
import "../styles/sidebar-footer-update.css";
98
import {
109
formatBuildChipText,
1110
formatSettingsBuildLabel,

‎ui/src/e2e/chat-side-panel-clearance.e2e.test.ts‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ function scenario(
4040
options: {
4141
custodian?: boolean;
4242
operatorScopes?: string[];
43-
updateAvailable?: ControlUiMockGatewayScenario["updateAvailable"];
4443
} = {},
4544
): ControlUiMockGatewayScenario {
4645
return {
@@ -84,7 +83,6 @@ function scenario(
8483
},
8584
},
8685
...(options.operatorScopes ? { operatorScopes: options.operatorScopes } : {}),
87-
...(options.updateAvailable ? { updateAvailable: options.updateAvailable } : {}),
8886
sessionKey,
8987
workspace: "/workspace/openclaw",
9088
workspaceGit: true,
@@ -210,59 +208,47 @@ suite.define(() => {
210208
deviceLess: false,
211209
direction: "ltr",
212210
expectedControl: ".shell-chrome-controls__search",
213-
expectedUpdate: false,
214211
name: "expanded navigation",
215212
navCollapsed: false,
216213
operatorScopes: undefined,
217214
proof: "expanded-nav",
218215
themeMode: "dark" as const,
219-
updateAvailable: undefined,
220216
},
221217
{
222218
beforeExpandProof: undefined,
223219
custodian: false,
224220
deviceLess: false,
225221
direction: "ltr",
226222
expectedControl: ".shell-chrome-controls__search",
227-
expectedUpdate: false,
228223
name: "collapsed navigation",
229224
navCollapsed: true,
230225
operatorScopes: undefined,
231226
proof: "collapsed-nav",
232227
themeMode: "dark" as const,
233-
updateAvailable: undefined,
234228
},
235229
{
236230
beforeExpandProof: undefined,
237231
custodian: true,
238232
deviceLess: false,
239233
direction: "ltr",
240234
expectedControl: ".shell-chrome-controls__custodian",
241-
expectedUpdate: true,
242235
name: "collapsed navigation with custodian and attention",
243236
navCollapsed: true,
244237
operatorScopes: undefined,
245238
proof: "collapsed-nav-custodian-attention",
246239
themeMode: "dark" as const,
247-
updateAvailable: {
248-
channel: "stable",
249-
currentVersion: "2026.8.1",
250-
latestVersion: "2026.8.2",
251-
},
252240
},
253241
{
254242
beforeExpandProof: undefined,
255243
custodian: false,
256244
deviceLess: true,
257245
direction: "rtl",
258246
expectedControl: ".sidebar-attention--floating .sidebar-issues-button",
259-
expectedUpdate: false,
260247
name: "collapsed RTL limited-access status and attention",
261248
navCollapsed: true,
262249
operatorScopes: limitedScopes,
263250
proof: "collapsed-rtl-limited-attention",
264251
themeMode: "dark" as const,
265-
updateAvailable: undefined,
266252
},
267253
])("keeps expanded panel controls in a compact safe gap for $name", async (testCase) => {
268254
await suite.withPage(
@@ -282,7 +268,6 @@ suite.define(() => {
282268
scenario({
283269
custodian: testCase.custodian,
284270
operatorScopes: testCase.operatorScopes,
285-
updateAvailable: testCase.updateAvailable,
286271
}),
287272
);
288273
await openExpandedFilesPanel(page, testCase.beforeExpandProof);
@@ -297,19 +282,6 @@ suite.define(() => {
297282
await page.locator(".sidebar-attention--floating .sidebar-issues-button").waitFor();
298283
}
299284
await page.locator(testCase.expectedControl).waitFor();
300-
if (testCase.expectedUpdate) {
301-
const updateSlot = page.locator(
302-
".sidebar-attention--floating .sidebar-footer-update-slot",
303-
);
304-
await updateSlot.waitFor();
305-
await updateSlot.hover();
306-
await waitForShellLayout(page);
307-
await expectPanelHeaderControlsClearShellChrome(page);
308-
await page.mouse.move(800, 700);
309-
await updateSlot.locator(".sidebar-footer-update").focus();
310-
await waitForShellLayout(page);
311-
await expectPanelHeaderControlsClearShellChrome(page);
312-
}
313285
await waitForShellLayout(page);
314286
await expectPanelHeaderControlsClearShellChrome(page);
315287
await capturePanel(page, testCase.proof);

‎ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ const suite = createControlUiE2eSuite({
2424
const TOAST_PROOF_DIR = path.resolve(".artifacts/control-ui-e2e/toast-layering");
2525
const railProofDir = process.env.OPENCLAW_UI_RAIL_PROOF_DIR?.trim();
2626
const limitedScopes = ["operator.read", "operator.write"];
27-
const UPDATE_AVAILABLE = {
28-
channel: "stable",
29-
currentVersion: "1.0.0",
30-
latestVersion: "2.0.0",
31-
} as const;
3227
const TOAST_SCENARIO: ControlUiMockGatewayScenario = {
3328
featureMethods: ["chat.metadata", "chat.startup", "sessions.catalog.list"],
3429
methodResponses: {
@@ -268,13 +263,7 @@ suite.define(() => {
268263
});
269264

270265
it("hosts navigation, search, sessions, and history in web titlebar chrome", async () => {
271-
const page = await openPage({
272-
scenario: {
273-
operatorScopes: ["operator.admin", "operator.read"],
274-
updateAvailable: UPDATE_AVAILABLE,
275-
},
276-
webChrome: true,
277-
});
266+
const page = await openPage({ webChrome: true });
278267
const toolbar = page.locator(".macos-titlebar-controls");
279268
await expect.poll(() => toolbar.isVisible()).toBe(true);
280269
await expect.poll(() => page.locator(".shell-chrome-controls").isVisible()).toBe(false);
@@ -293,7 +282,7 @@ suite.define(() => {
293282
.poll(() => page.locator(".shell").getAttribute("class"))
294283
.toContain("shell--nav-collapsed");
295284
await expect.poll(() => newThread.isVisible()).toBe(true);
296-
await page.locator(".sidebar-attention--floating .sidebar-footer-update").waitFor();
285+
await page.locator(".sidebar-attention--floating .sidebar-issues-button").waitFor();
297286
const toolbarBox = await toolbar.boundingBox();
298287
const attentionBox = await page.locator(".sidebar-attention--floating").boundingBox();
299288
expect(toolbarBox).not.toBeNull();

‎ui/src/e2e/sidebar-attention-scope.e2e.test-support.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ export async function runSidebarAttentionScopeFlow(params: SidebarAttentionScope
275275
const sidebarUpdate = sidebar.locator(
276276
'openclaw-sidebar-update-card[data-attention-kind="updateAvailable"]',
277277
);
278-
await expect.poll(() => sidebar.locator(".sidebar-footer-update").count()).toBe(1);
278+
await expect.poll(() => sidebar.locator(".sidebar-issues-button__count").count()).toBe(1);
279279
await sidebar.locator(".sidebar-issues-button").click();
280280
await expect.poll(() => sidebarUpdate.count()).toBe(1);
281281
await expect.poll(() => automationRows.getByText("Writer release digest").count()).toBe(1);

‎ui/src/e2e/sidebar-customization.e2e.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ suite.define(() => {
856856
'openclaw-sidebar-update-card[data-attention-kind="updateAvailable"]',
857857
);
858858
const sidebarAutomation = sidebar.locator('[data-attention-kind="cronFailed"]');
859-
await expect.poll(() => sidebar.locator(".sidebar-footer-update").count()).toBe(1);
859+
await expect.poll(() => sidebar.locator(".sidebar-issues-button__count").count()).toBe(1);
860860
await sidebar.locator(".sidebar-issues-button").click();
861861
await expect.poll(() => sidebarUpdate.count()).toBe(1);
862862
await expect.poll(() => sidebarAutomation.count()).toBe(1);

0 commit comments

Comments
 (0)