Commit Graph

288 Commits

Author SHA1 Message Date
Jason Zimdars e919866849 Don't expose popped in the UI for now 2025-03-31 13:27:13 -05:00
Kevin McConnell a0929ac557 Simplify condition 2025-03-28 11:16:17 +00:00
Jason Zimdars f5bf1f5ac3 Don't bother with this for now 2025-03-27 17:09:00 -05:00
Jason Zimdars 1cf2e24bcc Set buckets at the workflow level
- All bubbles inherit the bucket's set workflow
2025-03-27 14:35:07 -05:00
Kevin McConnell 3ea7da26ab "Stalled" not "Stale"
The latter sounds like old bread.
2025-03-27 12:22:55 +00:00
Kevin McConnell 47156c42e0 Add a sort order to represent "staleness" 2025-03-27 10:41:03 +00:00
Mike Dalessio 506f74144b Touch Account when adding or removing a Tag
so we can properly cache the tags partial using account as part of the key.
2025-03-24 16:48:11 -04:00
Mike Dalessio 473703df3d Invalidate the bubble cache when the bucket name changes
by including the bucket name as part of the bubble cache key.

ref: https://37s.fizzy.37signals.com/buckets/693169850/bubbles/999008709

Co-authored-by: Kevin McConnell <kevin@37signals.com>
2025-03-20 12:46:23 -04:00
Jason Zimdars 572428bfbc Improved comments and events layout 2025-03-19 16:33:03 -05:00
Kevin McConnell 4216b1123e Formatting 2025-03-18 17:53:32 +00:00
Kevin McConnell bc5e32e737 Only "published" notifies collection subscribers
The other notifications are only sent to the watchers of the bubble.
2025-03-18 17:46:57 +00:00
Jason Zimdars 836e6fab5e Avoid touch when setting initial stage 2025-03-18 08:26:16 -05:00
Jason Zimdars 28a569c49b Tickets 2025-03-17 21:24:08 -05:00
Mike Dalessio 3e374f4661 fix: Send assignment notifications only to the assignee(s)
ref: https://37s.fizzy.37signals.com/buckets/693169850/bubbles/999008619
2025-03-13 12:16:47 -04:00
Mike Dalessio d9ece38753 Make the application multi-tenant 2025-03-12 07:53:31 -04:00
Mike Dalessio e0fa376d4f Update scoreable to return a large positive number when score==0 (#290)
Avoid infinite activity score orders

Items with a zero activity score were getting an activity sorting score
of -infinity, because we base the value on log2(score). Adjusting the
calculation avoids this edge case, by always basing the sorting score on
a non-zero number.

---------

Co-authored-by: Kevin McConnell <kevin@37signals.com>
2025-03-11 07:39:17 -04: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 a65d7b0397 Don't blow up on missing comment 2025-03-05 16:51:14 +00:00
Kevin McConnell 49fa8b21a6 Move current user check to controller
This is necessary to a) ensure people can't edit/delete comments they
don't own, and b) make the comment partial cacheable.
2025-03-03 17:04:16 +00:00
Kevin McConnell bb2a2c618b Don't lose formatting in draft comment
When displaying a bubble in the `creating` state, we were wrongly using
the plaintext version of the draft comment. This has the effect of
losing formatting whenever the page is saved and reloaded.
2025-02-28 12:43:22 +00:00
Kevin McConnell 55464f39a2 Don't duplicate notifications on publish
We're already sending everyone the "published" notification, and for
assignees that will include the assignment message. Tracking the event
again here would just duplicate that.
2025-02-27 16:37:53 +00:00
Kevin McConnell 93474002b7 Add test for watchers_and_subscribers 2025-02-27 16:27:12 +00:00
Kevin McConnell ab27371115 Include self in watcher list 2025-02-27 10:51:59 +00:00
Kevin McConnell 84d06c7f0b Creators watch their own bubble by default 2025-02-26 10:53:03 +00:00
Kevin McConnell a238f504e4 Don't create initial watches
We have subscriptions instead now. Watches need only be created as
necessary to override the defaults.
2025-02-26 10:53:03 +00:00
Kevin McConnell a802b8de5a Allow managing bucket subscriptions 2025-02-26 10:53:03 +00:00
Kevin McConnell f22742c431 watched_by? should reflect subscriptions too 2025-02-26 10:53:03 +00:00
Kevin McConnell d29e999552 Make Buckets subscribable 2025-02-26 10:53:03 +00:00
Kevin McConnell 6157d8b4bd Start watching when participating on a bubble
If you're added as an assignee, or if you comment, then your watching
preference will be toggled on.
2025-02-26 10:53:03 +00:00
Kevin McConnell 2d0c9d309b All notifiers use same recipients 2025-02-26 10:53:03 +00:00
Kevin McConnell 694783e5f3 Allow toggling watch preference
We use a true/false preference so we can tell the difference between
disabling the watch vs never having the watch. This is so we can toggle
off and on the preferences for a container (like the bucket) without
losing any bubble-specific preferences.
2025-02-26 10:53:03 +00:00
Kevin McConnell 59144ad17a Add Watches to track notification preferences 2025-02-26 10:53:03 +00:00
Jason Zimdars cd534391c1 Delete referenced events when deleting comments 2025-02-24 13:24:49 -06:00
Jason Zimdars fb01444a88 "Added by…" is a more useful filter than "Assigned by…" 2025-02-20 16:07:07 -06:00
Jason Zimdars 8cde1883a6 Filter activity by bucket 2025-02-19 18:05:12 -06:00
Jason Zimdars 8b429ddb84 Move method to Reaction class 2025-02-19 10:16:31 -06:00
Jason Zimdars 000bd158eb Reactions on comments 2025-02-18 17:08:56 -06:00
Jason Zimdars edd7e55313 Prevent using # in the stored tag name 2025-02-14 11:23:08 -06:00
Jason Zimdars 2f6f98a584 Account for terms as strings
Terms chips weren't correctly excluding the term because this `params[key].delete` tried to convert them to integers
2025-02-14 10:54:41 -06:00
Kevin McConnell 88f295eee2 Provide accessor for the draft comment 2025-02-13 14:36:34 +00:00
Jason Zimdars 08fb92b526 We only need to mention buckets if scoped 2025-02-12 16:18:08 -06:00
Kevin McConnell 6f1f819ad7 Suppress notifications for system-generated events 2025-02-12 17:40:29 +00:00
Kevin McConnell d925b53b01 Prevent calling system without scoping to account 2025-02-12 15:19:51 +00:00
Kevin McConnell e72c89781f Ensure auto_pop_at it set before saving 2025-02-12 13:36:57 +00:00
Kevin McConnell 2b7074f24d Clearer name 2025-02-12 13:28:47 +00:00
Kevin McConnell dac2611c57 Auto-pop bubbles 2025-02-12 13:20:05 +00:00
Kevin McConnell 485a056ba2 Add a "system" role & specific user 2025-02-12 13:19:53 +00:00
Kevin McConnell bd4e475d44 Remove old abandoned bubble creations via cron 2025-02-11 14:34:39 +00:00
Kevin McConnell fd1556b298 Decision can belong to subsequently created bubble 2025-02-11 14:34:39 +00:00
Kevin McConnell 6832ba8f37 It's not just about drafts now 2025-02-11 14:34:39 +00:00