bito-code-review[bot] commented on code in PR #37141:
URL: https://github.com/apache/superset/pull/37141#discussion_r3717440673


##########
superset-frontend/src/dashboard/components/SliceHeader/index.tsx:
##########
@@ -229,7 +230,9 @@ const SliceHeader = forwardRef<HTMLDivElement, 
SliceHeaderProps>(
               0,
           );
 
-    const canExplore = !editMode && supersetCanExplore;
+    // Consumption-only mobile mode: no explore link, no chart controls
+    const isMobile = useIsMobile();

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Mobile path untested</b></div>
   <div id="fix">
   
   The `canExplore` guard on line 235 and the `!isMobile` gate on line 361 
introduce new conditional logic that the existing test suite never exercises. 
The test file does not mock `useIsMobile`, so it always uses the default 
(non-mobile) state. The `mobileTestUtils.ts` helpers (`mockMobileMatchMedia`, 
`enableMobileConsumptionFlag`) already exist and are ready to reuse — add at 
least one test covering the mobile viewport path to catch regressions if the 
gating logic changes.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx:
##########
@@ -963,3 +979,62 @@ test('withholds the empty-state edit action while 
previewing a version', async (
     queryByRole('button', { name: 'Edit the dashboard' }),
   ).not.toBeInTheDocument();
 });
+
+// Mobile support tests
+// Note: The main mobile tests require mocking useBreakpoint to return mobile 
breakpoints
+// which is done at the module level. These tests verify mobile-related 
component behavior.
+
+test('should not render filter bar panel on desktop when nativeFiltersEnabled 
is false', () => {
+  (useStoredSidebarWidth as jest.Mock).mockImplementation(() => [
+    100,
+    jest.fn(),
+  ]);
+  (fetchFaveStar as jest.Mock).mockReturnValue({ type: 'mock-action' });
+  (setActiveTab as jest.Mock).mockReturnValue({ type: 'mock-action' });
+
+  jest.spyOn(useNativeFiltersModule, 'useNativeFilters').mockReturnValue({
+    showDashboard: true,
+    missingInitialFilters: [],
+    dashboardFiltersOpen: true,
+    toggleDashboardFiltersOpen: jest.fn(),
+    nativeFiltersEnabled: false,
+    hasFilters: false,
+  });
+
+  const { queryByTestId } = render(<DashboardBuilder />, {
+    useRedux: true,
+    store: storeWithState({
+      ...mockState,
+      dashboardLayout: undoableDashboardLayout,
+    }),
+    useDnd: true,
+    useTheme: true,
+    useRouter: true,
+  });
+
+  // Filter panel should not be present when native filters are disabled
+  expect(queryByTestId('dashboard-filters-panel')).not.toBeInTheDocument();
+});

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Duplicate test assertion</b></div>
   <div id="fix">
   
   This test duplicates existing test at line 546 — both assert 
`queryByTestId('dashboard-filters-panel')` with `nativeFiltersEnabled: false`. 
Merge the mock setup into the existing test or remove this one to avoid 
maintenance divergence.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/components/ListView/ListView.test.tsx:
##########
@@ -359,3 +359,84 @@ describe('ListView', () => {
     expect(mockedPropsComprehensive.fetchData).toHaveBeenCalled();
   });
 });
+
+// Mobile support tests
+test('respects forceViewMode prop and hides view toggle', () => {
+  // Omit cardSortSelectOptions to avoid CardSortSelect needing initialSort
+  const { cardSortSelectOptions, ...propsWithoutSort } = 
mockedPropsComprehensive;
+  render(
+    <QueryParamProvider location={makeMockLocation()}>
+      <ListView
+        {...propsWithoutSort}
+        renderCard={() => <div>Card</div>}
+        forceViewMode="card"
+      />
+    </QueryParamProvider>,
+    { store: mockStore() },
+  );
+
+  // View toggle should not be present when forceViewMode is set
+  expect(screen.queryByLabelText('card-view')).not.toBeInTheDocument();
+  expect(screen.queryByLabelText('list-view')).not.toBeInTheDocument();
+});

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Test expects hidden toggle</b></div>
   <div id="fix">
   
   The test verifies that the view toggle is hidden when forceViewMode is set, 
