Skip to content

feat: groups home page with authenticated layout shell#99

Merged
suesuee merged 2 commits intodevelopfrom
feat/groups-home-page
Mar 2, 2026
Merged

feat: groups home page with authenticated layout shell#99
suesuee merged 2 commits intodevelopfrom
feat/groups-home-page

Conversation

@kevinrutledge
Copy link
Copy Markdown
Collaborator

Developer

Kevin Rutledge

Closes #87

What changed?

  • Replaced (protected) layout header with sidebar + top bar layout shell using TopBarActionProvider context for per-page action buttons
  • Created groups page at /groups with 3-column card grid, role-based data fetching (admin sees all groups, member sees own groups), and full modal state machine (detail → edit → delete/add members, create)
  • Wired all group modals to server actions (createContactGroup, updateContactGroup, deleteContactGroup, addMembers) with loading states, toast notifications, and data refresh
  • Added fetchEnrichedGroup server action for on-demand member detail loading when clicking a group card
  • Updated navigation.ts with Messages, Events, Settings routes
  • Moved mock portal to (dev) route group to avoid inheriting public layout, redesigned to match real Paso Food Co-op portal
  • Added Playwright e2e test suite (24 tests) covering group CRUD flows, modal navigation chains, and auth setup with admin/member storage state

How to test

  1. Run npm run build - should pass
  2. Run npm run dev and navigate to /dev/mock-portal - login as admin (100001)
  3. Navigate to /groups - see card grid with "Groups" heading and sidebar/top bar layout
  4. Click a group card → detail modal shows name, description, members
  5. Detail → Edit → modify name → Save Changes → toast + card updates
  6. Edit → Delete → Confirm → toast + card removed
  7. Edit → Add Members → select members → Save → members updated
  8. Click add card or "+ New Group" in top bar → create modal → submit → new card appears
  9. Login as member (100003) - see "My Groups" heading with only owned groups
  10. Run npx playwright test - all e2e tests pass

Checklist

  • Code works and is readable
  • Tested locally
  • Commits follow conventional commits
  • Assigned reviewers

@kevinrutledge kevinrutledge requested a review from suesuee March 2, 2026 01:18
@suesuee suesuee merged commit 55020cd into develop Mar 2, 2026
2 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.

feat: groups home page with authenticated layout shell

2 participants