Skip to content

Comments

Add pull-to-refresh on shopping lists and list detail screens#5

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-pull-to-refresh-action
Draft

Add pull-to-refresh on shopping lists and list detail screens#5
Copilot wants to merge 2 commits intomainfrom
copilot/add-pull-to-refresh-action

Conversation

Copy link

Copilot AI commented Nov 28, 2025

Adds pull-to-refresh capability to both the main shopping lists screen and individual list detail screens, allowing users to manually refresh data.

Changes

  • Shopping Lists Screen (index.tsx): Wire up refreshing and onRefresh props on FlatList using React Query's isRefetching and refetch
  • List Detail Screen (list-detail.tsx): Same pattern for the items FlatList

Implementation

const { data: lists, isLoading, isError, error, refetch, isRefetching } = useShoppingLists();

<FlatList
  testID="shopping-lists-flatlist"
  data={lists}
  refreshing={isRefetching ?? false}
  onRefresh={refetch}
  // ...
/>

Tests (TDD)

Added 4 tests verifying FlatList refresh props are configured and refetch is called on pull gesture.

Original prompt

This section details on the original issue you should resolve

<issue_title>there's should be "pull to refresh" action on the shopping lists and individual list screens</issue_title>
<issue_description></issue_description>

<agent_instructions>do this TDD style.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…creens (TDD)

Co-authored-by: akisma <332125+akisma@users.noreply.github.com>
Copilot AI changed the title [WIP] Add pull to refresh action for shopping lists Add pull-to-refresh on shopping lists and list detail screens Nov 28, 2025
Copilot AI requested a review from akisma November 28, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

there's should be "pull to refresh" action on the shopping lists and individual list screens

2 participants