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

notify: get notifs from activity, not hark #3609

Merged
merged 61 commits into from
Jun 12, 2024
Merged

notify: get notifs from activity, not hark #3609

merged 61 commits into from
Jun 12, 2024

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Jun 12, 2024

The change as described above is simple enough. But there's a catch here that pulls in many lines of low-complexity high-nuance code: we want to continue supporting old clients.

Notify passes notification uids through a pipeline where we can't trivially slap on additional markers/details. Current/old-style clients use these uids to look up notification data in the hark agent directly.

Here, we propose a new scheme, of asking the notify agent itself about notification details, creating some separation of concerns, or at least separating us from hark.

Clients may not update to use this scheme right away, so we include code that converts new-style activity events into old-style hark notifications, and injects them into hark. This way, we can support both old and new clients while emitting a single notification uid.

Due to lack of context, this conversion cannot always achieve 100% parity with the old-style notifications. These cases have been marked for ::REVIEW explicitly.

Smoke-tested, but not yet seen working end-to-end.

Closes TLON-1517.

patosullivan and others added 30 commits June 10, 2024 06:07
…ing-attachment

native: blur message input when adding an attachment
…mages

native: fix some issues with posting images to galleries
…d-focus-issues

native: fix keyboard focus issues by relying on the OS
patosullivan and others added 21 commits June 11, 2024 18:19
…inner-from-channel-view

native: remove loading spinner from channel view
…s-in-note-content

native: fix missing serifs in note content
…r-row-on-dms-and-multidms

native: fix missing author row on DMs and multiDMS
…ked-images-in-gallery-posts

native: better handle linked images in gallery posts
…oining-channels

native: correctly handle channel join updates
ops: keep dev in sync with staging
…-in-galleries

native: fix weird unread banner in gallery channels
…d the thread/postscreen view, add new shared keyboardavoidingview component
…sage-spacing-and-keyboard-offsets

native: reduce space within/between chat messages, fix keyboard offset in thread view
The change as described above is simple enough. But there's a catch here
that pulls in many lines of low-complexity high-nuance code: we want to
continue supporting old clients.

Notify passes notification uids through a pipeline where we can't
trivially slap on additional markers/details. Current/old-style clients
use these uids to look up notification data in the hark agent directly.

Here, we propose a new scheme, of asking the notify agent itself about
notification details, creating some separation of concerns, or at least
separating us from hark.

Clients may not update to use this scheme right away, so we include code
that converts new-style activity events into old-style hark
notifications, and injects them into hark. This way, we can support both
old and new clients while emitting a single notification uid.

Due to lack of context, this conversion cannot always achieve 100%
parity with the old-style notifications. These cases have been marked
for ::REVIEW explicitly.

Smoke-tested, but not yet seen working end-to-end.

Closes TLON-1517.
@Fang- Fang- requested a review from arthyn June 12, 2024 18:51
Copy link

linear bot commented Jun 12, 2024

==
::
%dm-post
::REVIEW should maybe not be rendered if you haven't accepted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

Copy link
Member

@arthyn arthyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, this may unintentionally produce hark duplicates, but that's ok

=; base=^path
?~ id-reply base
(snoc base (rsh 4 (scot %ui u.id-reply)))
?- kind.nest ::REVIEW technically want the -.kind-data of the post...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is ok for now, but yes will have to change later

@arthyn arthyn changed the base branch from develop to staging June 12, 2024 21:11
@arthyn arthyn merged commit 6f297a0 into staging Jun 12, 2024
1 check passed
@arthyn arthyn deleted the m/notify-activity branch June 12, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants