Commit Graph

122 Commits

Author SHA1 Message Date
Jorge Manrubia 4b5e8dc233 The collections filters is pretty crucial, make it evident in the code 2025-10-16 17:34:16 +02:00
Jorge Manrubia 41a23b5634 Reapply "Don't relay name change events to the timeline"
This reverts commit 44d3c84e13.
2025-10-16 17:32:24 +02:00
Jorge Manrubia 44d3c84e13 Revert "Don't relay name change events to the timeline"
This reverts commit fc0b59267e.
2025-10-16 17:32:05 +02:00
Jorge Manrubia fc0b59267e Don't relay name change events to the timeline
it also adds a missing index

https://fizzy.37signals.com/5986089/cards/411
2025-10-16 17:31:51 +02:00
Mike Dalessio 3399e45130 Introduce an "Identity" model to ease login
- New untenanted Identity and Membership models
- New `identity_token` cookie with path "/" holds state across tenants

We're not sure whether the untenanted database will be sqlite or
MySQL, and so I've been careful to minimize

- database reads, placing them behind etags and caching
- database writes, only writing when a new Session is created (login)

Note that we track two things in the identity_token cookie: a signed
id, and the updated_at for the underlying Identity object. This allows
us to effectively cache on the Identity without having to hit the
database, by using an Identity::Mock object that is compatible with
etag and cache methods.

The new integration test shows the desired user-facing behavior, which
is to make it easy to login without a tenanted URL and to jump between
tenants.

- the untenanted "login_help" page shows all linked memberships
- the jump menu shows all linked memberships (except the current)

Also introduced a utility script to populate existing employee
Identities, grouping accounts by email address.
2025-10-10 10:12:25 -04:00
Jorge Manrubia 1d1a3da9cf Cleanup workflow/stages
This was pending after moving to columns
2025-10-07 11:10:10 +02:00
Jorge Manrubia 969d971616 Use a more consistent approach to highligts dates 2025-10-06 15:17:28 +02:00
Jorge Manrubia 328b488d3d Remove trace 2025-10-06 12:47:27 +02:00
Jorge Manrubia 4e5edef4df Invalidate cache when there are higlights 2025-10-06 12:43:05 +02:00
Jorge Manrubia 3e67da7d0e Add a new join model to link summaries with users
So that changing the set of events does not result in not being able to find a generated highlight summary
2025-10-06 12:33:28 +02:00
Jorge Manrubia 4527dcbeda Remove unnecessary filtering code
After removing collections from the filtering menu, there was quite a good cleanup here pending
2025-10-03 10:56:34 +02:00
Jason Zimdars 7e43cc3ab4 Stub collections filter UI 2025-10-01 15:38:32 -05:00
Mike Dalessio 0213140a7c Update User so that it can be cleanly destroyed
- Delete unused dependent-destroy associations
- Include watchers as a dependent-destroy
2025-09-30 14:44:38 -04:00
Jorge Manrubia e8f6323cf0 Select the previous week when passing a sunday 2025-09-23 14:02:29 +02:00
Jorge Manrubia bfe0f5a68b Fix: missing highlights due to not interpreting timezones right 2025-09-23 13:38:25 +02:00
Jorge Manrubia 8de84ad329 Revert "Fix highlights being skipped"
This reverts commit 102ce0bf3c.
2025-09-22 14:16:35 +02:00
Jorge Manrubia 102ce0bf3c Fix highlights being skipped 2025-09-22 13:45:40 +02:00
Jorge Manrubia 64b46d37e4 Toggle filters in the hey menu too
This also fixes a problem where the label in the menu for the filters was wrong
2025-09-19 16:52:13 +02:00
Jorge Manrubia 7a916c295a Controlling the manage filter section with JS too 2025-09-19 16:51:11 +02:00
Jorge Manrubia f1d76a7cb7 Exclude inactive users
The system user should never be a subsriber but we should not serve it if it is
2025-09-17 13:26:53 +02:00
Stanko K.R. 25b2daad93 Limit access to webhooks to admins 2025-09-16 20:04:20 +02:00
Jorge Manrubia a6eb928688 Fix: update ends_at when flushing bundles
If not, it can happen that the bundlers remains in a delivered state
even when it is not covering its window anymore because it has been delivered.
2025-09-16 12:10:06 +02:00
Jorge Manrubia 97506c9a6c Remove trace 2025-09-16 11:22:44 +02:00
Jorge Manrubia 09325403e5 Add missing test (we were only testing this logic via the bundle test) 2025-09-16 11:22:14 +02:00
Jorge Manrubia 48f7f914dc Fix: the system to filter at the current view was broken after moving menu to turbo frame
https://fizzy.37signals.com/5986089/cards/1723
2025-09-15 17:07:09 +02:00
Mike Dalessio e7dcefb25b Extract SignalUser and SignalAccount, and QB routes 2025-09-13 16:03:02 -04:00
Jorge Manrubia 5e0918d373 Handle filter toggles with JS
To make them feel faster
2025-09-12 14:12:16 +02:00
Jorge Manrubia 312c5c7331 Fix some cache invalidation problems
- https://fizzy.37signals.com/5986089/cards/1585
- https://fizzy.37signals.com/5986089/cards/1616
2025-09-10 17:37:13 +02:00
Jorge Manrubia 23d2512525 Bust user filtering cache when the displayed associations change 2025-09-10 16:55:37 +02:00
Jorge Manrubia 8ea2d7346b Restore add card button in the timeline
It will add to the first selected collection, or to the
first one in the menu if no collection selected
2025-09-09 17:41:07 +02:00
Jorge Manrubia 242a367e0a Fix: add card adding cards to the wrong collection
Make sure we only show the "add card" button when there is a single collection selected, and that it adds to that collection.

