(".quick-pane")!;
+ const toolbar = container.querySelector(".quick-pane-toolbar")!;
+ const controls = [
+ await preparedTrigger(),
+ screen.getByRole("combobox", { name: "Thinking" }),
screen.getByRole("button", { name: "Close Quick Pane" }),
- ).toHaveClass("quick-pane-toolbar-control");
+ ];
+
+ for (const width of [640, 520]) {
+ pane.style.width = `${width}px`;
+ for (const control of controls) expect(toolbar).toContainElement(control);
+ }
});
it("starts native dragging only from the strip above toolbar controls", async () => {
diff --git a/ui/src/quick-pane/QuickPane.tsx b/ui/src/quick-pane/QuickPane.tsx
index 34a366b..f44ee41 100644
--- a/ui/src/quick-pane/QuickPane.tsx
+++ b/ui/src/quick-pane/QuickPane.tsx
@@ -75,7 +75,10 @@ const QUICK_PANE_MIN_HEIGHT = 360;
const QUICK_PANE_MAX_HEIGHT = 520;
function clampQuickPaneHeight(height: number) {
- return Math.min(QUICK_PANE_MAX_HEIGHT, Math.max(QUICK_PANE_MIN_HEIGHT, height));
+ return Math.min(
+ QUICK_PANE_MAX_HEIGHT,
+ Math.max(QUICK_PANE_MIN_HEIGHT, height),
+ );
}
function messageText(message: Message) {
@@ -1066,7 +1069,8 @@ export default function QuickPane() {
async function continueFull() {
const current = runtimeRef.current;
- if (invalid || !current) return setError(invalid ?? "Quick runtime is unavailable.");
+ if (invalid || !current)
+ return setError(invalid ?? "Quick runtime is unavailable.");
setPromoting(true);
try {
await invoke<{ runtime: Runtime }>("promote_quick_runtime", {
@@ -1170,16 +1174,6 @@ export default function QuickPane() {
/>
- {runtime && (
-
- )}