Commit Graph

7130 Commits

Author SHA1 Message Date
Mike Dalessio 2c2a1c4b4a Make sure jobs are enqueued only after all transactions are committed
This should fix the recurring ActiveStorage::FileNotFoundError errors
from ActiveStorage::AnalyzeJob.

The issue is that, when images are not direct uploaded (e.g. a card
background image or avatar image), the AnalyzeJob has been getting
enqueued before the file itself was uploaded to blob storage.

Setting ActiveJob::Base.enqueue_after_transaction_commit = true makes
sure that jobs are always enqueued only once *all* transactions have
been committed.

This will be the Rails default at some point, but for now we still
need to explicitly set it.

Big thanks to @jeremy for the assist. 👏
2025-11-20 18:47:42 -05:00
Mike Dalessio fdee7aaaa5 Merge pull request #1654 from basecamp/flavorjones/3063-activity-spike-deadlocks
Fix race condition in Card::ActivitySpike::DetectionJob
2025-11-20 15:53:47 -05:00
Mike Dalessio 1bbb6d0c03 Fix race condition in Card::ActivitySpike::DetectionJob
The check-then-act pattern in `register_activity_spike` has been
replaced with `find_or_create_by!` to eliminate the race condition
that could lead to creating multiple activity spikes for a card. To
support this change, the `card_id` index on `cards_activity_spikes`
has been made unique.

ref: https://app.fizzy.do/5986089/cards/3063
2025-11-20 15:40:42 -05:00
Mike Dalessio 20020043f1 Merge pull request #1662 from basecamp/flavorjones/fix-up-fk-migration
Make sure the migration to remove FK constraints is robust
2025-11-20 15:20:50 -05:00
Mike Dalessio fb742d6d29 Make sure the migration to remove FK constraints is robust
where we've already removed the constraints.
2025-11-20 15:16:26 -05:00
Jorge Manrubia fd812cf862 Merge pull request #1660 from basecamp/revert-1659-notifications-copy
Revert "Add more detail to events summaries"
2025-11-20 21:12:37 +01:00
Jorge Manrubia 7200af879f Revert "Add more detail to events summaries" 2025-11-20 21:12:10 +01:00
Jorge Manrubia 4aef7230e5 Merge pull request #1659 from basecamp/notifications-copy
Add more detail to events summaries
2025-11-20 21:11:58 +01:00
Jorge Manrubia a48aa84f11 Remove legacy event 2025-11-20 21:11:02 +01:00
Jorge Manrubia 93a80ab8c2 Add more detail to events 2025-11-20 21:07:55 +01:00
Mike Dalessio 4804e1367c Merge pull request #1658 from basecamp/fizzy-remove-foreign-key-constraints
Drop all foreign key constraints
2025-11-20 15:06:00 -05:00
Mike Dalessio 6e67a7787a Drop all foreign key constraints
These have been a contributing cause to some deadlocks, but also this
makes some operational tasks harder (data loading, data truncation)
and has some performance impact on insert/update/delete operations.

