github-samples / github-samples/pets-workshop
1-hour workshop: Include the page data owner in the filter exercise context
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 80
- Forks
- 161
- Avg merge
- 31m
- Merged PRs (30d)
- 1
Description
Problem
Step 4 asks learners to add only app/server/app.py and app/client/src/components/DogList.astro to Copilot Edits. However, app/client/src/pages/index.astro owns the /api/dogs request, reads URL query parameters, and renders pagination. DogList.astro only receives and renders a dogs prop.
Without the page file in context, Copilot can produce a partial client-side filter or miss the request and pagination changes needed for the documented server-side filtering flow.
Suggested change
Update content/1-hour/4-add-feature.md to include app/client/src/pages/index.astro in the required context and explain at a high level which file owns the API request versus presentation.
Acceptance criteria
- Step 4 includes
app/client/src/pages/index.astroin the files supplied to Copilot. - The expected flow from filter controls to URL/API query parameters is stated.
- Existing pagination parameters are preserved, or the page is deliberately reset, when filters change.
- The exercise is validated from a fresh template copy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with content/1-hour/4-add-feature.md, then read app/client/src/pages/index.astro, app/client/src/components/DogList.astro, and app/server/app.py to distinguish request, filtering, pagination, and presentation responsibilities. Validate the workshop from a fresh template copy; done means Step 4 names the page file, explains the query flow, and documents how pagination behaves when filters change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100