fix(FN-2297): remove duplicate mobile chat access path

- Remove the Chat action from the mobile More sheet and drop the unused onOpenQuickChat prop wiring
- Keep chat access through the dedicated mobile Chat tab and update helper copy in Settings to match
- Update MobileNavBar and mobile feature-access regression tests to assert chat is not listed in More
- Stabilize MissionManager activity pagination test by adding an explicit waitFor timeout
This commit is contained in:
Fusion
2026-04-23 08:45:53 -07:00
committed by gsxdsm
parent 4bccf3c2b4
commit 6f26bc5d51
6 changed files with 17 additions and 30 deletions

View File

@@ -773,7 +773,6 @@ function AppInner() {
onOpenUsage={modalManager.openUsage}
onViewAllProjects={handleViewAllProjects}
onRunScript={modalManager.runScript}
onOpenQuickChat={() => setQuickChatOpen(true)}
projectId={currentProject?.id}
showSkillsTab={skillsEnabled}
experimentalFeatures={{

View File

@@ -59,7 +59,6 @@ const createDefaultMobileNavProps = () => ({
activePlanningSessionCount: 0,
onOpenUsage: vi.fn(),
onRunScript: vi.fn(),
onOpenQuickChat: vi.fn(),
projectId: "proj_1",
});
@@ -159,18 +158,19 @@ describe("Mobile Feature Access Regression Guard", () => {
expect(screen.getByTestId("mobile-more-item-schedules")).toBeDefined();
expect(screen.getByTestId("mobile-more-item-github")).toBeDefined();
expect(screen.getByTestId("mobile-more-item-usage")).toBeDefined();
expect(screen.getByTestId("mobile-more-item-chat")).toBeDefined();
expect(screen.queryByTestId("mobile-more-item-chat")).toBeNull();
expect(screen.getByTestId("mobile-more-item-settings")).toBeDefined();
});
it("chat is accessible via more sheet even when FAB is hidden", () => {
it("chat is accessible via the bottom nav while remaining absent from the More sheet", () => {
const props = createDefaultMobileNavProps();
render(<MobileNavBar {...props} />);
render(<MobileNavBar {...props} view="board" />);
fireEvent.click(screen.getByTestId("mobile-nav-tab-chat"));
expect(props.onChangeView).toHaveBeenCalledWith("chat");
fireEvent.click(screen.getByTestId("mobile-nav-tab-more"));
fireEvent.click(screen.getByTestId("mobile-more-item-chat"));
expect(props.onOpenQuickChat).toHaveBeenCalledOnce();
expect(screen.queryByTestId("mobile-more-item-chat")).toBeNull();
});
it("mobile nav bar renders only on mobile viewport and hides for modal or desktop", () => {

View File

@@ -55,7 +55,6 @@ export interface MobileNavBarProps {
activePlanningSessionCount?: number;
onOpenUsage?: () => void;
onRunScript?: (name: string, command: string) => void;
onOpenQuickChat?: () => void;
projectId?: string;
onViewAllProjects?: () => void;
/** Whether to show the skills tab */
@@ -103,7 +102,6 @@ export function MobileNavBar({
activePlanningSessionCount = 0,
onOpenUsage,
onRunScript,
onOpenQuickChat,
projectId,
onViewAllProjects,
showSkillsTab,
@@ -511,16 +509,6 @@ export function MobileNavBar({
<span>Projects</span>
</button>
<button
type="button"
className="mobile-more-item"
data-testid="mobile-more-item-chat"
onClick={() => handleMoreAction(onOpenQuickChat)}
>
<MessageSquare />
<span>Chat</span>
</button>
<button
type="button"
className="mobile-more-item"

View File

@@ -1046,7 +1046,7 @@ export function SettingsModal({
/>
Show quick chat button
</label>
<small>Show the floating chat button in the dashboard. Chat is still accessible from the More menu.</small>
<small>Show the floating chat button in the dashboard. Chat is still accessible from the Chat tab in the mobile navigation.</small>
</div>
</>
);

View File

@@ -953,7 +953,7 @@ describe("MissionManager", () => {
await waitFor(() => {
expect(screen.getByText("Mission event 65")).toBeDefined();
expect(screen.queryByTestId("mission-activity-load-more")).toBeNull();
});
}, { timeout: 5000 });
});
it("auto-scrolls to latest mission activity on initial load", async () => {

View File

@@ -47,7 +47,6 @@ const createDefaultProps = () => ({
onOpenUsage: vi.fn(),
onViewAllProjects: vi.fn(),
onRunScript: vi.fn(),
onOpenQuickChat: vi.fn(),
projectId: "proj_1",
});
@@ -231,7 +230,7 @@ describe("MobileNavBar", () => {
expect(screen.getByTestId("mobile-more-item-github")).toBeDefined();
expect(screen.getByTestId("mobile-more-item-usage")).toBeDefined();
expect(screen.getByTestId("mobile-more-item-projects")).toBeDefined();
expect(screen.getByTestId("mobile-more-item-chat")).toBeDefined();
expect(screen.queryByTestId("mobile-more-item-chat")).toBeNull();
expect(screen.queryByTestId("mobile-more-item-roadmaps")).toBeNull();
expect(screen.queryByTestId("mobile-more-item-insights")).toBeNull();
expect(screen.getByTestId("mobile-more-item-settings")).toBeDefined();
@@ -305,15 +304,16 @@ describe("MobileNavBar", () => {
expect(props.onViewAllProjects).toHaveBeenCalledOnce();
});
it("calls onOpenQuickChat from the Chat more-sheet item", () => {
it("chat remains accessible via the primary mobile tab and is absent from More", () => {
const props = createDefaultProps();
const { container } = render(<MobileNavBar {...props} />);
const { container } = render(<MobileNavBar {...props} view="board" />);
fireEvent.click(screen.getByTestId("mobile-nav-tab-chat"));
expect(props.onChangeView).toHaveBeenCalledWith("chat");
fireEvent.click(screen.getByTestId("mobile-nav-tab-more"));
fireEvent.click(screen.getByTestId("mobile-more-item-chat"));
expect(container.querySelector(".mobile-more-sheet")).toBeNull();
expect(props.onOpenQuickChat).toHaveBeenCalledOnce();
expect(container.querySelector(".mobile-more-sheet")).not.toBeNull();
expect(screen.queryByTestId("mobile-more-item-chat")).toBeNull();
});
it("closes sheet on backdrop click", () => {