Commit Graph

228 Commits

Author SHA1 Message Date
Mike Dalessio b7c2369988 Fix setting the workflow on a collection
The previous implementation would delete all accesses if the bucket
was not all_access.

I think it's simpler to move the bucket workflow into a separate
Buckets::WorkflowsController, rather than deal with different sets of
params from different forms in the existing BucketsController.
2025-03-30 09:24:56 -04:00
Jason Zimdars bbcbb77082 Update tests 2025-03-27 17:09:05 -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 23e4fd9b1c Remove the buckets#index action and view
and have bucket#destroy redirect to root_path
2025-03-25 13:40:36 -04:00
Mike Dalessio 5ae87d8140 Ensure the tags dropdown is not subject to the cached card fragment
- Rearrange the _tags and _tag partial, so they are properly nested concerns
- Add turbo frames for _tags and _tag
- Load _tag in a separate request, so it's not cached with the card
- Cache _tag using the bubble and the account
- New model behavior: touch Account when tags are added or removed
- New controller action: "new" for taggings toggles, which renders the _tag partial
- Updating taggings responds with a turbo stream response that updates the _tags frame

This is very much a parallel change to what was done with assignments
in #317.
2025-03-24 16:48:11 -04: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 44650cc36e Reload the assignees turbo frame when assigments are updated
Also, add a cache around the dropdown keyed on [bubble, bucket].
2025-03-21 17:53:41 -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 264d78b21a Update test 2025-03-19 16:37:06 -05:00
Jason Zimdars 91e2b8654b Update tests 2025-03-19 13:42:59 -05:00
Kevin McConnell e9ae2772e4 Add tests to validate notification recipients 2025-03-18 17:46:57 +00:00
Mike Dalessio 2c87c2fb15 Update schema files and fix some trivial test failures. 2025-03-18 09:14:16 -04: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 6f1d200316 Use fixed date as well as time in test
Otherwise this will be affected by DST.
2025-03-10 16:12:22 +00: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 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 eaf4903afc Formatting 2025-02-28 11:48:29 +00:00
Kevin McConnell 93474002b7 Add test for watchers_and_subscribers 2025-02-27 16:27:12 +00:00
Kevin McConnell f54119f477 Add missing test 2025-02-26 10:58:56 +00:00
Kevin McConnell 84d06c7f0b Creators watch their own bubble by default 2025-02-26 10:53:03 +00:00
Kevin McConnell 385e299db7 Simplify param 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 f8209a15e3 Update test 2025-02-20 16:13:27 -06:00
Jason Zimdars 58571ca677 Don't need this after all 2025-02-19 18:15:02 -06:00
Jason Zimdars 8cde1883a6 Filter activity by bucket 2025-02-19 18:05:12 -06:00
Jason Zimdars b3b881da17 Try a more Basecamp style activity event card 2025-02-19 14:02:07 -06:00
Jason Zimdars 000bd158eb Reactions on comments 2025-02-18 17:08:56 -06:00
Kevin McConnell c75247133e Fix time-dependent test
This test would fail when the two timezones is covers landed on
different days (like in the first few hours of UTC). So let's fix the
test to a particular moment in time.
2025-02-17 15:07:17 +00:00
Kevin McConnell 483c6cdbe6 Allow updating draft comment with bubble 2025-02-13 14:39:33 +00: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 a88cbf0c41 Add test 2025-02-12 15:36:48 +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
Kevin McConnell 39c0a95e1a We'll handle this at the event level 2025-02-11 14:34:39 +00:00