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:
@@ -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(() => {
|
||||
|
||||
@@ -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"];
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user