but the current ListView implementation renders the toggle regardless of this 
prop. This mismatch will cause the test to fail. The toggle should not be shown 
when the view mode is forced to avoid user confusion.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ```
    -          {cardViewEnabled && (
    -            <ViewModeToggle mode={viewMode} setMode={setViewMode} />
    -          )}
    +          {cardViewEnabled && !forceViewMode && (
    +            <ViewModeToggle mode={viewMode} setMode={setViewMode} />
    +          )}
   ```
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #9148bb</i></small>
   </div><div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Misleading aria-label test selectors</b></div>
   <div id="fix">
   
   The ViewModeToggle component renders buttons with `aria-pressed` but no 
`aria-label`. Tests use `queryByLabelText('card-view')` and 
`queryByLabelText('list-view')` which will find no elements, causing this 
assertion to always pass vacuously. Either use `queryAllByRole('button')` and 
filter by `aria-pressed` attribute, or add `aria-label` props to the toggle 
buttons in `ViewModeToggle`.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #3c89a6</i></small>
   </div><div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Invalid test selector for view toggle</b></div>
   <div id="fix">
   
   Test selectors at lines 403-404 use `queryByLabelText('card-view')` and 
`queryByLabelText('list-view')`, but the toggle buttons in ListView.tsx (lines 
289-312) have no aria-label attributes. They only have `aria-pressed` for state 
and tooltip titles. The tests will return null instead of the expected 
elements. Use `queryByRole('button', { pressed: true })` or add explicit 
testids/aria-labels to the buttons.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #ee4452</i></small>
   </div><div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing aria-label for toggle buttons</b></div>
   <div id="fix">
   
   Test queries for `aria-label='card-view'` and `aria-label='list-view'` but 