The team consensus is that we aren't relying on them, and so we're
comfortable with the referential integrity risk.
2025-11-20 15:01:25 -05:00
Mike Dalessio 23c310e154 Merge pull request #1657 from basecamp/fizzy-admin-stats-20251120
Add total counts and restructure admin stats dashboard
2025-11-20 14:40:40 -05:00
Mike Dalessio 1341830ed2 Add total counts and restructure admin stats dashboard
- Add total counts for accounts and identities alongside 7-day and 24-hour metrics
- Change layout from horizontal to vertical stacking

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 14:39:19 -05:00
Andy Smith 75a978e972 Merge pull request #1655 from basecamp/hide-title-scrollbar
Add hide-scrollbar utility and use on card titles
2025-11-20 11:37:17 -06:00
Mike Dalessio 8ce97e85b2 Merge pull request #1652 from basecamp/flavorjones/3062-draft-card-creation-time
Change "ADDED" to "DRAFTED" when rendering draft cards
2025-11-20 12:17:30 -05:00
Andy Smith 7fe2ea203d Add hide-scrollbar utility and use on card titles 2025-11-20 11:03:10 -06:00
Andy Smith 3469965f7a Merge pull request #1644 from basecamp/fix-too-large-filters
Remove special Safari hack
2025-11-20 10:48:22 -06:00
Stanko Krtalić c33802d37b Fix attachemnts (#1627)
* Load keys from tenanted dbs

* Implement sgid swapping

* Fix sgid generation

* Flip the logic to do lookups by tenant and id

* Create missing blobs

* Copy over variations

* fix-active-storage-links: fix mentions

* Fix variant generation

* Fix avatars

* Fix avatars

---------

Co-authored-by: Mike Dalessio <mike@37signals.com>
2025-11-20 11:47:49 -05:00
Jason Zimdars fd3b32fd15 Merge pull request #1643 from basecamp/account-to-cache-key
Add `Current.account` to cache key
2025-11-20 10:27:59 -06:00
Mike Dalessio 7ba4d7ed73 Merge pull request #1653 from basecamp/flavorjones/claude-md
Add a CLAUDE.md and a STYLE.md
2025-11-20 11:18:15 -05:00
Mike Dalessio 7ef7a8e49b Add a CLAUDE.md and a STYLE.md
The CLAUDE.md file is a stripped-down version of a file originally
generated by Claude.

The STYLE.md file is inspired by an internal 37signals style guide.
2025-11-20 10:20:02 -05:00
Mike Dalessio 71f2ffbf59 Change "ADDED" to "DRAFTED" when rendering draft cards
ref: https://app.fizzy.do/5986089/cards/3062
2025-11-20 09:32:42 -05:00
Stanko Krtalić 4217984f1b Merge pull request #1651 from basecamp/add-retries-to-activestorage-analzejob
Retry file analisys on FileNotFoundError
2025-11-20 15:27:25 +01:00
Mike Dalessio 88750a3498 Prefer Time.current to Time.now 2025-11-20 09:13:17 -05:00
Stanko K.R. e8a7b19647 Retry file analisys on FileNotFoundError 2025-11-20 15:09:43 +01:00
Stanko Krtalić f6cfb5fde4 Merge pull request #1648 from basecamp/fix-user-avatars-in-notification-bundles
Fix missing avatars in notification bundle emails
2025-11-20 11:19:13 +01:00
Stanko K.R. 8a1cbdd0ae Fix links in previews 2025-11-20 10:49:29 +01:00
Kevin McConnell 5aa960b243 Merge pull request #1649 from basecamp/switch-accounts-in-same-window
Don't open account links in new window
2025-11-20 09:45:23 +00:00
Kevin McConnell 4fc85883ee Don't open account links in new window
This allows switching account in-place inside the same PWA or browser
tab.
2025-11-20 09:36:18 +00:00
Stanko K.R. cc41a42221 Fix missing avatars in notification bundle emails 2025-11-20 10:33:42 +01:00
Kevin McConnell e37038c0a6 Merge pull request #1647 from basecamp/avoid-notification-deadlocks
Process notification recipients in consistent order
2025-11-20 09:27:57 +00:00
Kevin McConnell bc73cf692d Process notification recipients in consistent order
We've seen some cases of deadlock when processing notifications, because
locks are gathered on the users in different orders. Let's try sticking
to a consistent order instead, which should cause the jobs to serialize
rather than deadlock.
2025-11-20 09:20:48 +00:00
Mike Dalessio 19d8e41b38 Merge pull request #1646 from basecamp/flavorjones/improve-search-results
Improve search results
2025-11-19 18:09:18 -05:00
Mike Dalessio 99fe5ff934 Make sure that comments show up in search properly
when the search term appears in both the comment and the card description
2025-11-19 18:02:36 -05:00
Mike Dalessio 378705a30d Deduplicate filter results
when both a card and that card's comments match the search term, we
don't want to show it multiple times.

ref: https://app.fizzy.do/5986089/cards/3030
2025-11-19 17:51:38 -05:00
Jason Zimdars a500cbf43a Merge pull request #1645 from basecamp/jz-11-19-25
JZ 11-19-25
2025-11-19 16:47:59 -06:00
Jason Zimdars f35623b75f Capitalize 2025-11-19 16:47:02 -06:00
Jason Zimdars 67da7cba75 Update test 2025-11-19 16:46:09 -06:00
Mike Dalessio a5f5b592c2 test: remove redundant session setup 2025-11-19 17:43:40 -05:00
Jason Zimdars 25e2d98c35 Don't label these, they're expected and obvious (I think) 2025-11-19 16:26:55 -06:00
Jason Zimdars a15043a336 The symbol is hard to read, go back to text labels 2025-11-19 16:23:21 -06:00
Jason Zimdars 0259cb860d Fix awkward wrapping on mobile 2025-11-19 16:16:16 -06:00
Jason Zimdars 7e008864f2 Ensure back buttons collapse to icons on small screens 2025-11-19 16:04:21 -06:00
Andy Smith 96eec219b3 Actually, keep it, but just target mobile Safari 2025-11-19 16:04:11 -06:00
Andy Smith 221c03c3df Remove special Safari hack 2025-11-19 16:02:25 -06:00
Jason Zimdars 5bab67999e Add Current.account to cache key 2025-11-19 15:44:57 -06:00
Mike Dalessio 6592a0e89a Merge pull request #1642 from basecamp/flavorjones/join-code-exhaustion
Display a helpful error message when join code is exhausted
2025-11-19 15:54:30 -05:00
Mike Dalessio c53b56c1db Display a helpful error message when join code is exhausted
ref: https://app.fizzy.do/5986089/cards/3015
2025-11-19 15:53:25 -05:00
Andy Smith 30a201f1ed Merge pull request #1636 from basecamp/mini-bubble-reposition
Don't show mini bubbles in Maybe column
2025-11-19 14:12:31 -06:00