Skip to content

davidasix/clients - #7

Merged
DavidASix merged 24 commits into
mainfrom
davidasix/clients
Jul 22, 2026
Merged

davidasix/clients#7
DavidASix merged 24 commits into
mainfrom
davidasix/clients

Conversation

@DavidASix

@DavidASix DavidASix commented Jul 22, 2026

Copy link
Copy Markdown
Owner

This adds the local client database schema, generated migration setup, and representative development seed data. It also turns the clients tab into a searchable, status-filtered list with swipeable views and clearer clinical details.

  • add the typed client schema, SQLite constraints, bundled migration manifest generation, and initial migration
  • add development seed data covering prenatal, postpartum, and out-of-care clients
  • add client search, status tabs, horizontal paging, alphabetical grouping, and empty states
  • extract reusable client list components and tested filtering, sorting, status, and date-summary helpers
  • move the theme toggle into settings and update the mobile, style, and technical docs

Screenshots

All clients Search
All clients view showing mixed client statuses Client search filtered to Amina

@DavidASix
DavidASix requested a review from Copilot July 22, 2026 14:05
@DavidASix

Copy link
Copy Markdown
Owner Author

@codex review this

@DavidASix
DavidASix marked this pull request as ready for review July 22, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a typed local SQLite “clients” schema (with Drizzle migrations + a generated Metro-friendly migrations manifest) and seeds representative development data, then upgrades the mobile Clients tab into a searchable, status-filtered, horizontally swipeable set of list views with extracted reusable list components. It also relocates the theme toggle into Settings and updates the product/tech/style documentation to match the new UX and data layer.

Changes:

  • Add clients Drizzle schema with SQLite constraints, initial migration, and a script to generate a static migrations.js manifest for bundling.
  • Add development seed data + wire dev seeding into DB initialization.
  • Rebuild the Clients tab UX (search, status tabs, paging, alphabetical sectioning, clearer row metadata) and document the updated behavior.

Reviewed changes

Copilot reviewed 25 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
documentation/TECHSPEC.md Documents the local DB + migration manifest approach and refreshes formatting.
documentation/STYLES.md Updates list-row/layout guidance to match the new client list presentation.
documentation/MOBILE_APP.md Specifies the new Clients screen behaviors (paging, search, grouping, row details).
apps/mobile/src/lib/client-list.ts Adds shared client-list helpers (status derivation, filtering, grouping, date summary).
apps/mobile/src/lib/tests/client-list.test.ts Adds unit tests for the new client-list helper functions.
apps/mobile/src/db/utils.ts Adds SQL helper for building safe IN (...) lists from static schema values.
apps/mobile/src/db/schema/clients.ts Introduces the typed clients table schema and CHECK constraints.
apps/mobile/src/db/schema.ts Re-exports the schema from the new schema/clients module.
apps/mobile/src/db/index.ts Runs migrations and (in dev) seeds the DB after initialization.
apps/mobile/src/components/ClientsTest.tsx Removes the old ad-hoc client test UI.
apps/mobile/src/components/ClientStatusFilters.tsx Adds the status filter tab strip component.
apps/mobile/src/components/ClientListView.tsx Adds a SectionList-based client list view with optional alpha headers and empty states.
apps/mobile/src/components/ClientListItem.tsx Adds the new client row presentation with status badge and clinical/date metadata.
apps/mobile/scripts/seed/index.ts Adds the seed entrypoint to populate dev databases.
apps/mobile/scripts/seed/clients.ts Adds representative client seed records and insertion logic.
apps/mobile/scripts/generate-migrations-manifest.mjs Generates a static migration import manifest so Metro bundles all SQL files.
apps/mobile/package.json Extends db:generate to also generate the migrations manifest.
apps/mobile/drizzle/migrations.js Adds generated static migration manifest consumed by the migrator.
apps/mobile/drizzle/meta/0000_snapshot.json Adds Drizzle snapshot metadata for the initial migration.
apps/mobile/drizzle/meta/_journal.json Adds the Drizzle journal for applied migrations.
apps/mobile/drizzle/0000_many_iron_man.sql Adds the initial SQL migration for clients.
apps/mobile/app/(app)/settings.tsx Moves theme toggle into Settings under an Appearance section.
apps/mobile/app/(app)/(tabs)/clients.tsx Implements the new Clients tab: search UI, paging views, status filters, empty states.
apps/mobile/app/(app)/(tabs)/_layout.tsx Updates Clients tab header styling and removes the old headerRight wiring.
.prettierignore Excludes mobile coverage output and explicitly ignores the drizzle dir.

Comment thread apps/mobile/src/db/index.ts
Comment thread apps/mobile/src/lib/client-list.ts
Comment thread apps/mobile/src/components/ClientStatusFilters.tsx
@DavidASix
DavidASix merged commit 6db73fd into main Jul 22, 2026
3 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.

2 participants