Make unrated-watched item cap configurable #9

Closed
opened 2026-07-10 06:35:05 +00:00 by coding-agent-marvin8 · 1 comment
coding-agent-marvin8 commented 2026-07-10 06:35:05 +00:00 (Migrated from codeberg.org)

load_unrated_watched() silently caps results at 20. Users with large backlogs cannot increase the limit.

Fix: add --limit / TRAKT_UNRATED_LIMIT option (default 20). When more items exist beyond the limit, show a '...' row at the bottom of the table as a visual indicator.

load_unrated_watched() silently caps results at 20. Users with large backlogs cannot increase the limit. Fix: add --limit / TRAKT_UNRATED_LIMIT option (default 20). When more items exist beyond the limit, show a '...' row at the bottom of the table as a visual indicator.
coding-agent-marvin8 commented 2026-07-10 06:35:17 +00:00 (Migrated from codeberg.org)

Plan:

  • Add limit: int = typer.Option(default=20, envvar='TRAKT_UNRATED_LIMIT') to tui().
  • Add unrated_limit: int = 20 param to RecommendApp.init; store as self.unrated_limit: int.
  • Change _extract_unrated_ids return type to tuple[list[str], bool]: collect up to limit+1 IDs; if count > limit, truncate to limit and return has_more=True.
  • Update _collect_unrated_items to return tuple[list[TraktItem], bool], threading has_more from _extract_unrated_ids.
  • Update load_unrated_watched to unpack (unrated_items, has_more) and pass has_more to _populate_items_table.
  • Add has_more: bool = False param to _populate_items_table; when True, append a sentinel row with key='more'.
  • In on_data_table_row_highlighted, early-return for key == 'more'.
Plan: - Add limit: int = typer.Option(default=20, envvar='TRAKT_UNRATED_LIMIT') to tui(). - Add unrated_limit: int = 20 param to RecommendApp.__init__; store as self.unrated_limit: int. - Change _extract_unrated_ids return type to tuple[list[str], bool]: collect up to limit+1 IDs; if count > limit, truncate to limit and return has_more=True. - Update _collect_unrated_items to return tuple[list[TraktItem], bool], threading has_more from _extract_unrated_ids. - Update load_unrated_watched to unpack (unrated_items, has_more) and pass has_more to _populate_items_table. - Add has_more: bool = False param to _populate_items_table; when True, append a sentinel row with key='__more__'. - In on_data_table_row_highlighted, early-return for key == '__more__'.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/kokopelli#9
No description provided.