fix(webui): align standalone page widths with conversations

Reuse the conversation content width and gutters for Apps, Skills, Automations, and Channels so their main panes are no longer constrained by the narrower settings frame.

Make automation columns respond to their container widths to preserve readable messages in narrow panes. Keep the sidebar, regular settings, and existing conversation appearance unchanged, with focused layout regression coverage.

Refs NAN-111
This commit is contained in:
Xubin Ren committed 2026-09-10 21:18:54 +08:00
1 parent 4ed04a5df9
commit d7de5d5344
7 files changed
+70 -12

No files matched your search

+16
View File
@@ -146,6 +146,22 @@ describe("Settings system domains", () => {
});
it.each(["apps", "skills", "automations", "channels"] as const)(
"uses the conversation-width content frame for the standalone %s page",
(initialSection) => {
renderSettingsView({ initialSection, initialSettings: settingsPayload(), showSidebar: false });
expect(screen.getByTestId("settings-section-transition")).toHaveClass("settings-feature-page");
},
);
it("keeps the regular settings page at its existing width", () => {
renderSettingsView({ initialSection: "models", initialSettings: settingsPayload() });
expect(screen.getByTestId("settings-section-transition")).toHaveClass("settings-grid");
expect(screen.getByTestId("settings-section-transition")).not.toHaveClass("settings-feature-page");
});
it("does not show the Settings kicker on the standalone Automations surface", async () => {
const onBackToChat = vi.fn();
vi.stubGlobal("fetch", vi.fn(async (input: RequestInfo | URL) => {
+1
View File
@@ -128,6 +128,7 @@ export function renderSettingsView(
| "overview"
| "appearance"
| "apps"
| "skills"
| "channels"
| "automations"
| "advanced"
+8
View File
@@ -306,6 +306,14 @@ describe("ThreadViewport", () => {
expect(screen.getByTestId("thread-message-region")).toHaveClass("min-w-0");
});
it("uses the shared content-column width for conversation messages", () => {
render(<ThreadViewport messages={messages} isStreaming={false} composer={<div>composer</div>} />);
expect(screen.getByTestId("thread-message-region").firstElementChild).toHaveClass(
"mx-auto", "w-full", "max-w-[var(--content-column-width)]",
);
});
it("top-aligns a short active turn while the agent is responding", () => {
render(
<ThreadViewport