Repository navigation
Conversation
When the organization has messaging_enabled and the workspace hasn't turned it off, a message action (options.embed: compose) shows the patient's SMS history above Activity. Texts are grouped by day, newest at the bottom, with a button to load earlier texts. Upcoming scheduled texts from other actions are hidden. Activity on message actions leaves out SMS. No live updates yet (websockets are a follow-up).
On message actions with Messaging on, a paper-plane button next to the action name focuses the Messages section. The same button on worklist, workflow and flow cards opens the action at its Messages section, like the attachment and comment buttons. Icon only; no count yet.
A message action shows a New Message composer under its texts, addressed to the patient's mobile number (the first phone labeled mobile). Send posts an outbound SMS interaction linked to the action. The card appears right away as "Sending…", then shows the sent time; if the request fails it stays as "Not sent" with "Message could not be sent." The composer is hidden when the patient has no mobile number, and a failed phone lookup still shows the history.
When Messaging is on and the patient has a mobile number, the Interactions page shows the New Message composer under the timeline. Texts sent there have no action. The card shows "Sending…", then the sent time, or "Not sent" with "Message could not be sent." If the timeline isn't on the newest texts or Messages is filtered out, sending turns Messages back on and loads the newest texts first; if that load fails, the text stays in the composer and isn't sent. The shared interaction card gains the send states, and unsaved cards are never treated as selected.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
All reported issues were addressed across 37 files
Shadow auto-approve: would not auto-approve because issues were found.
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
RoundingWell Care Ops Frontend
|
||||||||||||||||||||||||||||||||||
| Project |
RoundingWell Care Ops Frontend
|
| Branch Review |
messaging-v1
|
| Run status |
|
| Run duration | 02m 24s |
| Commit |
|
| Committer | nmajor25 |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
1
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
397
|
| View all changes introduced in this branch ↗︎ | |
Tests for review

