fix(ai-toolbar): gate paste capture on AI availability
This commit is contained in:
@@ -323,6 +323,19 @@ describe("Keyboard shortcuts – toolbar integration contract", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Global paste capture – AI availability gate", () => {
|
||||
test("document-level paste handlers only arm when AI is actually usable", () => {
|
||||
const source = readToolbarSource();
|
||||
|
||||
expect(source).toContain(
|
||||
"if (!isAuthenticated || isPending || !canUseAi || aiLoading) return;",
|
||||
);
|
||||
expect(source).toContain(
|
||||
"}, [isAuthenticated, isPending, canUseAi, aiLoading]);",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// ─── Cycle 8: Multi-image thumbnail strip ────────────────────────────────────
|
||||
//
|
||||
// When multiple images are attached, they render as a horizontal scrollable
|
||||
|
||||
Reference in New Issue
Block a user