Commit graph

251 commits

Author SHA1 Message Date
Bruno Windels 44760a9f82 Revert "add logging related to fragments"
This reverts commit 2f355cabef.
2020-03-21 10:47:35 +01:00
Bruno Windels c4a5de20c0 update previous fragment in comparer when appending a new line fragment 2020-03-21 10:45:09 +01:00
Bruno Windels 2f355cabef add logging related to fragments
both when rebuilding and when sorting will be used
2020-03-20 20:23:07 +01:00
Bruno Windels 7e8cc7ae00 need to return the response here, not the request wrapper
we were reading back a remote id of undefined because of this,
so when for some reason we never receive the message down from sync,
the pending message keeps sending on every load. The server ignores
the send though, because the transaction id is already used, and it returns
the remote id of the event that was already sent the previous time, but
as we were not storing this remote id, we'd just try again and again.

not receiving it through sync could have happened when we were sending a bunch of events
and then receiving (this is how we encountered this bug, while trying to repro another) the
response, but not yet the sync for the message that got wedged. Then we typed stuff on another client
so we would get a limited response for that room, and boom, we would not get the remote echo of the
event that was already sent (but because of this bug we didn't store the remote id) but no echo received yet (when we remove the pending event),
so it gets wedged!
2020-03-17 00:11:50 +01:00
Bruno Windels b69efc3425 fix errors when replaying 2020-03-17 00:07:54 +01:00
Bruno Windels 06e43d9ee3 fix all tests 2020-03-14 21:38:37 +01:00
Bruno Windels 56c87b3966 better naming 2020-03-14 20:49:15 +01:00
Bruno Windels ac4a7f971b only apply sync changes in room summary once txn is committed
- also remove m.room.aliases support as they were wrongly implemented
   and now obsolete
 - don't count invited and joined members according to m.room.member
   events anymore as it was also wrongly implemented
   (only when prev!==new membership, but on initial sync we only get
   last member event, which might have been a nick change
2020-03-14 20:46:49 +01:00
Bruno Windels fc741272ba only apply sync changes in session once txn is committed 2020-03-14 20:45:36 +01:00
Bruno Windels 224d56698a only set new live key when creating a fragment after the txn succeeds
when doing a limited sync, and a new fragment is created,
this._lastLiveKey is updated immediately. If the transaction
would then fail, the fragmentId in this._lastLiveKey was incremented
but the fragment wasn't written to the store, so if sync is resumed
and would subsequently succeed, fragmentIds would be assigned to events
that don't have a corresponding fragment in the timelineFragment store.

This would throw errors when trying to load the timeline,
breaking the whole app.

This changes SyncWriter to only update this._lastLiveKey in
the emit phase, when the transactions has been committed already.
2020-01-04 20:06:49 +01:00
Bruno Windels bdc2c3d9ad cleanup: storage is not used in SyncWriter
as the transaction is now always passed as an argument, it never
creates one on its own.
2020-01-04 20:04:57 +01:00
Bruno Windels 29b531ae80 add (commented out) instructions how to use record/replay 2019-12-23 14:29:19 +01:00
Bruno Windels 1d9a5c490a add record/replay network layer 2019-12-23 14:28:42 +01:00
Bruno Windels aa86748cdd pull fetch code out of homeserverapi 2019-12-23 14:28:27 +01:00
Bruno Windels 35c090dcb4 add proper import/export functionality 2019-12-14 18:29:35 +01:00
Bruno Windels 9c42710f9b add github link to home screens 2019-11-22 09:46:19 +01:00
Bruno Windels 8a55778c32 make sure aliases and heroes aren't empty when picking name 2019-11-22 09:29:18 +01:00
Bruno Windels 325077bcb0 try more domexception fixes 2019-11-21 18:28:18 +01:00
Bruno Windels 5ecf0a6717 fix error path on transaction abort error 2019-11-21 18:23:48 +01:00
Bruno Windels d073f2825b show json in one line when clearing cache
also make naming consistent
2019-10-24 10:54:20 +02:00
Bruno Windels d34a0c73b5 show json in list instead of alert so we can copy it 2019-10-13 08:29:23 +02:00
Bruno Windels 6f73d3983f add export/import of session data 2019-10-13 08:16:08 +02:00
Bruno Windels e2b9e9dfdc add clear cache button for session 2019-10-13 07:48:49 +02:00
Bruno Windels ad7a150aaa use aliases and heroes to fall back room name to 2019-10-13 07:48:33 +02:00
Bruno Windels b16f21867c preserve value for storage errors on add and put 2019-10-12 22:19:16 +02:00
Bruno Windels 201b70ee4f fix failing to sync new rooms 2019-10-12 22:18:36 +02:00
Bruno Windels ac53b9099b only log error in sync loop 2019-10-12 22:18:19 +02:00
Bruno Windels 3ba20dece1 fixup for delete button changes 2019-10-12 22:18:08 +02:00
Bruno Windels 2fa5fa7890 add delete button in session picker 2019-10-12 21:16:48 +02:00
Bruno Windels d367037332 very basic support for lazy loading 2019-10-12 20:24:09 +02:00
Bruno Windels 076582edc3 css fixes
- don't pronounce avatar initials
 - prevent room header growing wider than screen
 - ensure messages wrap their text
2019-09-28 09:46:09 +02:00
Bruno Windels e3719b2527 allow http (no sssl) homeservers 2019-09-28 09:44:39 +02:00
Bruno Windels d8696bea1d add offline availability with service worker and appcache 2019-09-15 14:32:12 +02:00
Bruno Windels 8616d79aad make fetch errors more informative by including method and url 2019-09-15 14:31:50 +02:00
Bruno Windels 2b2b4232e9 moar send logging 2019-09-15 12:25:14 +02:00
Bruno Windels 6f527fd2e0 use openCursor where openKeyCursor is not supported 2019-09-15 12:24:46 +02:00
Bruno Windels bbf6943455 use .get fallback where .getKey is not supported (Edge 15) 2019-09-15 12:24:27 +02:00
Bruno Windels 8e590fe53b rename and use StorageError to deal with idb DOMerror 2019-09-15 12:23:54 +02:00
Bruno Windels f7f9129b8b show send errors in UI 2019-09-15 12:23:26 +02:00
Bruno Windels 5a90b4673b fix CORS requests failing 2019-09-15 12:23:08 +02:00
Bruno Windels ed67689fdf some minimal styling for login and session picker 2019-09-08 10:40:05 +02:00
Bruno Windels 09b9eff7c1 fix remaining errors to make login work 2019-09-08 10:19:16 +02:00
Bruno Windels a7194e0c7a implement missing views 2019-09-08 10:18:59 +02:00
Bruno Windels 1082233de4 start of session picker view 2019-07-31 00:07:12 +02:00
Bruno Windels c27172fc4e adjust main to new view 2019-07-31 00:07:04 +02:00
Bruno Windels 49a577991b login and session picker view models, sessions store 2019-07-31 00:06:53 +02:00
Bruno Windels 378eea8ceb
Merge pull request #5 from bwindels/bwindels/sending
Send text messages
2019-07-29 18:28:29 +00:00
Bruno Windels 5b4d984645 height of app should always fill screen (not more or less) 2019-07-29 20:11:15 +02:00
Bruno Windels de35df10d8 fix test + bug in ConcatList update 2019-07-29 20:03:22 +02:00
Bruno Windels b723ab4cef add failing test for ConcatList update 2019-07-29 20:03:06 +02:00