Multiplayer agent harness for work.
Restore chat themes and remove the composer account shortcut (#1377)
Regan Bell9b5877057e8f
diff --git a/docs/screenshots/chat-theme-composer-fix.png b/docs/screenshots/chat-theme-composer-fix.pngnew file mode 100644index 000000000..1808d7d56Binary files /dev/null and b/docs/screenshots/chat-theme-composer-fix.png differdiff --git a/plugins/web-ui/src/composer.ts b/plugins/web-ui/src/composer.tsindex d8084c198..f40454206 100644--- a/plugins/web-ui/src/composer.ts+++ b/plugins/web-ui/src/composer.ts@@ -19,7 +19,6 @@ import {FileText,Paperclip,Square,- Settings,Star,X,Zap,@@ -62,7 +61,7 @@ import {import { modelSupportsFastMode } from "./pi-models";import type { ComposerSurface, ConvCtx } from "./conv-types";import { bumpSessionActivity, dropPendingSession, renderList } from "./sessions";-import { appState, switchView } from "./shell";+import { appState } from "./shell";import { base64ToText, bytesToBase64, insertIntoDraft, pasteChipLabel } from "./paste-text";import { clearDraft, newChatDraftKey, saveDraft } from "./drafts";import { tip } from "./tooltip";@@ -637,18 +636,6 @@ export function createComposerSurface(ctx: ConvCtx): ComposerSurface {${icon(Paperclip, 18)}</button>${showRuntimeControls ? runtimeControls : nothing}- <button- type="button"- class="btn composer-account"- aria-label=${appState.me?.individualModelAuth ? "My account" : "Company access"}- ${tip(appState.me?.individualModelAuth ? "My account" : "Company access")}- @click=${() => switchView("settings")}- >- <span class="composer-account-icon" aria-hidden="true">${icon(Settings, 18)}</span>- <span class="composer-account-label">- ${appState.me?.individualModelAuth ? "My account" : "Company access"}- </span>- </button></div><div class="composer-right">${sendControls(agent)}</div></div>diff --git a/plugins/web-ui/src/shell.css b/plugins/web-ui/src/shell.cssindex a8562623c..7e6ade910 100644--- a/plugins/web-ui/src/shell.css+++ b/plugins/web-ui/src/shell.css@@ -12001,15 +12001,6 @@ body.app-edit-embed .custom-chat-shell.app-edit-chat > .chat-bottom-dock {overflow-wrap: anywhere;}-.dark .custom-chat {- --background: #181818;- --foreground: #eeeeee;- --muted-foreground: #a1a1a1;- --secondary: #232323;- --border: #303030;- background: var(--background);-}-:is(markdown-block, qm-markdown).markdown-content table {font-size: 13px;line-height: 1.65;@@ -12075,10 +12066,6 @@ body.app-edit-embed .custom-chat-shell.app-edit-chat > .chat-bottom-dock {flex-wrap: wrap;}-.composer-account-icon {- display: none;-}-@container split-pane (max-height: 480px) {.composer-wrap {display: grid;@@ -12112,20 +12099,6 @@ body.app-edit-embed .custom-chat-shell.app-edit-chat > .chat-bottom-dock {flex-wrap: nowrap;gap: 4px;}- .composer-wrap .composer-account {- width: 34px;- height: 34px;- min-height: 34px;- padding: 0;- flex: none;- justify-content: center;- }- .composer-wrap .composer-account-label {- display: none;- }- .composer-wrap .composer-account-icon {- display: inline-flex;- }.composer-wrap .composer-toolbar .menu-button.loadout-button {max-width: 180px;}@@ -12147,8 +12120,7 @@ body.app-edit-embed .custom-chat-shell.app-edit-chat > .chat-bottom-dock {.composer-wrap .composer-toolbar .icon-btn,.composer-wrap .composer-toolbar .menu-button.loadout-button,.composer-wrap .composer-toolbar .send-btn,- .composer-wrap .composer-toolbar .stop-btn,- .composer-wrap .composer-toolbar .composer-account {+ .composer-wrap .composer-toolbar .stop-btn {width: 28px;height: 28px;min-height: 28px;diff --git a/plugins/web-ui/test/pane-composer-source.test.ts b/plugins/web-ui/test/pane-composer-source.test.tsindex 9c4a9f5e8..984c0fda1 100644--- a/plugins/web-ui/test/pane-composer-source.test.ts+++ b/plugins/web-ui/test/pane-composer-source.test.ts@@ -56,21 +56,8 @@ test("narrow short panes hide runtime labels, not the accessible picker", () =>assert.match(composer, /aria-label=\$\{`Model:/);});-test("short panes preserve the account action with a named icon-only button", () => {- const account = composer.match(/<button\s+type="button"\s+class="btn composer-account"[^]*?<\/button>/)?.[0] ?? "";- assert.match(account, /aria-label=\$\{appState\.me\?\.individualModelAuth \? "My account" : "Company access"\}/);- assert.match(account, /@click=\$\{\(\) => switchView\("settings"\)\}/);- assert.match(account, /class="composer-account-icon" aria-hidden="true"/);- assert.match(css, /^\.composer-account-icon \{\s*display: none;/m);- const short = css.slice(css.indexOf("@container split-pane (max-height: 480px)"));- assert.match(short, /\.composer-account-label \{\s*display: none;/);- assert.match(short, /\.composer-account-icon \{\s*display: inline-flex;/);- assert.doesNotMatch(short, /\.composer-account \{[^}]*display: none;/);-});--test("the smallest short panes leave text space even with stop and account controls", () => {+test("the smallest short panes leave text space even with stop controls", () => {const minimum = css.slice(css.indexOf("@container split-pane (max-height: 480px) and (max-width: 300px)"));- assert.match(minimum, /\.composer-toolbar \.stop-btn,/);- assert.match(minimum, /\.composer-toolbar \.composer-account \{\s*width: 28px;\s*height: 28px;\s*min-height: 28px;/);+ assert.match(minimum, /\.composer-toolbar \.stop-btn \{\s*width: 28px;\s*height: 28px;\s*min-height: 28px;/);assert.match(minimum, /\.composer-attach \{\s*transform: none;/);});diff --git a/plugins/web-ui/test/single-view-navigation.test.ts b/plugins/web-ui/test/single-view-navigation.test.tsindex efa6be185..accc2a8c1 100644--- a/plugins/web-ui/test/single-view-navigation.test.ts+++ b/plugins/web-ui/test/single-view-navigation.test.ts@@ -149,11 +149,24 @@ test("single and multiview headers render mutually exclusive tools and pane contShrink: "",Expand: "",}) as { init: (props: unknown) => void; draw: () => void; menuOpen: boolean };- actions.init({ group: { id: "group" }, api: { isMaximized: () => false } });+ let activePanelChanged: (() => void) | undefined;+ actions.init({+ group: {+ id: "group",+ api: {+ onDidActivePanelChange: (listener: () => void) => {+ activePanelChanged = listener;+ return { dispose() {} };+ },+ },+ },+ api: { isMaximized: () => false },+ });assert.equal((output.match(/class="session-tool"/g) ?? []).length, 6);assert.doesNotMatch(output, /split-tools-btn|Split this pane|Open full screen|Close pane/);dockApi.panels.push({});- actions.draw();+ assert.ok(activePanelChanged);+ activePanelChanged();assert.doesNotMatch(output, /class="session-tool"/);for (const label of ["Tools", "Split this pane with a new session", "Open full screen", "Close pane"])assert.ok(output.includes(`aria-label="${label}"`) || output.includes(`aria-label=${label}`));