Commit Graph

44 Commits

Author SHA1 Message Date
Stanko K.R. 9d717239e7 Dispatch Webhooks on event creation 2025-09-16 20:03:57 +02:00
Stanko K.R. a515ea3b1f Create webhooks 2025-09-16 20:03:55 +02:00
Jorge Manrubia 8bb7783215 Extract "prompt generation" logic to models for events, comments and cards
So that we can reuse in other scenarios
2025-07-24 16:48:03 +02:00
Mike Dalessio ecbe040e3e Implement Notification#card
Models now know how to find their cards, rather than trying to
implement this logic in a view helper.
2025-05-21 16:30:18 -04:00
Jorge Manrubia 2b98db9e66 Flatten out comments and messages
https://37s.fizzy.37signals.com/collections/693169850/cards/999008989#comment_994777841
2025-04-29 19:21:18 +02:00
Jorge Manrubia 27f6006b58 Does not belong here anymore 2025-04-24 13:48:53 +02:00
Jorge Manrubia 905ccb9b4b Make comments the event's host 2025-04-24 13:45:48 +02:00
Jorge Manrubia 18cc24e1d3 Add an event prefix named after the model now that events are generic 2025-04-24 13:20:09 +02:00
Jorge Manrubia b746987712 Make eventable a generic concern and create a card's especialization for it 2025-04-24 13:07:12 +02:00
Jorge Manrubia 54f4bd5144 Generalize event's cards as eventable,add collection
Lots to tidy up but this is working
2025-04-24 12:28:16 +02:00
Jorge Manrubia e8e3bd16a6 First step to make events more generic in nature 2025-04-24 12:28:16 +02:00
Jorge Manrubia f258b05b23 Delegate target to the notifiable objects 2025-04-23 16:19:50 +02:00
Jorge Manrubia 5dac14ab50 Move logic to the model 2025-04-23 16:06:20 +02:00
Jorge Manrubia ea66845e71 There is always an action 2025-04-23 15:27:58 +02:00
Jorge Manrubia 043230394e Tidy up event helper code
Also, revert to using a helper method to determine the event action, since this is purely a view concern. Keep method at the event model to identify initial assignments.
2025-04-23 13:35:09 +02:00
Jorge Manrubia ab54cafd84 Inline event notifiers 2025-04-23 11:06:43 +02:00
Jorge Manrubia 3bf73a0b71 Rename to match actual action 2025-04-22 14:22:23 +02:00
Jorge Manrubia aa3acfeaa8 Add plain text mentions 2025-04-22 11:26:56 +02:00
David Heinemeier Hansson f368b9f9c9 Inline anemic method 2025-04-18 17:13:11 +02:00
David Heinemeier Hansson 760cbb6c99 Drop boosts
Killed by design.
2025-04-12 18:52:54 +02:00
David Heinemeier Hansson d8f9511e08 Unused 2025-04-12 11:34:56 +02:00
David Heinemeier Hansson 1a9a65fffb Unused 2025-04-12 11:31:50 +02:00
Jorge Manrubia 723e6d94f5 Rename bubbles => cards 2025-04-09 14:50:58 +02:00
Jorge Manrubia 08cb69aca5 Replace auto_pop_at with generic last_activity column
so that we can use it in other scenarios
2025-04-04 09:45:56 +02:00
Kevin McConnell 16a80ff3a6 More dynamic activity scores
This introduces a more dynamic system of activity scoring, to improve
the way bubbles "bubble up" due to their activity. There are a few
different parts we can tune here, and it's likely we'll need to make
adjustments once we get a feel for how this works in practice.

The basic idea here is:

- We assign points for certain types of event that happen on a bubble. A
  boost gets 1 point, a comment gets 10 points, and so on.
- These points decay over time, at a rate of 50% per day. So old
  activity is worth much less than new activity. Bubbles should rise up
  quickly when acted upon, bit will float back down if left idle.
- Some comments can score higher than others: the first comment from
  each person on a bubble is worth more (20) because it signals that
  more people are getting involved; and comments that follow a comment
  by a different author are also worth more (15) because that signals
  there's ongoing conversation between people, not just a series of
  notes being left by one individual.

In terms of implementation, we persist the score on the bubble
whenever it changes, but we handle the decay on the client side. That
allows us to cache the bubble representation without having to
continually change it while its activity decays.

We also keep a separate `activity_score_order` attribute on the model.
This can be used to sort the bubbles in order of "most active", without
having to think about the decay.
2025-03-05 17:16:31 +00:00
Kevin McConnell dac2611c57 Auto-pop bubbles 2025-02-12 13:20:05 +00:00
Jason Zimdars f25335ba38 Try comment excerpts in notification and event chips 2025-02-04 14:04:17 -06:00
Kevin McConnell e6fe7f680d Associate Event with Bubble
It's kind of a long way to get from one to the other right now. Every
event belongs to a bubble, so let's link them directly.
2025-01-17 14:40:36 +00:00
Kevin McConnell 415e872a2b Combine concerns 2025-01-14 13:57:48 +00:00
Kevin McConnell 196575c0a2 Use a job to generate notifications 2025-01-13 14:21:47 +00:00
Kevin McConnell a082eb75f5 Track events for new comments too 2025-01-13 14:21:47 +00:00
Jose Farias f9712ea53f Messageables don't belong to bubble directly 2024-10-27 11:57:33 -06:00
Jose Farias a3edee6e58 Extract grouping of boosts 2024-10-25 16:06:34 -06:00
Jose Farias 7b104287ba Roll up boosts server-side 2024-10-25 15:39:54 -06:00
Jose Farias 85d47a35ab threadables -> messageables 2024-10-25 15:03:31 -06:00
Jose Farias c57f18c20c Materialize abstract thread
The domain language is clearer if we just persist a thread. Also rename some models so their purpose is clear.
2024-10-24 17:36:14 -06:00
Jose Farias ad88f90302 Fine not to denormalize user names in events 2024-10-24 15:50:00 -06:00
Jose Farias c41da5837c Add back bubble association to events 2024-10-24 11:22:23 -06:00
Jose Farias 567dec2197 Simplify threadable<>bubble relationships 2024-10-23 17:29:24 -06:00
Jose Farias 35a31e3203 Model threadables 2024-10-23 14:10:04 -06:00
Jose Farias b0565fbf20 Spike workflows 2024-10-21 15:33:30 -06:00
David Heinemeier Hansson 1d404830f4 Must touch to bust bubble caches 2024-10-19 17:42:06 -07:00
Jose Farias f4b5210ca1 Spike persisted filters 2024-10-16 16:41:11 -06:00
Jose Farias ec7fc75054 Spike events system 2024-10-11 20:14:09 -05:00