feat(FN-4077): fix mobile switcher trigger sizing in ChatView

Fixes the mobile switcher trigger sizing in ChatView by updating CSS dimensions and adjusting the component's conditional rendering logic, with corresponding test coverage added.

Fusion-Task-Id: FN-4077

Fusion-Task-Lineage: 966eafb9-35fd-4ac6-ab4a-42c0e96a2584
This commit is contained in:
Fusion
2026-05-11 23:07:50 -07:00
committed by gsxdsm
parent 7b5ec3d063
commit f0d4709c2e
4 changed files with 29 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ import { mkdtempSync } from "node:fs";
import { rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { setTimeout as delay } from "node:timers/promises";
import { vi } from "vitest";
vi.mock("node:child_process", async (importOriginal) => {
@@ -52,9 +53,10 @@ export function createTaskStoreTestHarness() {
afterEach: async () => {
vi.useRealTimers();
store.stopWatching();
// Yield one microtask tick without relying on process.nextTick,
// which can be faked in timer-heavy suites and hang teardown.
await Promise.resolve();
// Yield one real event-loop turn so fs.watch cleanup settles before
// close()/rm() run. Promise.resolve() is only a microtask and has proven
// too weak for some full-suite watcher teardowns.
await delay(0);
store.close();
await rm(rootDir, { recursive: true, force: true, maxRetries: 5, retryDelay: 50 });
await rm(globalDir, { recursive: true, force: true, maxRetries: 5, retryDelay: 50 });