src/js/services/modal/modal.e2e.cy.js • 1 failed test • care-ops-e2e
| Test | Artifacts | |
|---|---|---|
| Modal Service > Displaying |
Test Replay
Screenshots
|
|
Coverage Report for CI Build 9Coverage decreased (-0.02%) to 99.983%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/js/apps/patients/patient/interactions/interactions.e2e.cy.js">
<violation number="1" location="src/js/apps/patients/patient/interactions/interactions.e2e.cy.js:4966">
P2: This test releases the held filter response only after observing the POST, so it still passes if sending does not wait for the pending filter load. Assert `@routePostInteraction.all` has length 0 before releasing the filter, then wait for the POST afterward.</violation>
</file>
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
Tip: Review your code locally with the cubic CLI to iterate faster.
View guided diff | Turn on auto-fix | Re-trigger cubic
Cards from another action link with the action name and an arrow, like the prototype. View on Interactions is removed from the cards.
A text that is still sending fades in on the message action and the Interactions page, unless reduced motion is on. Message history now updates in place so earlier cards keep their views instead of being rebuilt on every send.
Shows the title, "All messages with" the patient, the date of the top day, and View on Interactions, which opens this action's newest sent or received text on the Interactions page.
Texts over 900 characters are clamped to four lines with Show more, using the same rule as long call notes on the Interactions page.
The header and day divider pills open the same jump menu as the Interactions page, loading older texts as needed. The date control moves to shared/interactions with its own styles. Older loads disable Show earlier messages and keep texts sent while they run.
There was a problem hiding this comment.
All reported issues were addressed across 16 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
Remove the fade-in class when its animation ends so later renders of the card can't replay it.
There was a problem hiding this comment.
0 issues found across 11 files (changes from recent commits).
Shadow auto-approve: would require human review. Adds a feature-flagged SMS messaging history and composer to action pages and Interactions, with paper-plane entry points. Declined: WIP/Don't Merge and new outbound SMS with unresolved dismissed findings around consent and UI correctness.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
Keep an unsent text for the browser session:
- If you type a text and leave the page, the text is still there when you come back.
- Each patient has its own saved text, and the action page and the Interactions page keep theirs separately.
- The text is saved in session storage under
messaging-composer:["<clinicianId>_<workspaceId>","<patientId>","<actionId>"]. On Interactions,actionIdisnull.
- The text is saved in session storage under
- Sending a text clears it, and closing the browser tab clears it too.
- If a text fails to send, it shows as failed in the conversation and isn't kept in the box. If Interactions can't load the latest texts before sending, the text goes back into the box and stays saved.
| if (!contains(this.window.models, model)) return; | ||
|
|
||
| this.showModels(this.window.models); | ||
| }, |
There was a problem hiding this comment.
Summary of the websocket messages being handled:
| Message | What we do |
|---|---|
ResourceCreated (text only) |
Load the newest 25 texts and add any new ones. If a load is already running or a text is sending, wait and load once after |
InteractionCompleted |
Move the text to its sent time. Ignore it if we haven't loaded that text yet (a new reply also sends this) |
InteractionScheduled |
Move the text to its new time |
MetadataUpdated |
Update the card (delivery failure, or its action link). The text may also show or hide, since another action's scheduled texts stay hidden |
InteractionCancelled |
Update the card to show "Cancelled". Another action's scheduled text is hidden until it's cancelled, then it shows |
ResourceDeleted |
Remove the card, and keep the text hidden even if a load that's already running returns it (also for a text not shown yet) |
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/js/apps/patients/patient/action/messages/messages_app.js">
<violation number="1" location="src/js/apps/patients/patient/action/messages/messages_app.js:56">
P2: This subscription starts only after the initial window and phone requests finish, so an SMS arriving during startup can be missed permanently. Subscribe before starting those requests (and retain the existing teardown) so startup events are reconciled.</violation>
</file>
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
4152421 to
6cbcc61
Compare
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would not auto-approve. Auto-approval blocked by 1 unresolved issue from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
Message history, the paper-plane icon and hiding texts from Activity now follow the program action's `message` tag instead of `options.embed: compose`, and show even when messaging is off. The composer still needs `messaging_enabled` and a mobile phone.
…ile phone With messaging on and no mobile phone, the composer shows disabled on the action page and Interactions: the reason replaces the placeholder, the To line is hidden, and a saved draft stays in session storage until a mobile phone is added. When phones fail to load there's still no composer.
The history fixtures started at midnight UTC, so the newest one showed Jul 18 instead of Jul 19 west of UTC and the date test only passed on CI. Start them at noon UTC.
There was a problem hiding this comment.
0 issues found across 10 files (changes from recent commits).
Shadow auto-approve: would not auto-approve. Auto-approval blocked by 1 unresolved issue from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
Drop ComposerView.restore and InteractionsPageView.restoreComposer; the Interactions app sets the draft body itself. Use getAction() in isShownInHistory to match the rest of Messages.
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Shadow auto-approve: would require human review. Adds feature-flagged SMS history/composer to action pages, Interactions, and workflow/flow cards. Declined: WIP/Don't Merge, new outbound SMS with consent/opt-out unfinished, and unresolved dismissed findings still need human sign-off.
View guided diff | Turn on auto-fix | Re-trigger cubic
- Inline single-use helpers in messages_views and messages_app - Build group keys once per day list and compare neighbors with isEqual - Rename shadowed `window` locals to initial/older/newest - Put multi-entry objects on one entry per line - Remove inline comments
- Check Messages button navigation and focus in workflow, flow and worklist specs - Check untagged actions have no Messages button on each page and the action title - Move the action title button check into the message history test
- Show the paper-plane button on actions tagged message, matching the Worklist - Open the action at its Messages section when clicked - Keep the button from shrinking next to long action names
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
Messaging v1, only active when the org has
messaging_enabled(and the workspace hasn't turned it off).options.embed: compose) show the patient's texts above Activity.mobilenumberScreengrabs:
To do still: