davidasix/clients - #7
Merged
Merged
Conversation
Owner
Author
|
@codex review this |
DavidASix
marked this pull request as ready for review
July 22, 2026 14:06
There was a problem hiding this comment.
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
clientsDrizzle schema with SQLite constraints, initial migration, and a script to generate a staticmigrations.jsmanifest 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Screenshots