concord-consortium / codap

CODAP (Common Online Data Analysis Platform)
MIT License
94 stars 38 forks source link

188045173 DI Fix Collaborative Input Row #1386

Closed tealefristoe closed 1 month ago

tealefristoe commented 1 month ago

PT Story: https://www.pivotaltracker.com/story/show/188045173

This PR addresses a bug that prevented new cases from being broadcast to other users when a new case was added to a shared table using the input row. The issue is that a notification was only being sent out when new case ids were encountered, but this wasn't being updated in some circumstances because dataset.validateCases() was not being called. I'm still not sure why this wasn't being called in the context of a Collaborative shared table, but was in most other cases.

The solution is to call validateCases() in dataset.addCases() after adding cases to the dataset. I'm not totally sure this is the right place to do it, since this function is called in many other places, but it seems to make sense to me that you'd want to update the cases after a new item is added. If we wanted to be precise about this call, it could be made in handleRowsChange in use-rows.ts after calling data.addCases().

cypress[bot] commented 1 month ago



Test summary

200 0 29 0Flakiness 2


Run details

Project codap-v3
Status Passed
Commit 7d0e99bd30
Started Aug 5, 2024 5:59 PM
Ended Aug 5, 2024 6:21 PM
Duration 21:12 💡
OS Linux Ubuntu -
Browser Chrome 127

View run in Cypress Cloud ➡️


Flakiness

formula/formula-component.spec.ts Flakiness
1 Formula Engine > Component Formula Tests > Formula in a new dataset
cfm.spec.ts Flakiness
1 CloudFileManager > Opens a local document using different methods

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.74%. Comparing base (b80596b) to head (0dc6b06). Report is 5 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1386 +/- ## ========================================== + Coverage 85.63% 85.74% +0.11% ========================================== Files 524 524 Lines 25690 25691 +1 Branches 6560 6560 ========================================== + Hits 22000 22030 +30 + Misses 3535 3506 -29 Partials 155 155 ``` | [Flag](https://app.codecov.io/gh/concord-consortium/codap/pull/1386/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | Coverage Δ | | |---|---|---| | [cypress](https://app.codecov.io/gh/concord-consortium/codap/pull/1386/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `72.71% <100.00%> (+0.13%)` | :arrow_up: | | [jest](https://app.codecov.io/gh/concord-consortium/codap/pull/1386/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `53.42% <0.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.