diff --git a/frontend-modern/src/features/standalone/StandalonePageSurface.tsx b/frontend-modern/src/features/standalone/StandalonePageSurface.tsx index 6cde6f7ac..32acabab0 100644 --- a/frontend-modern/src/features/standalone/StandalonePageSurface.tsx +++ b/frontend-modern/src/features/standalone/StandalonePageSurface.tsx @@ -180,11 +180,7 @@ export function StandalonePageSurface() { ), ); const setAvailabilityView = (view: AvailabilityChecksView) => { - const defaultView = resolveAvailabilityChecksView(undefined, model().availabilityChecks.length); - setSearchParams( - { [STANDALONE_QUERY_PARAMS.view]: view === defaultView ? null : view }, - { replace: true }, - ); + setSearchParams({ [STANDALONE_QUERY_PARAMS.view]: view }, { replace: true }); }; const availabilityPosture = createMemo(() => buildStandalonePostureSummary(model().availabilityChecks), diff --git a/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx b/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx index 34532b89b..326d25360 100644 --- a/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx +++ b/frontend-modern/src/features/standalone/__tests__/StandalonePageSurface.test.tsx @@ -321,7 +321,7 @@ describe('StandalonePageSurface', () => { expect(screen.getByTestId('availability-checks-table')).toHaveAttribute('data-view', 'fleet'); }); - it('keeps an explicit table choice stable for an estate-sized inventory', () => { + it('keeps every explicit presentation choice stable for an estate-sized inventory', () => { mocks.pathname = '/standalone/availability'; mocks.searchParams = { view: 'table' }; mocks.useUnifiedResources.mockReturnValue({ @@ -347,7 +347,7 @@ describe('StandalonePageSurface', () => { const props = mocks.AvailabilityChecksTable.mock.calls.at(-1)?.[0]; props?.onViewChange?.('fleet'); - expect(mocks.setSearchParams).toHaveBeenCalledWith({ view: null }, { replace: true }); + expect(mocks.setSearchParams).toHaveBeenCalledWith({ view: 'fleet' }, { replace: true }); props?.onViewChange?.('table'); expect(mocks.setSearchParams).toHaveBeenCalledWith({ view: 'table' }, { replace: true });