Commit Graph

170 Commits

Author SHA1 Message Date
Mike Dalessio 3f8d10d679 Merge pull request #1747 from basecamp/flavorjones/perf-20251127
Address some N+1 query situations
2025-11-27 12:46:56 -05:00
Mike Dalessio 0ab3aaca72 Preload Event to avoid N+1s on the timeline 2025-11-27 11:27:10 -05:00
Jason Zimdars 48d9a25820 Fix that 'closed'->'done' change broke this route 2025-11-26 14:58:17 -06:00
Donal McBreen c4498212dc Merge branch 'main' into sqlite
* main: (116 commits)
  Ensure avatar thumbnails are square
  Update useragent to recognize twitterbot/facebot
  Add defensive styles for non-square avatar images
  Update test for copy changes
  Missed commit
  AI: standardize on https://agents.md
  Make it clear this is just notifications, not comprehensive activity
  AI: configure MCP servers for Chrome, Grafana, and Sentry (#1727)
  Allow requests from Google Image Proxy
  Update to basecamp's useragent fork
  Clean up a little bit the CSRF reporting code
  Claude: production observability guidance (#1725)
  Prevent autoscroll to the root columns container to prevent jump on page load
  Include full name string so you can type your name to filter
  Prioritize current user and assigned users in assignment dropdown
  Check and report on Sec-Fetch-Site header for forgery protection
  bundle update
  Bump bootsnap from 1.18.6 to 1.19.0
  Bump rails from `077c3ad` to `17f6e00`
  Fix cards getting stuck in edit mode
  ...
2025-11-26 10:07:41 +00:00
Donal McBreen b571303385 Don't use Current.account for search records
It doesn't actually work, and even if we could make it work reliably
we are better off if the records always know to go to the right shard.

It does make the interface a bit more complicated as we need to select
the right shard class with `for(account_id)`.
2025-11-25 11:34:41 +00:00
Mike Dalessio e0aa1d257e Drop User.system and replace with Account#system_user 2025-11-24 13:23:57 -05:00
Stanko K.R. e85c5736c9 Render system user avatars using redirects 2025-11-24 12:05:32 +01:00
Jason Zimdars 0c49d3c2a6 Use "Done" for consistency
Closed is domain language
2025-11-24 12:04:33 +01:00
Jason Zimdars 5fac18d01f Restore auto-postponed events to the timeline 2025-11-24 12:03:34 +01:00
Mike Dalessio db51b616bb Handle notifs created before the current bundle starts_at 2025-11-22 22:38:23 -05:00
Donal McBreen b1862733dd Merge branch 'main' into sqlite 2025-11-21 15:23:34 +00:00
Donal McBreen 04c9d9268b Remove wrapper methods and kwargs 2025-11-21 14:53:17 +00:00
Jason Zimdars eba749a193 Expand activity columns 2025-11-19 12:48:36 -06:00
Jorge Manrubia 63d08c5b13 Prevent creating overlapping records
https://3.basecamp.com/2914079/buckets/27/card_tables/cards/9275047474
2025-11-19 11:02:00 +01:00
Stanko K.R. ee85c25672 Include association used to render events 2025-11-17 09:12:41 -05:00
Stanko K.R. 15eeba82f5 Scope model methods by account 2025-11-17 09:12:41 -05:00
Stanko K.R. a0251255a7 Rename IdenityMailer to UserMailer 2025-11-17 09:12:41 -05:00
Stanko K.R. e0693de7c3 Scope jobs and controllers by account 2025-11-17 09:12:41 -05:00
Donal McBreen 28efe28f24 Replace Search::Index with Search::Records
Lean on ActiveRecord models for searching and strip out the raw SQL.
Replaces the search_index_* tables with sharded search_records_* tables
as that allows us to use a Search::Record model name.

A Class is dynamically created for each record table shard so that we
and we can access it via the Search::Record.for_account(account_id)
method.
2025-11-17 09:12:40 -05:00
Mike Dalessio fe6df7085f Finish the rollout of account_id to all core data models
Schema:
- add account_id to tables it was missing from
- make account_id a required column everywhere
- add [account_id] indexes, or add `account_id` to existing indices

Models:
- add `belongs_to :account` to all models (default to using a domain
  model's account whenever possible)
- add account_id in all the necessary fixtures
- add account_id to insert_all hashes
- pass account_id to a few initialize calls

Miscellaneous:
- update the import script to set account_id

Note that I'm not adding account_id to the join tables primarily
because I couldn't think of an easy way to populate it without making
it a full Join model, and that was more work than I have time to take
on right now.
2025-11-17 09:12:40 -05:00
Stanko K.R. 56c41d45eb Reinstate email changes 2025-11-17 09:12:40 -05:00
Mike Dalessio 039e4a0bed Remove dead code (after deleting Membership) 2025-11-17 09:12:40 -05:00
Stanko K.R. edf837fed3 Drop memberships 2025-11-17 09:12:39 -05:00
Donal McBreen fc56ad9d7c Combine uuid-old and uuid branch changes
- Switch to binary 16 for UUID keys
- Remove AccountScopedRecord base class, all model use binary uuids now
- Fix the search sql to serialize uuids properly
- Patch the MySQL schema dumper to output binary lengths
2025-11-17 09:12:34 -05:00
Kevin McConnell 6c04b56f4b Compact the UUIDs to base36 2025-11-17 09:12:31 -05:00
Mike Dalessio e4011ef211 Update primary keys on customer data to UUIDs
- schema changes to primary and foreign keys
- fixture changes
- customer data models subclass AccountScopedRecord
- import script updated
2025-11-17 09:12:30 -05:00
Mike Dalessio ff8d786144 Filter boards by account 2025-11-17 09:11:57 -05:00
Mike Dalessio dbf66f9a50 Constrain user queries to the current or relevant account 2025-11-17 09:11:57 -05:00
Jorge Manrubia 9903a37243 Fix tests 2025-11-12 11:37:06 +01:00
Jorge Manrubia dba3b2d65d Remove nil param 2025-11-12 11:25:51 +01:00
Jorge Manrubia f5440833a9 Order method 2025-11-10 16:21:46 +01:00
Jorge Manrubia 590a63c422 Move helpers salad to a presenter column when rendering the timeline 2025-11-10 15:52:59 +01:00
Jorge Manrubia 3b34703db3 Make sure that only admins or card creators can delete cards 2025-11-05 16:37:43 +01:00
Jorge Manrubia 193cc26a98 Make sure only admins or collection creators can toggle the all access setting 2025-11-05 15:51:19 +01:00
Jorge Manrubia 2494b94ec9 Support old events in the timeline 2025-11-05 13:56:22 +01:00
Jorge Manrubia 03a345609e Baseline replacing collection with board across code 2025-11-05 13:31:54 +01:00
David Heinemeier Hansson 992b149395 No longer used 2025-11-03 14:29:01 +01:00
Mike Dalessio 18f70c3312 Do not bundle notifications for inactive users
https://app.box-car.com/5986089/cards/2671
2025-10-31 14:51:09 -04:00
Stanko Krtalić 98755844a1 Remove the internal API
* Bind sessions to identities
* Remove references to the identity token
* Move email changes to identity
* Move account menu into a turbo-frame
* Create tenants from a tenanted route
2025-10-31 16:26:08 +01:00
Stanko K.R. 201c3e27d3 Update tests for the Internal API 2025-10-31 16:26:08 +01:00
Stanko K.R. 79b012f319 Add Join Codes 2025-10-31 16:24:30 +01:00
Stanko K.R. c8843360fe Clean up and simplify magic links 2025-10-31 16:23:38 +01:00
Stanko K.R. 5cef4ffeb0 Add sign in flow using magic links 2025-10-31 16:22:12 +01:00
Jorge Manrubia e1d2455c01 Remove unused events 2025-10-30 07:53:21 +01:00
Jorge Manrubia 85bee1af9b Add events for moving between columns 2025-10-29 14:49:02 +01:00
Jorge Manrubia aa1ffb3357 Remove AI summaries and semantic searches
We were not using either. We can restore if we revisit.
2025-10-29 11:55:32 +01:00
Jorge Manrubia 9317a82570 Remove Fizzy Ask
Since we are not going to ship it
2025-10-27 14:45:30 +01:00
Jorge Manrubia 392bdae316 Rename highlights -> summary 2025-10-25 20:06:57 +02:00
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