📱 fix: hide keyboard shortcuts trigger on mobile

This commit is contained in:
2026-04-09 00:59:15 -04:00
parent 513aafcebc
commit 92f60d3a9a
2 changed files with 9 additions and 3 deletions

View File

@@ -408,7 +408,7 @@ export const AIToolbar = ({
<Button
variant="ghost"
size="icon"
className="h-6 w-6 text-muted-foreground/50 hover:text-muted-foreground"
className="hidden h-6 w-6 text-muted-foreground/50 hover:text-muted-foreground md:inline-flex"
aria-label="Keyboard shortcuts"
>
<Info className="h-3.5 w-3.5" />

View File

@@ -153,8 +153,8 @@ const ATTACH_BTN_CLASSES = "gap-1.5 text-xs";
/** Generate button: right side, primary variant, labeled */
const GENERATE_BTN_CLASSES = "gap-1.5 text-xs";
/** Info popover trigger: ghost icon button, sits left of Generate */
const INFO_TRIGGER_CLASSES = "h-6 w-6";
/** Info popover trigger: hidden on mobile, small on desktop so it stays secondary */
const INFO_TRIGGER_CLASSES = "hidden h-6 w-6 md:inline-flex";
describe("Composer footer bar layout contract", () => {
test("footer row uses justify-between so Attach sits left and Generate sits right", () => {
@@ -185,6 +185,12 @@ describe("Composer footer bar layout contract", () => {
});
describe("Info popover trigger size contract", () => {
test("info trigger is hidden on mobile so keyboard-only guidance does not appear in touch layouts", () => {
const resolved = cn(INFO_TRIGGER_CLASSES);
expect(resolved).toContain("hidden");
expect(resolved).toContain("md:inline-flex");
});
test("info trigger is small (h-6 w-6) so it doesn't compete with Generate", () => {
const resolved = cn(INFO_TRIGGER_CLASSES);
expect(resolved).toContain("h-6");