refactor(stalker): drop unused limit state from selection feature (#1402)

* refactor(stalker): drop unused limit state from selection feature

The `limit` field and `setLimit` method lost their last consumers when
catalog pagination was replaced by infinite scroll (#1392/#1395): the
facade no longer calls setLimit and getTotalPages is gone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(stalker): retire pagination API from the store baseline

The compatibility baseline still told future refactors to preserve
`limit`/`setLimit` and `getTotalPages`, all three of which are gone with
the catalog pagination removal. Record them in the doc's existing
Removed section instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5 authored and GitHub committed 2026-08-10 15:02:41 +02:00
1 parent a9e07d696f
commit 5ad86e094c
5 files changed
+7 -16

No files matched your search

@@ -18,7 +18,6 @@ Direct signal properties currently exposed by `signalStore`:
- `selectedVodId: string | undefined`
- `selectedSerialId: string | undefined`
- `selectedItvId: string | undefined`
- `limit: number`
- `page: number`
- `searchPhrase: string`
- `currentPlaylist: PlaylistMeta | undefined`
@@ -37,7 +36,6 @@ Direct signal properties currently exposed by `signalStore`:
## Public Computed Selectors
- `getTotalPages: number`
- `getPaginatedContent: StalkerContentItem[]`
- `isPaginatedContentLoading: boolean`
- `isPaginatedContentFailed: unknown`
@@ -69,6 +67,13 @@ Removed:
owns mode routing plus the lazy portal repair; no facade alias is provided
because reinstating one would reintroduce the drift the shared predicate
exists to prevent.
- `limit`, `setLimit(...)` and `getTotalPages` — deleted with the catalog
pagination removal (#1392, #1395). Catalogs now accumulate server-paged
results into one deduplicated list, so `hasMoreContent` (accumulated length
vs `total_items`) answers what `getTotalPages` used to, and no caller reads a
page size: the portal decides how large a page is. No facade alias is
provided, because a surviving `limit` would advertise a client-side window
that the append path does not honour.
During refactor:
@@ -82,7 +87,6 @@ During refactor:
- `setSelectedSerialId(id: string): void`
- `setSelectedVodId(id: string): void`
- `setSelectedItvId(id: string): void`
- `setLimit(limit: number): void`
- `setPage(page: number): void`
- `setCurrentPlaylist(playlist: PlaylistMeta | undefined): Promise<void>`
- `setSelectedItem(selectedItem: StalkerVodSource | null | undefined): void`
@@ -81,7 +81,6 @@ describe('StalkerStore API compatibility smoke', () => {
'selectedVodId',
'selectedSerialId',
'selectedItvId',
'limit',
'page',
'searchPhrase',
'currentPlaylist',
@@ -133,7 +132,6 @@ describe('StalkerStore API compatibility smoke', () => {
'setSelectedSerialId',
'setSelectedVodId',
'setSelectedItvId',
'setLimit',
'setPage',
'setCurrentPlaylist',
'setSelectedItem',
@@ -36,7 +36,6 @@ const TestContentStore = signalStore(
selectedCategoryId: undefined as string | null | undefined,
searchPhrase: '',
page: 0,
limit: 14,
}),
withMethods((store) => ({
setCurrentPlaylist(playlist: PlaylistMeta | undefined) {
@@ -22,7 +22,6 @@ export interface StalkerSelectionState {
selectedVodId: string | undefined;
selectedSerialId: string | undefined;
selectedItvId: string | undefined;
limit: number;
page: number;
searchPhrase: string;
selectedItem: StalkerVodSource | null | undefined;
@@ -34,7 +33,6 @@ const initialSelectionState: StalkerSelectionState = {
selectedVodId: undefined,
selectedSerialId: undefined,
selectedItvId: undefined,
limit: 14,
page: 0,
searchPhrase: '',
selectedItem: undefined,
@@ -80,13 +78,6 @@ export function withStalkerSelection() {
setSelectedItvId(id: string) {
patchState(store, { selectedItvId: id });
},
setLimit(limit: number) {
if (store.limit() === limit) {
return;
}
patchState(store, { limit });
},
setPage(page: number) {
if (store.page() === page) {
return;
@@ -27,7 +27,6 @@ export interface StalkerSelectionStoreContract {
selectedVodId(): string | undefined;
selectedSerialId(): string | undefined;
selectedItvId(): string | undefined;
limit(): number;
page(): number;
searchPhrase(): string;
selectedItem(): StalkerVodSource | null | undefined;