FN-041: add chat message layout to Settings search

Make the conversation layout setting discoverable across Settings search presentations.

- Add the project-scoped chat message layout entry to the Appearance search index.
- Cover desktop, mobile, and embedded Settings search with regression tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-041-settings-search-chat-layout.md   |  7 +++
 .../__tests__/SettingsModal.general.test.tsx       | 51 ++++++++++++++++++++++
 .../settings/sections/AppearanceSection.search.ts  | 15 +++++++
 3 files changed, 73 insertions(+)

Fusion-Task-Id: FN-041
Fusion-Task-Lineage: 614cded0-a97a-4343-96f7-22eeb483a54b
Co-authored-by: Fusion <noreply@runfusion.ai>
This commit is contained in:
Fusion Agent
2026-08-19 14:46:37 +00:00
parent e80fef3fe0
commit 06649a0288
3 changed files with 73 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
---
"@runfusion/fusion": patch
---
summary: Make the conversation layout setting discoverable in dashboard Settings search.
category: fix
dev: Adds the missing Appearance search entry and focused cross-surface regression coverage.

View File

@@ -770,6 +770,57 @@ describe("SettingsModal", () => {
expect(screen.getAllByText(/No settings sections match/).length).toBeGreaterThan(0);
});
/*
* FNXC:SettingsSearch 2026-08-19-14:19:
* The migrated index must make the existing conversation-layout row discoverable
* through every Settings presentation: desktop search is open, mobile search is
* expanded explicitly, and embedded Settings uses the same production modal.
* Clicking each result verifies the real row anchor rather than a test-only stub.
*/
it.each([
{
name: "desktop modal by label",
viewport: "desktop" as const,
presentation: undefined,
query: "conversation layout",
expandSearch: false,
},
{
name: "mobile modal by help text",
viewport: "mobile" as const,
presentation: undefined,
query: "full width",
expandSearch: true,
},
{
name: "embedded Settings by field key",
viewport: "mobile" as const,
presentation: "embedded" as const,
query: "chatMessageLayout",
expandSearch: true,
},
])("discovers chat message layout in the $name", async ({ viewport, presentation, query, expandSearch }) => {
viewportMode = viewport;
renderModal({ presentation });
await waitForSettingsModalReady();
if (expandSearch) {
await settingsModalUser.click(screen.getByLabelText("Show search"));
}
const search = screen.getByTestId("settings-search-input");
await settingsModalUser.type(search, query);
expect(screen.getAllByTestId("settings-search-hit-chatMessageLayout")).toHaveLength(1);
// FNXC:SettingsSearch 2026-08-19-14:19: jsdom lacks the browser scroll API used by the production row-jump effect.
Object.defineProperty(HTMLElement.prototype, "scrollIntoView", {
configurable: true,
value: vi.fn(),
});
await settingsModalUser.click(screen.getByTestId("settings-search-hit-chatMessageLayout"));
expect(screen.getAllByTestId("settings-search-hit-chatMessageLayout")).toHaveLength(1);
expect(document.querySelectorAll('[data-settings-key="chatMessageLayout"]')).toHaveLength(1);
});
it("keeps duplicate global and project labels searchable while preserving no-results clearing", async () => {
renderModal();
await waitForSettingsModalReady();

View File

@@ -8,6 +8,21 @@
import type { SettingsSearchEntry } from "../search/types";
export const appearanceSearchEntries: SettingsSearchEntry[] = [
/*
* FNXC:SettingsSearch 2026-08-19-14:19:
* Every rendered descriptor must have one co-located searchable entry. Keep
* the project-scoped conversation layout metadata identical to AppearanceSection
* so label, help, and field-key queries all reach the existing control.
*/
{
sectionId: "appearance",
key: "chatMessageLayout",
labelKey: "settings.appearance.chatMessageLayout",
labelFallback: "Conversation layout",
helpKey: "settings.appearance.chatMessageLayoutHelp",
helpFallback:
"Choose Bubbles or Full width for normal Chat, Quick Chat, dock Chat, task Activity, and Planner Chat. Project-scoped; default: Bubbles.",
},
{
sectionId: "appearance",
key: "openTasksInRightSidebar",