the ViewModeToggle component (ListView.tsx:288-313) only sets `aria-pressed`, 
not `aria-label`. These queries will always return null.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/playwright/tests/mobile/mobile-dashboard.spec.ts:
##########
@@ -0,0 +1,284 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { test, expect, devices, Page } from '@playwright/test';
+
+// NOTE: These tests exercise the mobile consumption experience and require
+// the MOBILE_CONSUMPTION_MODE feature flag to be enabled in the target
+// environment (FEATURE_FLAGS = {"MOBILE_CONSUMPTION_MODE": True}).
+import { TIMEOUT } from '../../utils/constants';
+import { URL } from '../../utils/urls';
+
+/**
+ * Mobile dashboard viewing tests verify that dashboards can be viewed
+ * and interacted with on mobile devices.
+ *
+ * These tests assume the World Bank's Health sample dashboard exists.
+ */
+
+// Use iPhone 12 viewport for mobile tests
+const mobileViewport = devices['iPhone 12'];
+
+/**
+ * Navigates to the dashboard list, clicks the first available dashboard
+ * card, and waits for navigation into that dashboard. Skips the current
+ * test when no dashboards are available to open.
+ */
+async function openFirstDashboard(page: Page): Promise<void> {
+  await page.goto(URL.DASHBOARD_LIST);
+  await page.waitForLoadState('networkidle');
+
+  const cards = page.locator('[data-test="styled-card"]');

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Unresolvable test selector</b></div>
   <div id="fix">
   
   Selector `[data-test="styled-card"]` has no match in the source. 
`CardStyles` in `src/views/CRUD/utils.tsx:475` is a styled div wrapper with no 
data-test attribute. Tests will find 0 cards and always skip.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
docs/docs/using-superset/mobile-experience.mdx:
##########
@@ -0,0 +1,89 @@
+---
+title: Mobile Experience
+sidebar_position: 7
+version: 1
+---
+
+import useBaseUrl from "@docusaurus/useBaseUrl";
+
+# Mobile Experience
+
+Superset ships an optional, consumption-only mobile experience for viewing
+dashboards on phones and other small screens. When enabled, screens below
+768px wide get a layout built for touch: dashboards render their charts

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Factual: breakpoint off by 1px</b></div>
   <div id="fix">
   
   The mobile layout triggers at ≤767px, not <768px. Code uses `screenSMMax: 
767` from antd (per Theme.test.tsx.snap lines 453 & 704) and a fallback of 767 
in useIsMobile.ts line 24. Updating the threshold to '767px' keeps the docs 
consistent with the actual breakpoint.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/features/home/EmptyState.tsx:
##########
@@ -76,12 +77,19 @@ export interface EmptyStateProps {
 }
 
 export default function EmptyState({ tableName, tab }: EmptyStateProps) {
+  const isMobile = useIsMobile();

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Untested mobile conditional logic</b></div>
   <div id="fix">
   
   The new `isMobile` branch controls critical UX (button visibility, image 
size) but the test file does not mock `useIsMobile`. Per rule [6262], tests 
must verify actual business logic — assertions like 
`.toHaveTextContent('Nothing here yet')` don't cover the conditional rendering 
introduced at lines 90–92 and 122.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/playwright/tests/mobile/mobile-dashboard.spec.ts:
##########
@@ -0,0 +1,284 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { test, expect, devices, Page } from '@playwright/test';
+
+// NOTE: These tests exercise the mobile consumption experience and require
+// the MOBILE_CONSUMPTION_MODE feature flag to be enabled in the target
+// environment (FEATURE_FLAGS = {"MOBILE_CONSUMPTION_MODE": True}).
+import { TIMEOUT } from '../../utils/constants';
+import { URL } from '../../utils/urls';
+
+/**
+ * Mobile dashboard viewing tests verify that dashboards can be viewed
+ * and interacted with on mobile devices.
+ *
+ * These tests assume the World Bank's Health sample dashboard exists.
+ */
+
+// Use iPhone 12 viewport for mobile tests
+const mobileViewport = devices['iPhone 12'];
+
+/**
+ * Navigates to the dashboard list, clicks the first available dashboard
+ * card, and waits for navigation into that dashboard. Skips the current
+ * test when no dashboards are available to open.
+ */
+async function openFirstDashboard(page: Page): Promise<void> {
+  await page.goto(URL.DASHBOARD_LIST);
+  await page.waitForLoadState('networkidle');
+
+  const cards = page.locator('[data-test="styled-card"]');
+  const cardCount = await cards.count();
+
+  test.skip(cardCount === 0, 'No dashboards available to open on mobile');
+
+  await cards.first().click();
+
+  await page.waitForURL(url => /\/dashboard\/(?!list)/.test(url.pathname), {
+    timeout: TIMEOUT.PAGE_LOAD,
+  });
+}
+
+/**
+ * Navigates to the World Bank's Health dashboard and returns a locator
+ * for its mobile filter button. Skips the current test when the fixture
+ * has no native filters configured.
+ */
+async function getMobileFilterButton(page: Page) {
+  // Navigate directly to the World Bank's Health dashboard, which this
+  // spec's fixtures require, rather than an arbitrary first card from
+  // the list. Whether it has native filters configured depends on the
+  // fixture, so callers skip themselves when none are present.
+  await page.goto('dashboard/world_health/');
+  await page.waitForLoadState('networkidle');
+
+  // Give filters time to load
+  await page.waitForTimeout(2000);
+
+  const filterButton = page
+    .locator('[data-test="mobile-filters-trigger"]')
+    .or(page.locator('[aria-label="Open filters"]'));
+
+  const filterCount = await filterButton.count();
+
+  test.skip(
+    filterCount === 0,
+    'world_health dashboard fixture has no native filters configured; ' +
+      'cannot verify mobile filter behavior.',
+  );
+
+  return filterButton;
+}
+
+test.describe('Mobile Dashboard Viewing', () => {
+  test.use({
+    viewport: mobileViewport.viewport,
+    userAgent: mobileViewport.userAgent,
+  });
+
+  test.beforeEach(async ({ page }) => {
+    // Navigate to dashboard list to find a dashboard
+    await page.goto(URL.DASHBOARD_LIST);
+    await page.waitForLoadState('networkidle');
+  });
+
+  test('dashboard list renders in card view on mobile', async ({ page }) => {
+    // On mobile, dashboard list should show cards, not table
+    // Look for card elements
+    const cards = page.locator('[data-test="styled-card"]');
+
+    // Should have at least one card if dashboards exist
+    // (This test may need adjustment based on test data availability)
+    const cardCount = await cards.count();
+
+    // Either cards are visible, or the empty state is shown; the table
+    // view must never render on mobile
+    if (cardCount > 0) {
+      await expect(cards.first()).toBeVisible({ timeout: TIMEOUT.PAGE_LOAD });
+    } else {
+      await expect(page.locator('[data-test="empty-state"]')).toBeVisible({
+        timeout: TIMEOUT.PAGE_LOAD,
+      });
+    }
+    await expect(page.locator('[data-test="listview-table"]')).toHaveCount(0);
+  });
+
+  test('mobile search button appears in dashboard list', async ({ page }) => {
+    // On mobile, the search/filter button should appear in the header
+    const searchButton = page
+      .locator('[aria-label="Search"]')
+      .or(page.locator('[data-test="mobile-search-button"]'));
+
+    // Search button should be visible on mobile
+    await expect(searchButton.first()).toBeVisible({
+      timeout: TIMEOUT.PAGE_LOAD,
+    });
+  });
+
+  test('tapping dashboard card opens the dashboard', async ({ page }) => {
+    // Find a dashboard card
+    const cards = page.locator('[data-test="styled-card"]');
+    const cardCount = await cards.count();
+
+    if (cardCount > 0) {
+      // Click the first card
+      await cards.first().click();
+
+      // Should navigate to dashboard view
+      await page.waitForURL(url => /\/dashboard\/(?!list)/.test(url.pathname), 
{
+        timeout: TIMEOUT.PAGE_LOAD,
+      });
+
+      // Dashboard should load (look for dashboard content)
+      await expect(
+        page
+          .locator('[data-test="dashboard-content-wrapper"]')
+          .or(page.locator('.dashboard')),
+      ).toBeVisible({ timeout: TIMEOUT.PAGE_LOAD });
+    } else {
+      test.skip();
+    }
+  });
+});
+
+test.describe('Mobile Dashboard Interaction', () => {
+  test.use({
+    viewport: mobileViewport.viewport,
+    userAgent: mobileViewport.userAgent,
+  });
+
+  // Skip this test suite if no dashboards exist
+  test.beforeAll(async ({ browser }) => {
+    // browser.newPage() does not inherit the project's `storageState`, so
+    // it must be passed explicitly to reuse the authenticated session -
+    // otherwise this check hits the login page and always finds 0 cards.
+    const page = await browser.newPage({
+      viewport: mobileViewport.viewport,
+      userAgent: mobileViewport.userAgent,
+      storageState: 'playwright/.auth/user.json',
+    });
+
+    await page.goto(URL.DASHBOARD_LIST);
+    await page.waitForLoadState('networkidle');
+
+    const cards = page.locator('[data-test="styled-card"]');
+    const cardCount = await cards.count();
+
+    await page.close();
+
+    if (cardCount === 0) {
+      test.skip();
+    }
+  });
+
+  test('dashboard loads and shows charts on mobile', async ({ page }) => {
+    await openFirstDashboard(page);
+
+    // Dashboard content should be visible
+    await expect(
+      page
+        .locator('[data-test="dashboard-content-wrapper"]')
+        .or(page.locator('.dashboard')),
+    ).toBeVisible({ timeout: TIMEOUT.PAGE_LOAD });
+
+    // Charts should start loading (look for chart containers)
+    const chartContainers = page
+      .locator('[data-test="chart-container"]')
+      .or(page.locator('.dashboard-chart'));
+
+    // Wait for at least one chart to be visible (with timeout)
+    await expect(chartContainers.first()).toBeVisible({
+      timeout: TIMEOUT.PAGE_LOAD * 2,
+    });
+  });
+
+  test('dashboard header shows hamburger menu on mobile', async ({ page }) => {
+    await openFirstDashboard(page);
+
+    // Look for the hamburger menu / more actions button
+    const menuButton = page
+      .locator('[data-test="actions-trigger"]')
+      .or(page.locator('[aria-label="Menu actions trigger"]'));

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Unresolvable selector in production</b></div>
   <div id="fix">
   
   Selector `[data-test="actions-trigger"]` does not exist in production code. 
Header.test.tsx:855 references it, but grep across all source (.tsx/.ts, 
excluding tests) shows zero matches. The actual trigger uses 
`data-test="header-actions-menu"` or role-based selectors.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/features/home/RightMenu.tsx:
##########
@@ -51,9 +51,16 @@ import {
   Icons,
   Typography,
   TelemetryPixel,
+  Drawer,
+  Button,
 } from '@superset-ui/core/components';
 import type { ItemType, MenuItem } from '@superset-ui/core/components/Menu';
-import { ensureAppRoot, stripAppRoot } from 'src/utils/navigationUtils';
+import {
+  ensureAppRoot,
+  navigateTo,
+  stripAppRoot,
+} from 'src/utils/navigationUtils';
+import { useIsMobile } from 'src/hooks/useIsMobile';

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>No mobile/Drawer tests</b></div>
   <div id="fix">
   
   The new `Drawer`, `Button`, `navigateTo`, and `useIsMobile` imports are used 
across ~170 lines of new component logic (mobile state, `mobileMenuItems` 
useMemo, Drawer render) but `RightMenu.test.tsx` has zero coverage for any of 
them. All related test assertions are absent.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx:
##########
@@ -923,6 +965,36 @@ const DashboardBuilder = () => {
           `}
         />
       )}
+      {/* Mobile filters drawer */}
+      {!isNotMobile && nativeFiltersEnabled && (

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing hasFilters guard in Drawer condition</b></div>
   <div id="fix">
   
   The mobile Drawer condition at line 969 omits `hasFilters`, creating an 
asymmetry with the header button at line 642 which includes it. When 
`nativeFiltersEnabled` is true but no filters exist, the Drawer will mount and 
display a titled, empty filter panel — dead UI a user cannot interact with. Add 
`&& hasFilters` to match the established guard.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx:
##########
@@ -963,3 +979,62 @@ test('withholds the empty-state edit action while 
previewing a version', async (
     queryByRole('button', { name: 'Edit the dashboard' }),
   ).not.toBeInTheDocument();
 });
+
+// Mobile support tests
+// Note: The main mobile tests require mocking useBreakpoint to return mobile 
breakpoints
+// which is done at the module level. These tests verify mobile-related 
component behavior.
+
+test('should not render filter bar panel on desktop when nativeFiltersEnabled 
is false', () => {
+  (useStoredSidebarWidth as jest.Mock).mockImplementation(() => [
+    100,
+    jest.fn(),
+  ]);
+  (fetchFaveStar as jest.Mock).mockReturnValue({ type: 'mock-action' });
+  (setActiveTab as jest.Mock).mockReturnValue({ type: 'mock-action' });
+
+  jest.spyOn(useNativeFiltersModule, 'useNativeFilters').mockReturnValue({
+    showDashboard: true,
+    missingInitialFilters: [],
+    dashboardFiltersOpen: true,
+    toggleDashboardFiltersOpen: jest.fn(),
+    nativeFiltersEnabled: false,
+    hasFilters: false,
+  });
+
+  const { queryByTestId } = render(<DashboardBuilder />, {
+    useRedux: true,
+    store: storeWithState({
+      ...mockState,
+      dashboardLayout: undoableDashboardLayout,
+    }),
+    useDnd: true,
+    useTheme: true,
+    useRouter: true,
+  });
+
+  // Filter panel should not be present when native filters are disabled
+  expect(queryByTestId('dashboard-filters-panel')).not.toBeInTheDocument();
+});
+
+test('should render header container', () => {
+  (useStoredSidebarWidth as jest.Mock).mockImplementation(() => [
+    100,
+    jest.fn(),
+  ]);
+  (fetchFaveStar as jest.Mock).mockReturnValue({ type: 'mock-action' });
+  (setActiveTab as jest.Mock).mockReturnValue({ type: 'mock-action' });
+
+  const { queryByTestId } = render(<DashboardBuilder />, {
+    useRedux: true,
+    store: storeWithState({
+      ...mockState,
+      dashboardLayout: undoableDashboardLayout,
+    }),
+    useDnd: true,
+    useTheme: true,
+    useRouter: true,
+  });
+
+  // Header container should be present
+  expect(queryByTestId('dashboard-header-container')).toBeInTheDocument();
+});

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Duplicate test assertion</b></div>
   <div id="fix">
   
   This test duplicates existing test at line 185 which already verifies 
`queryByTestId('dashboard-header-container')` exists. The new test adds no 
additional assertions or scenarios.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #959314</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to