feat(FN-3206): restore mobile scroll container ownership and fix regression
This merge brings in model fallback notifications, async planning draft sync, mobile scroll container fixes, plugin schema initialization hooks, a new ResearchTaskActionModal, viewport-conditional mission split layout, and test infrastructure improvements including split vitest environments and a cr Fusion-Task-Id: FN-3206
This commit is contained in:
@@ -1067,13 +1067,19 @@
|
||||
}
|
||||
|
||||
.agents-split-layout {
|
||||
display: block;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.agents-split-sidebar {
|
||||
border-right: 0;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.agents-split-sidebar--hidden-mobile {
|
||||
@@ -1083,6 +1089,9 @@
|
||||
.agents-split-detail {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.agents-split-detail--hidden-mobile {
|
||||
@@ -1102,8 +1111,17 @@
|
||||
.agents-mobile-back-btn {
|
||||
min-height: calc(var(--space-lg) * 2 + var(--space-xs));
|
||||
}
|
||||
|
||||
.agents-view-content {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overscroll-behavior: contain;
|
||||
padding: var(--space-md);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 769px) and (max-width: 1024px) {
|
||||
.agents-split-layout {
|
||||
grid-template-columns: minmax(calc(var(--space-xl) * 10), calc(var(--space-xl) * 11 + var(--space-md))) minmax(0, 1fr);
|
||||
|
||||
@@ -272,6 +272,8 @@ describe("AgentsView", () => {
|
||||
mockViewportMode.mockReturnValue("mobile");
|
||||
const { container } = render(<AgentsView addToast={mockAddToast} />);
|
||||
|
||||
expect(container.querySelector(".agents-split-layout")).toBeTruthy();
|
||||
expect(container.querySelector(".agents-view-content")).toBeTruthy();
|
||||
expect(container.querySelector(".agents-split-sidebar")).toBeTruthy();
|
||||
expect(container.querySelector(".agents-split-detail--hidden-mobile")).toBeTruthy();
|
||||
|
||||
@@ -279,14 +281,18 @@ describe("AgentsView", () => {
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByRole("button", { name: "Agents" })).toBeTruthy();
|
||||
expect(screen.getByTestId("agent-detail-view")).toHaveAttribute("data-inline", "true");
|
||||
});
|
||||
|
||||
expect(container.querySelector(".agents-split-sidebar--hidden-mobile")).toBeTruthy();
|
||||
expect(container.querySelector(".agents-split-detail--hidden-mobile")).toBeNull();
|
||||
|
||||
fireEvent.click(screen.getByRole("button", { name: "Agents" }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText("Select an agent")).toBeInTheDocument();
|
||||
});
|
||||
expect(container.querySelector(".agents-split-detail--hidden-mobile")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("shows a loading indicator while the initial agents fetch is pending", async () => {
|
||||
|
||||
@@ -225,6 +225,23 @@ describe("agents-view mobile CSS", () => {
|
||||
expect(block).toContain("flex-wrap: wrap");
|
||||
});
|
||||
|
||||
it("keeps mobile split layout constrained so inner panes own vertical scrolling", () => {
|
||||
expect(mobileMediaBlock).toContain(".agents-split-layout");
|
||||
expect(extractRuleBlock(mobileMediaBlock, ".agents-split-layout")).toContain("min-height: 0");
|
||||
expect(extractRuleBlock(mobileMediaBlock, ".agents-split-layout")).toContain("height: 100%");
|
||||
|
||||
expect(extractRuleBlock(mobileMediaBlock, ".agents-split-sidebar")).toContain("min-height: 0");
|
||||
expect(extractRuleBlock(mobileMediaBlock, ".agents-split-sidebar")).toContain("overflow: hidden");
|
||||
|
||||
expect(extractRuleBlock(mobileMediaBlock, ".agents-split-detail")).toContain("min-height: 0");
|
||||
expect(extractRuleBlock(mobileMediaBlock, ".agents-split-detail")).toContain("overflow: hidden");
|
||||
|
||||
const contentBlock = extractRuleBlock(mobileMediaBlock, ".agents-view-content");
|
||||
expect(contentBlock).toContain("overflow-y: auto");
|
||||
expect(contentBlock).toContain("-webkit-overflow-scrolling: touch");
|
||||
expect(contentBlock).toContain("overscroll-behavior: contain");
|
||||
});
|
||||
|
||||
it("stacks grouped filter controls on mobile", () => {
|
||||
expect(mobileMediaBlock).toContain(".agent-controls-filters");
|
||||
const block = extractRuleBlock(mobileMediaBlock, ".agent-controls-filters");
|
||||
|
||||
Reference in New Issue
Block a user