Multiplayer agent harness for work.
Fix pane tab sizing and narrow composer layout (#1598)
Joshua France43904a8b824e
diff --git a/plugins/web-ui/src/shell.css b/plugins/web-ui/src/shell.cssindex 8960e6449..7a2a25147 100644--- a/plugins/web-ui/src/shell.css+++ b/plugins/web-ui/src/shell.css@@ -8360,9 +8360,9 @@ h3.ambient-field-label {.dockview-theme-qm .dv-tabs-and-actions-container:not(.dv-single-tab) .dv-tab {--split-tab-h: 34px;height: var(--split-tab-h);- flex: 0 1 160px;+ flex: 0 1 auto;min-width: 72px;- max-width: 220px;+ max-width: 320px;padding: 0 8px 0 10px;display: flex;align-items: center;@@ -8371,7 +8371,7 @@ h3.ambient-field-label {}.dockview-theme-qm .dv-tabs-and-actions-container:not(.dv-single-tab) .dv-tab.dv-active-tab {- flex: 0 1 260px;+ flex: 0 1 auto;min-width: 150px;max-width: 320px;align-self: stretch;@@ -8518,6 +8518,11 @@ h3.ambient-field-label {flex: 1 1 auto;}+.dv-tab .split-pane-title-text {+ flex: 1 1 auto;+ min-width: 0;+}+.split-pane-title-text {overflow: hidden;text-overflow: ellipsis;@@ -10950,6 +10955,10 @@ h3.ambient-field-label {.composer-wrap {--composer-font-size: 16px;+ display: grid;+ grid-template-columns: minmax(0, 1fr) auto;+ align-items: center;+ gap: 6px;width: calc(100% - 16px);margin: 0 auto calc(8px + env(safe-area-inset-bottom));--composer-pad-block: 8px;@@ -10958,22 +10967,31 @@ h3.ambient-field-label {padding: var(--composer-pad-block) var(--composer-pad-end) var(--composer-pad-block) var(--composer-pad-inline);border-radius: 20px;}+ .composer-wrap > * {+ grid-column: 1 / -1;+ }.composer-input {+ grid-column: 1;+ min-width: 0;line-height: 1.4;min-height: 40px;max-height: 32vh;padding: 12px 10px 6px;}- .composer-wrap.compact .composer-toolbar {+ .composer-input::placeholder {+ white-space: nowrap;+ }+ .composer-wrap .composer-toolbar {+ grid-column: 2;flex-wrap: nowrap;gap: 6px;}- .composer-wrap.compact .composer-left,- .composer-wrap.compact .composer-right {+ .composer-wrap .composer-left,+ .composer-wrap .composer-right {width: auto;flex-wrap: nowrap;}- .composer-wrap.compact .composer-right {+ .composer-wrap .composer-right {margin-left: auto;}.composer-toolbar .stop-btn {@@ -10991,6 +11009,15 @@ h3.ambient-field-label {height: 44px;border-radius: 50%;}+ .composer-wrap .loadout-button .menu-label,+ .composer-wrap .loadout-button .menu-suffix {+ display: none;+ }+ .composer-wrap .composer-toolbar .menu-button.loadout-button {+ width: 44px;+ padding: 0;+ justify-content: center;+ }.live-work-line {min-height: 40px;}@@ -12550,7 +12577,7 @@ body.app-edit-embed .custom-chat-shell.app-edit-chat > .chat-bottom-dock {flex-wrap: wrap;}-@container split-pane (max-height: 480px) {+@container split-pane (max-height: 480px) or (max-width: 560px) {.composer-wrap {display: grid;grid-template-columns: minmax(0, 1fr) auto;@@ -12588,7 +12615,7 @@ body.app-edit-embed .custom-chat-shell.app-edit-chat > .chat-bottom-dock {}}-@container split-pane (max-height: 480px) and (max-width: 470px) {+@container split-pane (max-width: 470px) {.composer-wrap .loadout-button .menu-label,.composer-wrap .loadout-button .menu-suffix {display: none;@@ -12600,7 +12627,7 @@ body.app-edit-embed .custom-chat-shell.app-edit-chat > .chat-bottom-dock {}}-@container split-pane (max-height: 480px) and (max-width: 300px) {+@container split-pane (max-width: 300px) {.composer-wrap .composer-toolbar .icon-btn,.composer-wrap .composer-toolbar .menu-button.loadout-button,.composer-wrap .composer-toolbar .send-btn,diff --git a/plugins/web-ui/test/pane-composer-source.test.ts b/plugins/web-ui/test/pane-composer-source.test.tsindex e86ec67f3..906cf8156 100644--- a/plugins/web-ui/test/pane-composer-source.test.ts+++ b/plugins/web-ui/test/pane-composer-source.test.ts@@ -41,9 +41,10 @@ test("pane settings control is visible without hover", () => {assert.doesNotMatch(block, /opacity: 0;/);});-test("only short split panes put the textarea and toolbar on the same grid row", () => {+test("short or narrow split panes put the textarea and toolbar on the same grid row", () => {assert.match(css, /\.split-pane-content \{\s*container: split-pane \/ size;/);- const short = css.slice(css.indexOf("@container split-pane (max-height: 480px)"));+ const short = css.slice(css.indexOf("@container split-pane (max-height: 480px) or (max-width: 560px)"));+ assert.match(css, /@container split-pane \(max-height: 480px\) or \(max-width: 560px\)/);assert.match(short, /\.composer-wrap \{[^}]*display: grid;[^}]*grid-template-columns: minmax\(0, 1fr\) auto;/);assert.match(short, /\.composer-wrap > \* \{\s*grid-column: 1 \/ -1;/);assert.match(short, /\.composer-input \{[^}]*grid-column: 1;[^}]*min-height: 34px;[^}]*max-height: 120px;/);@@ -53,7 +54,7 @@ test("only short split panes put the textarea and toolbar on the same grid row",});test("narrow short panes hide runtime labels, not the accessible picker", () => {- const narrow = css.slice(css.indexOf("@container split-pane (max-height: 480px) and (max-width: 470px)"));+ const narrow = css.slice(css.indexOf("@container split-pane (max-width: 470px)"));assert.match(narrow, /\.loadout-button \.menu-label,/);assert.match(narrow, /\.loadout-button \.menu-suffix \{\s*display: none;/);assert.match(narrow, /\.loadout-button \{[^}]*width: 34px;/);@@ -65,7 +66,7 @@ test("narrow short panes hide runtime labels, not the accessible picker", () =>});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)"));+ const minimum = css.slice(css.indexOf("@container split-pane (max-width: 300px)"));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;/);});@@ -100,3 +101,17 @@ test("compact overrides stop matching when the canvas returns to one pane", () =}dom.window.close();});++test("phone composers keep input and touch controls on one row outside split panes", () => {+ const phone = css.slice(+ css.indexOf(" --composer-font-size: 16px;"),+ css.indexOf(" .live-work-line {", css.indexOf(" --composer-font-size: 16px;")),+ );+ assert.match(phone, /display: grid;[\s\S]*grid-template-columns: minmax\(0, 1fr\) auto;/);+ assert.match(phone, /\.composer-wrap > \* \{\s*grid-column: 1 \/ -1;/);+ assert.match(phone, /\.composer-input \{[^}]*grid-column: 1;[^}]*min-width: 0;/);+ assert.match(phone, /\.composer-wrap \.composer-toolbar \{[^}]*grid-column: 2;[^}]*flex-wrap: nowrap;/);+ assert.match(phone, /\.loadout-button \.menu-suffix \{\s*display: none;/);+ assert.match(phone, /\.composer-input::placeholder \{\s*white-space: nowrap;/);+ assert.match(phone, /\.composer-toolbar \.send-btn \{[^}]*width: 44px;[^}]*height: 44px;/);+});diff --git a/plugins/web-ui/test/split-tiles-and-titles.test.ts b/plugins/web-ui/test/split-tiles-and-titles.test.tsindex 08761362e..5670e1e24 100644--- a/plugins/web-ui/test/split-tiles-and-titles.test.ts+++ b/plugins/web-ui/test/split-tiles-and-titles.test.ts@@ -83,11 +83,11 @@ test("a pane title ellipsizes rather than being clipped or wrapped", () => {test("the active tab keeps a higher floor than its neighbours and runs down onto the body", () => {const multi = css.match(/:not\(\.dv-single-tab\) \.dv-tab \{[^}]*\}/)?.[0] ?? "";- assert.match(multi, /flex: 0 1 160px;/);+ assert.match(multi, /flex: 0 1 auto;/);assert.match(multi, /min-width: 72px;/);- assert.match(multi, /max-width: 220px;/);+ assert.match(multi, /max-width: 320px;/);const active = css.match(/:not\(\.dv-single-tab\) \.dv-tab\.dv-active-tab \{[^}]*\}/)?.[0] ?? "";- assert.match(active, /flex: 0 1 260px;/);+ assert.match(active, /flex: 0 1 auto;/);assert.match(active, /min-width: 150px;/);assert.match(active, /align-self: stretch;/);assert.match(active, /padding-bottom: var\(--split-strip-pad\);/);@@ -114,6 +114,12 @@ test("tab actions sit in the title's flow so the title truncates around them", (assert.equal((draw.match(/split-tab-close/g) ?? []).length, 2, "each tab form carries exactly one close control");});+test("the tab close control stays at the trailing edge of a wide tab", () => {+ const title = css.match(/^\.dv-tab \.split-pane-title-text \{[^}]*\}/m)?.[0] ?? "";+ assert.match(title, /flex: 1 1 auto;/);+ assert.match(title, /min-width: 0;/);+});+test("the tab overflow menu is lifted above the panes and styled", () => {const anchor = css.match(/\.dockview-theme-qm \.dv-popover-anchor \{[^}]*\}/)?.[0] ?? "";assert.ok(Number(anchor.match(/z-index: (\d+);/)?.[1] ?? 0) >= 999, `anchor z-index too low: ${anchor}`);