Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groups: refactor to improve join speed, stability, and API #2817

Merged
merged 440 commits into from
Nov 27, 2023
Merged

Conversation

arthyn
Copy link
Member

@arthyn arthyn commented Aug 23, 2023

@linear
Copy link

linear bot commented Aug 24, 2023

LAND-626 chat: prototype speeding up joins

Adjust update types to be more CRDT-like so we can send partial logs and never get out of sync.

Fang- and others added 24 commits September 29, 2023 11:36
And update the normal seal type to use the new v-* prefix convention.
In some cases it would conflict with, or be easily confused for, a
c=chat import. In those places, we leave it as d for the time being.
It was named this due to historic implementation path reasons
(originally came from /app/DIary), but should match the concept it's
actually dealing with (ChAnnels).
Instead of /ui, just / will now be given all available updates, and
instead of /[nest]/ui, /[nest] will now get all updates for a given
nest.
Whenever we talk to ourselves (that is, the local agent using the
library) we should assume we're matching, and not negotiate versions
explicitly.
Adds subscription endpoints at /~/negotiate/notify, optionally appending
/json, to be notified about changes in the matching flag of a specific
agent.

Also enhances the scry endpoints, letting you scry for all known
matching flags, or statusses, as both nouns and json.

We hard-code the json endpoints as separate, so that we don't need mark
files with conversions. This way, using the library remains as simple as
just including the library file itself.
HAK-26: Documentation for channels API after refactor
arthyn and others added 27 commits November 22, 2023 12:07
These weren't getting handled properly, instead looking up/resending as
the parent message. Here, we bring them to the level of compatibility of
the old->new case: they turn into top-level messages when re-sent.
…r-group-hosts

negotiation: host connection should always be matched, shouldn't assume
dms: block new club creation if some of the ships have version mismatch
…-banner

unreads: fix issue with closing unread banner
…in-use-channel-compatibility

negotiation: fix bad status in useChannelCompatibility
Chat was migrating refs largely correctly, but wasn't accounting for
cases where the referenced message lives outside of the channel where
the reference was posted.

Heap and diary were not migrating refs correctly at all. Since
converting old chat ids into new ones requires chat's lookup maps, we
expose those for old chat state through a new /old scry endpoint in
chat. We cache the scry, to avoid overhead for large/reference-heavy
backlogs.

Diary was not modifying references in top-level posts at all, which we
also correct for here.
In rare cases, not handling these could result in a crash during the
migration.
Previously, we were looking up the partially-filled index by comment id,
not parent post id, resulting in only the most recent comment being
migrated.
That was a workaround for backend problems solved by #3035.
chat, heap, diary: migrate chat refs properly
@arthyn arthyn marked this pull request as ready for review November 27, 2023 16:33
@arthyn arthyn merged commit 6621e66 into develop Nov 27, 2023
3 of 5 checks passed
@arthyn arthyn deleted the hm/hackweek branch November 27, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants