Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(spaces): tip sits flush on the Space page's stage and rail (#6052)

ddupont4c3ae90bc479
diff --git a/apps/cua-spaces-web/src/__tests__/space-header.test.tsx b/apps/cua-spaces-web/src/__tests__/space-header.test.tsx
index 93a920ba02..4aa35974a4 100644
--- a/apps/cua-spaces-web/src/__tests__/space-header.test.tsx
+++ b/apps/cua-spaces-web/src/__tests__/space-header.test.tsx
@@ -126,6 +126,18 @@ describe("the call layout's surfaces", () => {
expect(field.className).toContain("bg-muted");
expect(field.className).not.toMatch(/(^|\s)border(\s|$)/);
});
+
+ it("the tip sits flush on the stage and the rail: no bottom margin under it", async () => {
+ await mountApp(path, { failsCreates: false, listsGhost: false });
+ await waitFor(() => expect(q("[data-call-layout] [data-tip]")).not.toBeNull(), { timeout: 4000 });
+ const tip = q("[data-call-layout] [data-tip]")!;
+ // A bottom margin here is the gap the rail used to start below.
+ expect(tip.className).not.toMatch(/(^|\s)(mb|my|m)-(?!0(\s|$))\S+/);
+ expect(tip.className).toMatch(/(^|\s)mb-0(\s|$)/);
+ // Directly above the row that holds the stage and the rail.
+ const row = tip.nextElementSibling ?? tip.parentElement!.nextElementSibling;
+ expect(row?.querySelector("[data-members-panel]")).not.toBeNull();
+ });
});
// WCAG contrast of a token on the header's surface, from index.css itself.
diff --git a/apps/cua-spaces-web/src/routes/spaces/$spaceId.tsx b/apps/cua-spaces-web/src/routes/spaces/$spaceId.tsx
index c8dd4ff991..a33dd910af 100644
--- a/apps/cua-spaces-web/src/routes/spaces/$spaceId.tsx
+++ b/apps/cua-spaces-web/src/routes/spaces/$spaceId.tsx
@@ -395,6 +395,8 @@ function SpaceDetailPage() {
const powerError = detail.powerError ? <p className="mb-4 text-[13px] text-destructive">{detail.powerError}</p> : null;
// One tip at a time (the core's `tips.view`, place `space`).
const tip = <PageTip place="space" space={space} onShare={shareAction?.enabled ? share : undefined} />;
+ // In the call layout the tip sits directly on the stage and the rail: no gap under it, so the rail meets it flush.
+ const callTip = <PageTip place="space" space={space} onShare={shareAction?.enabled ? share : undefined} className="mb-0" />;
// The call layout: the desktop on top, the thread below, the people on the
// right. A machine's own page (no desktop to call into) and a daemon
@@ -435,7 +437,7 @@ function SpaceDetailPage() {
}
notice={
<>
- {tip}
+ {callTip}
{detail.powerError ? <p className="px-5 pb-2 text-[13px] text-destructive">{detail.powerError}</p> : null}
</>
}