Skip to content

Fix public kid search and friends#43

Merged
pablonete merged 20 commits into
mainfrom
pablonete-fix-kid-search
Jun 26, 2026
Merged

Fix public kid search and friends#43
pablonete merged 20 commits into
mainfrom
pablonete-fix-kid-search

Conversation

@pablonete

Copy link
Copy Markdown
Member

Home-page kid search should work before magic-link login, while avoiding expensive full-list fetches for a fast-changing registration list. This PR switches remote kid lookup to on-demand single-kid requests, keeps favorite kid profiles in localStorage, and refreshes all friend passport progress with one batch request.

Summary

  • Add public single-kid lookup and batch passport progress reads while keeping full kid-list reads staff-only.
  • Cache favorite kid profiles locally so known friends render without refetching kid metadata.
  • Add a refresh button to the Kids section that updates all friends' progress in one request.
  • Replace the old colored gender blobs with clearer outline avatar icons for boy, girl, and NR.
  • Stop deploying the public GitHub Pages demo from pushes to main.

Validation

  • npm run lint -- --quiet
  • npm run build
  • Netlify-local checks for single kid lookup, single passport, and batch passport endpoints

Load kid search results on demand, cache favorite kids locally, refresh friend passport progress in a single batch request, update kid gender icons, and stop deploying the public gh-pages demo from main pushes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@netlify

netlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploy Preview for kid-a ready!

Name Link
🔨 Latest commit 43b5fce
🔍 Latest deploy log https://app.netlify.com/projects/kid-a/deploys/6a3e1c2c58ea4000081faa5d
😎 Deploy Preview https://deploy-preview-43--kid-a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

pablonete and others added 19 commits June 25, 2026 10:48
Remove the home admin access button and guest avatar. Show a logged-in user avatar on the home page only when a kid or staff role is active, and make it navigate back to that role's page.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Refresh the initial activities seed data from opensouthcode/2026#4 with the current 16 activity titles and their GitHub issue URLs, without lead names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add short initial descriptions for all 16 activities from their GitHub issues and label issue links as more details in the activity UI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply review feedback to simplify the Anima tu dibujo activity description.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the More details label outside the issue pill and add a readable QR code for each activity issue URL in the activity header.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Let /passport?kid=... and /passport?id=... render a read-only kid passport without requiring a logged-in kid, password, or magic link.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Place the passport QR sheet printing action inside the desk user's profile popup and label it Print QRs sheet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Render the same Kids section below the passport grid so kids can view saved friends, pick new friends, refresh progress, and open friend passports from /passport.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Render a clickable QR for the currently displayed kid passport URL and reuse the modal on both logged-in and public passport views.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Render the Kids section on public passport pages too, with the viewed kid blocked and the same friend picker/list overlay behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Place the passport QR button at the top-right of the passport header area instead of floating near the bottom of the page.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add /activity-kids?activity=NN for lead pages to fetch the recent five completions plus total count without loading the full kids list, and skip the remote full snapshot for lead sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a public /activity-count endpoint and render completion count badges in the home activity grid without loading the full kids list.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Include wheel shot usage and availability in passport API responses and display a compact wheel-shot pill beside the activity counter on kid and friend passport headers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Count only completed passport activities, stop writing null completed_at passport rows during registration/reset, and remove existing null passport rows with a migration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delay activity-kids loading until the lead session activity is ready, fetch a selected kid passport only once per selection, and dedupe the home activity-count request under StrictMode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat a missing passport row as an incomplete activity on the lead page, and generate the full passport activity template in the API without relying on stored null rows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge stored passport completions onto the full 16-activity template for all passport API responses, including after completing an activity, so progress totals stay 16 even without null DB rows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid showing temporary zero completion badges in the home activity grid until activity counts have finished loading.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pablonete
pablonete merged commit e515367 into main Jun 26, 2026
5 checks passed
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.

1 participant