Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

Show the shared wave and shimmer while loading inbox (#1705)

Eve Bouffard6b6a54cd87b0
diff --git a/plugins/web-ui/src/chat.ts b/plugins/web-ui/src/chat.ts
index ad1e2f347..62b2ec6bc 100644
--- a/plugins/web-ui/src/chat.ts
+++ b/plugins/web-ui/src/chat.ts
@@ -153,6 +153,7 @@ import {
formatBytes,
icon,
relTime,
+ sheenLabel,
waveLoader,
} from "./ui";
import { appState, renderSidebarTop, switchView, syncUrlFromState } from "./shell";
@@ -2688,12 +2689,6 @@ export function createChatSurface(
</div>`;
}
- function sheenLabel(label: string, active: boolean): TemplateResult {
- return html`<span class="sheen-label ${active ? "thinking-sheen" : ""}" data-sheen=${active ? label : ""}
- >${label}</span
- >`;
- }
-
function renderTimelineItem(item: TimelineItem, work: WorkBlock): TemplateResult {
const status = work.status;
const stale = work.stale === true;
diff --git a/plugins/web-ui/src/inbox.ts b/plugins/web-ui/src/inbox.ts
index 975ee9796..f377d02c7 100644
--- a/plugins/web-ui/src/inbox.ts
+++ b/plugins/web-ui/src/inbox.ts
@@ -48,7 +48,7 @@ import { listBackLink } from "./list-page";
import { registerPaneKind } from "./pane-kinds";
import { exitSplitIfActive, notifyPanesChanged } from "./split";
import { tip } from "./tooltip";
-import { brandName, fieldSelect, icon, initials, relTime, workingWave } from "./ui";
+import { brandName, fieldSelect, icon, initials, relTime, sheenLabel, workingWave } from "./ui";
import { assistantSidebar, assistantMessage } from "./assistant-sidebar";
import { inboxChat } from "./inbox-chat";
@@ -1654,7 +1654,15 @@ function surfaceTpl(surface: InboxSurface): TemplateResult {
</div>
`;
const list = html`
- ${!inboxState.loaded && inboxState.loading ? html`<div class="empty compact">Reading your inbox…</div>` : nothing}
+ ${
+ !inboxState.loaded && inboxState.loading
+ ? html`<div class="empty compact" role="status" aria-label="Reading your inbox…">
+ <span aria-hidden="true">
+ <span class="working-mark">${workingWave()}</span>${sheenLabel("Reading your inbox…", true)}
+ </span>
+ </div>`
+ : nothing
+ }
${
inboxState.error && !inboxState.loaded
? html`<div class="empty compact">Couldn't load the inbox: ${inboxState.error}</div>`
diff --git a/plugins/web-ui/src/ui.ts b/plugins/web-ui/src/ui.ts
index fbeadd6cf..9338488ac 100644
--- a/plugins/web-ui/src/ui.ts
+++ b/plugins/web-ui/src/ui.ts
@@ -45,6 +45,12 @@ export function waveLoader(
</span>`;
}
+export function sheenLabel(label: string, active: boolean): TemplateResult {
+ return html`<span class="sheen-label ${active ? "thinking-sheen" : ""}" data-sheen=${active ? label : ""}
+ >${label}</span
+ >`;
+}
+
export function workingWave(): TemplateResult {
return waveLoader({
width: 13.6,