pangeachat / client

Learn a language while texting your friends
https://krille-chan.github.io/fluffychat/
GNU Affero General Public License v3.0
2 stars 2 forks source link

Use practice_activity_model directly in practice flow. #711

Closed wcjord closed 1 month ago

wcjord commented 1 month ago

Our system of using wrapped matrix events has some benefits but often holds up the UI when an event is being delayed in sending.

Same as we did for representations (though maybe implementation wants to be a little different, TBD), we should refactor practice_activity_event usage to allow using of practice_activity_model directly, before it’s been saved to the Matrix room. The practice activity controller should just return a practice_activity_model and save the activity as an event in a decoupled flow.

ggurdin commented 1 month ago

One thing to consider would be, in order to send the response events, we will need the practice activity event ID

wcjord commented 1 month ago

Yup that is the big issue! I'm tempted to just stop doing the response events actually.

ggurdin commented 1 month ago

Is this something you'd want done by the end of this week for the push? I'm not clear on how responses would be stored otherwise. We can meet to talk about this is you'd want.

wcjord commented 1 month ago

We could pass around the activity event id as a Future<String?> and then have the record saving flow await that before saving the activity response.

On Wed, Oct 9, 2024 at 9:12 AM ggurdin @.***> wrote:

Is this something you'd want done by the end of this week for the push? I'm not clear on how responses would be stored otherwise. We can meet to talk about this is you'd want.

— Reply to this email directly, view it on GitHub https://github.com/pangeachat/client/issues/711#issuecomment-2402312694, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYPKFOEHOO4EXC7CK3EG3TZ2UTT7AVCNFSM6AAAAABPQFJ4VKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBSGMYTENRZGQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Will Jordan-Cooley CEO and Founder Pangea Chat https://www.pangeachat.com

ggurdin commented 1 month ago

Yeah that could work! Then the user wouldn't experience a delay in most cases cause that time would be spent figuring out the answer to the activity.

wcjord commented 1 month ago

Ok let's do this. We should also put some kind of timeout on the saving of the response. Like, if the activity event isn't there in 10 seconds, let's log an error to sentry and move on.

On Wed, Oct 9, 2024 at 10:10 AM ggurdin @.***> wrote:

Yeah that could work! Then the user wouldn't experience a delay in most cases cause that time would be spent figuring out the answer to the activity.

— Reply to this email directly, view it on GitHub https://github.com/pangeachat/client/issues/711#issuecomment-2402460654, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYPKFLFI6HXAFMBIIPDLLDZ2U2OLAVCNFSM6AAAAABPQFJ4VKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBSGQ3DANRVGQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Will Jordan-Cooley CEO and Founder Pangea Chat https://www.pangeachat.com