Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Blocked Works on tiles show their reason without hover

Kevin4a9161f48115
diff --git a/src/components/ComputerPanel.simple.test.ts b/src/components/ComputerPanel.simple.test.ts
index 9bc80b8bbb..ded0cb6433 100644
--- a/src/components/ComputerPanel.simple.test.ts
+++ b/src/components/ComputerPanel.simple.test.ts
@@ -404,7 +404,7 @@ describe("Where the bot works", () => {
const advanced = render(makeBot());
const card = destinations(advanced)[1]!;
expect(card.props.disabled).toBe(true);
- expect(text(card.props.children)).toBe("Cloud desktopNot with this model");
+ expect(text(card.props.children)).toBe(`Cloud desktop${tile.props.title}`);
expect(card.props.title).toBe(tile.props.title);
});
diff --git a/src/components/WorksOnGrid.tsx b/src/components/WorksOnGrid.tsx
index dc9c4736b1..2b5060af43 100644
--- a/src/components/WorksOnGrid.tsx
+++ b/src/components/WorksOnGrid.tsx
@@ -62,7 +62,7 @@ export function WorksOnGrid({ options, onSelect }: { options: readonly WorksOnOp
<span>{t(labelKey)}</span>
</span>
<span className="mt-1.5 block text-[11px] leading-4 text-ink-secondary">
- {managedBy ?? (issue ? view.short : t(descriptionKey))}
+ {managedBy ?? (disabled ? view.line : issue ? view.short : t(descriptionKey))}
</span>
</button>
))}
diff --git a/src/components/bot-settings/AccessSection.test.ts b/src/components/bot-settings/AccessSection.test.ts
index 4bce631128..bb23427783 100644
--- a/src/components/bot-settings/AccessSection.test.ts
+++ b/src/components/bot-settings/AccessSection.test.ts
@@ -234,10 +234,10 @@ describe("AccessSection Works on", () => {
function Picker() { rendered = (picker.type as (props: unknown) => ReactNode)(picker.props); return rendered; }
renderToStaticMarkup(createElement(StoreProvider, null, createElement(Picker)));
const grid = nodes(rendered).find((node) => (node.type as { name?: string }).name === "WorksOnGrid")!;
- const options = grid.props.options as Array<{ mode: string | null; disabled: boolean; unavailableTitle?: string }>;
+ const options = grid.props.options as Array<{ mode: string | null; disabled: boolean; view: { line: string } }>;
const local = options.find((option) => option.mode === "local")!;
expect(local.disabled).toBe(true);
- expect(local.unavailableTitle).toBeTruthy();
+ expect(renderToStaticMarkup(grid).replaceAll("&#x27;", "'")).toContain(local.view.line);
const select = grid.props.onSelect as (mode: string | null) => void;
select("browser");
diff --git a/src/components/bot-settings/AccessSection.tsx b/src/components/bot-settings/AccessSection.tsx
index f3a232b91f..3fbb219266 100644
--- a/src/components/bot-settings/AccessSection.tsx
+++ b/src/components/bot-settings/AccessSection.tsx
@@ -654,7 +654,6 @@ function DraftWorksOn({ bot, patch, seat }: { bot: Bot; patch: ReturnType<typeof
selected: mode === null ? !bot.computer : bot.computer === mode,
disabled: Boolean(managedBy) || placeBlocked(view),
issue: !managedBy && placeHasIssue(view),
- unavailableTitle: managedBy ?? (placeBlocked(view) ? view.line : undefined),
};
});
const choose = (mode: WorksOnMode) => patch(mode === "browser" ? { computer: mode, browser: true } : { computer: mode });