https://fizzy.37signals.com/5986089/collections/2/cards/1439
2025-09-09 14:47:34 +02:00
Jorge Manrubia 9b4eaf0952 Format 2025-09-09 12:31:07 +02:00
Jorge Manrubia 1366ccc8df Add caching and http caching to the cards index screen 2025-09-09 12:05:16 +02:00
Jorge Manrubia 61fd84ab5e Add server-side caching and HTTP caching when serving events in the timeline 2025-09-09 11:30:05 +02:00
Jorge Manrubia ebfc168266 Make sure it considers the week before if this is invoked on a sunday 2025-09-08 08:38:33 +02:00
Jorge Manrubia d9cc592566 Merge pull request #1007 from basecamp/weekly-highlights
Weekly highlights
2025-09-05 17:03:38 +02:00
Jorge Manrubia b15cb4541f Show summarier capturing the actual weeks in the user's timezone
https://3.basecamp.com/2914079/buckets/37331921/todos/9010176047#__recording_9037056688
2025-09-05 13:48:02 +02:00
Jorge Manrubia e15cc80929 Only process summaries for active users (not deactivated or system) 2025-09-05 13:46:28 +02:00
Jorge Manrubia aad61b36bc Generate highlights in the user timezone, now that we persist it
Also, remove the dates and duration from the highlights records. Those are not relevant, only the events-derived
key is. If two users with different timezones have different activities, they should see different summaries.
2025-09-05 12:39:09 +02:00
Jorge Manrubia cfa0149564 Persist timezones in the server
Add a beacon to persist timezones when these change (or the first time)
2025-09-05 12:11:57 +02:00
Jorge Manrubia d785f9f80f Don't show summaries when using filters 2025-09-02 12:20:02 +02:00
Jorge Manrubia a9d9351472 Extract object to represent a period to tidy up params repetition 2025-09-02 10:55:53 +02:00
Mike Dalessio 85b6f46422 Do not try to bundle notifications for system users
ref: https://fizzy.37signals.com/5986089/collections/7/cards/1471
2025-09-01 12:37:34 -04:00
Jorge Manrubia dfbc77c2e5 Render weekly highlights considering periods of inactivity 2025-09-01 17:09:43 +02:00
Jorge Manrubia 5b68750713 Generate weekly highlights instead of daily ones
https://3.basecamp.com/2914079/buckets/37331921/todos/9010176047
2025-09-01 16:01:19 +02:00
Jorge Manrubia bec4abad0c Rename method to match semantics
"rescheduling" was a from an implementation I had dropped
2025-08-29 09:28:32 +02:00
Jorge Manrubia 5c890bbc34 Bundle every few hours by default 2025-08-28 17:08:22 +02:00
Jorge Manrubia e4ab1366be Add unsubscribe links and headers for emails
https://3.basecamp.com/2914079/buckets/37331921/todos/9002504172
2025-08-28 16:59:24 +02:00
Jorge Manrubia 960f074b3f Don't bundle new notifications is bundling is disabled 2025-08-28 12:53:19 +02:00
Jorge Manrubia 4e2717a61f Merge main into bundle-emails branch 2025-08-28 12:42:43 +02:00