Open
Conversation
…ctioning sorting for Patient Name, Assigned Social Worker, and Last Contact.
Auth Pages Design
Implemented _index.tsx (home page) using temporary JSON data with fun…
firebase setup
Tb/frontend auth
…t, and add functionality. Updated styling.Added website button.
Profile page rework -- Ted and Hamzah
Referrals feature
Author
|
some notes; |
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.
Add member messaging with image attachments
Adds a full one-on-one chat interface between social workers and patients, with support for sending text messages and a single image per send action.
What's included
Chat UI (app/routes/member.tsx)
New protected route at /member/:user rendering a real-time message thread via Firestore
Paginated message loading (load-more on scroll)
Composer with text input, image attachment preview, and single-click send
Displays sender name above received message bubbles
Image lightbox for full-size viewing
Attachment service (app/services/chat_attachment_service.ts)
Validates image file type (JPEG, PNG, WebP) and size before upload
Orchestrates Storage upload + Firestore batch write for text+image sends
Both messages share a clientBatchId / clientOrder so ordering is deterministic
Best-effort Storage cleanup if the Firestore batch fails after upload
Chat config (app/services/chat_settings.ts)
Centralizes allowed MIME types, size cap, Storage root path, and chat summary labels
Firebase rules (firebase/firestore.rules, firebase/storage.rules)
Firestore: reads and writes scoped to chat participants; message edits and deletes blocked
Storage: reads and writes scoped to chat participants; writes restricted to image MIME types and 10 MB cap; deletes blocked
Data model
Chat ID = patient UID. All social workers share the same chat per patient.
Text-only send → 1 Firestore doc (messageType: "text")
Image-only send → 1 Firestore doc (messageType: "image")
Text + image send → 2 Firestore docs in one batch, sharing a clientBatchId
Known limitations (v1)
No client-side image compression
No message deletion flow
Single image per send only; PDFs out of scope
No automated tests for this flowAdd member messaging with image attachments