fix(FN-2057): move DocumentsView base styles outside mobile media query

- Move the core DocumentsView, document group, and document card styles to global scope so they apply on desktop and tablet
- Keep the max-width: 768px block focused on mobile-only agent and skills layout overrides
- Preserve existing design tokens and interaction states while restoring expected non-mobile DocumentsView styling
This commit is contained in:
Fusion
2026-04-18 15:20:33 -07:00
committed by gsxdsm
parent 7a230cfd3d
commit 60877e2991
6 changed files with 545 additions and 509 deletions

View File

@@ -436,7 +436,15 @@ export function QuickChatFAB({
fetchModels()
.then((response) => {
setModels(response.models ?? []);
const loadedModels = response.models ?? [];
setModels(loadedModels);
// Auto-select first model when no agents exist and no model selected yet
if (agents.length === 0 && loadedModels.length > 0 && !selectedModel) {
const firstModel = loadedModels[0];
if (firstModel) {
setSelectedModel(`${firstModel.provider}/${firstModel.id}`);
}
}
})
.catch((error: unknown) => {
console.error("[QuickChatFAB] Failed to load models:", error);
@@ -445,7 +453,7 @@ export function QuickChatFAB({
.finally(() => {
setModelsLoading(false);
});
}, [isOpen]);
}, [isOpen, agents.length, selectedModel]);
// Initialize/switch quick chat session whenever the selected target changes.
useEffect(() => {

View File

@@ -84,7 +84,7 @@ const AUTO_ARCHIVE_DEFAULT_AFTER_DAYS = 2;
const KNOWN_EXPERIMENTAL_FEATURES: Record<string, string> = {
insights: "Insights",
roadmap: "Roadmaps",
memoryView: "Memory",
memoryView: "Memory Editor",
};
export type SectionId = SettingsSection["id"];

View File

@@ -1,5 +1,5 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import { fireEvent, render, screen, waitFor, within } from "@testing-library/react";
import type { Agent, ChatSession } from "../../api";
import * as apiModule from "../../api";
import { useAgents } from "../../hooks/useAgents";
@@ -132,7 +132,8 @@ async function selectModelOption(optionName: string) {
fireEvent.click(trigger);
const optionLabel = await screen.findByText(optionName);
const listbox = await screen.findByRole("listbox");
const optionLabel = await within(listbox).findByText(optionName);
const option = optionLabel.closest('[role="option"]') ?? optionLabel;
fireEvent.click(option);
}