Commit Graph

85 Commits

Author SHA1 Message Date
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
Mike Dalessio 2630e4bd74 Extract 37id and QB controllers, models, and tests 2025-09-13 16:03:02 -04:00
Mike Dalessio e7dcefb25b Extract SignalUser and SignalAccount, and QB routes 2025-09-13 16:03:02 -04:00
Mike Dalessio 8f39c015ea Tests now pass with local authentication
This is the first step of a multi-step SaaS engine extraction.

Looking ahead to an open source release, we need to make sure that
local authentication is treated as an "official" option, and not just
a hack I added for Kevin to do load testing outside our DC. So this PR
gets to green, and adds a CI step in "local authentication" mode.

This all probably feels a little hacky to you, Reader, but the goal of
this change is to ease the next step, which will be extracting the
37id and Queenbee integrations into a proprietary "SaaS mode" engine.

In service of that goal, this commit simply wraps all of the dependent
code and tests with a conditional check on
`config.x.local_authentication`.
2025-09-13 15:21:00 -04: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 4e2717a61f Merge main into bundle-emails branch 2025-08-28 12:42:43 +02:00
Jorge Manrubia 082a10e3d0 Add notification settings model 2025-08-28 11:20:28 +02:00
Stanko Krtalić 41edfae2b5 Alphabetically order concerns (#992) 2025-08-28 11:07:56 +02:00
Jorge Manrubia e696c69d60 Merge branch 'main' into bundle-emails 2025-08-27 10:17:32 +02:00
Jorge Manrubia cfafc54a81 Deliver emails for bundled notifications (initial WIP) 2025-08-26 13:22:22 +02:00
Stanko K.R. abad369c6a Introduce a Quota and Money object 2025-08-25 10:29:00 +02:00
Stanko K.R. f87a403107 Fix PR review comments 2025-08-22 07:33:26 +02:00
Stanko K.R. e49c7cb1cb Make sending messages feel snappy 2025-08-13 15:14:12 +02:00
Stanko K.R. 13eeb8574d Add the ask command 2025-08-13 15:14:12 +02:00
Jason Zimdars dfb6198e94 Merge branch 'main' into web-push
* main: (50 commits)
  Regenerate fixtures
  Let summaries know about collections
  Regenerate fixtures
  More tweaks
  Regenerate fixtures after tweaking prompt
  Fix model selection (I had broken it!)
  Some prompt refinements
  Some of us have basecamp.com email addresses
  Update nokogiri and thor to addres CVEs
  Fix tests
  Format
  Move model options to helper
  Tidy up the admin tool for prompts
  Extract methods
  Format
  Default to the current summary
  Make models selectable
  Add an animated effect for the generating state
  Remove debug
  Wrap them both in the container so the generating state looks right
  ...
2025-07-23 11:50:35 -05:00
Jorge Manrubia 6d26195bc7 Add a debug prompt endpoint so that we can play with the prompts live 2025-07-22 14:33:34 +02:00
Jorge Manrubia 7cd459f2b8 AI Summaries: basic abstractions, functional version 2025-07-22 11:57:39 +02:00
Jason Zimdars 6524363aec Merge branch 'main' into web-push
* main:
  Update dependencies
  dep: bump to ruby 3.4.5
  Switch to docker-dev
  Cache needs to include publication key
  First iteration on adding new users, from the console.
  Fix clear button position in Safari
  Give them screen reader labels
  Not needed
  Add missing `lang` attribute
  Restore missing aspect ratio on the perma
  Give the field more space when typing on mobile
  We're only concerned with truncating the placeholder, scope to that
  Make sure users can't login from launchpad if they're deactivated
  Destroy the SignalId::User when a user is deactivated
2025-07-17 14:31:05 -05:00
Mike Dalessio e69023993c Make sure users can't login from launchpad if they're deactivated
Just in case the SignalId::User deletion failed.
2025-07-15 18:47:38 -04:00
Mike Dalessio 9f887e17f5 Destroy the SignalId::User when a user is deactivated 2025-07-15 18:30:23 -04:00
Jason Zimdars e59a994a0c Add db table and models 2025-07-14 19:57:30 -05:00
Jorge Manrubia 9b897191d0 Extract attachable concerns 2025-07-03 11:25:47 +02:00
Jorge Manrubia 93be9e945f Support user prompts in Fizzy do, move parsing logic to context 2025-07-01 14:06:39 +02:00
Jorge Manrubia 4f01b1763b Remember recent searches 2025-06-24 10:41:06 +02:00
Mike Dalessio 0da5f8101e User belongs to Signal::User 2025-06-20 15:16:56 -04:00
Jorge Manrubia 2dbb53da1f Add prompts to the rest of rich text editors 2025-06-19 13:34:44 +02:00
Jorge Manrubia cda20600b1 Show mentions in the editor 2025-06-19 12:16:32 +02:00
Jorge Manrubia 65d809dd8d Basic models for Fizzy do and searches working with them 2025-05-06 06:42:33 +02:00
Jorge Manrubia 13b0c0fc41 First pass to tidy up activity time rendering 2025-04-24 12:28:16 +02:00
Jorge Manrubia 3793718e72 Fix concern I lost during merge 2025-04-23 17:25:36 +02:00
Jorge Manrubia b08326ccbe Merge branch 'main' into plain-text-mentions
* main: (48 commits)
  Improve layout and truncation
  This is annoying
  Fix summary
  Remove index columns
  Same treatment for the events index
  New menu filters and navigates
  Don't test for _Added by_ events
  Indention
  @collection is always available when card scoped
  Style
  Remove check for _Added by..._ line
  The placeholder attribute is on the `house-md` element
  Duh, no before destroy commit, but this is still not right!
  No long transactions!
  Don't display published event in threads
  But feels more essentially part of the User, so list first
  Not related to the other two
  Missing controller
  Style
  Errant `bubbles` => `cards` replacement
  ...

# Conflicts:
#	app/models/card.rb
#	app/models/user.rb
#	db/schema.rb
#	db/schema_cache.yml
2025-04-23 17:24:01 +02:00
David Heinemeier Hansson 7124835e60 No long transactions!
If you intend to deactivate someone, and the process fails mid process,
so you only delete some sessions, or some accesses, you are actually
fine. The system is never left in an incomplete state. And that's really
the only time we should be using transactions with sqlite3 -- to prevent
actual data integrity issues.

The rest of the time, we should optimize for each transaction to be as
quick as possible. The sqlite3 writer lock is the one bottleneck that we
cant afford to overload.
2025-04-22 21:29:03 +02:00
David Heinemeier Hansson 90f05b7310 But feels more essentially part of the User, so list first 2025-04-22 21:25:30 +02:00
David Heinemeier Hansson 72d1d0baee Not related to the other two 2025-04-22 21:24:51 +02:00
David Heinemeier Hansson 6cd8d54bf7 We werent using any of the other avatar methods 2025-04-22 21:20:18 +02:00
Jorge Manrubia aa3acfeaa8 Add plain text mentions 2025-04-22 11:26:56 +02:00
David Heinemeier Hansson 6bbf68a4f9 The tenanted db is the account scope 2025-04-12 20:06:34 +02:00
Jorge Manrubia 723e6d94f5 Rename bubbles => cards 2025-04-09 14:50:58 +02:00
Jorge Manrubia 9b4169c7ca Scope data by account
With a single database this problem is not as bad, but it feels
safer to do things right. Also, not everyone in an account has access
to all the bubbles.
2025-04-07 13:09:49 +02:00
David Heinemeier Hansson f063116df4 Group related associations together 2025-04-05 13:19:30 +02:00
David Heinemeier Hansson aefbac9c14 Get rid of single-use and slight awkward model scope
Really dont like that raw Arel.sql wrapping that is required.
2025-04-05 13:17:42 +02:00
David Heinemeier Hansson 821f4c43d8 Excess CR 2025-04-05 12:49:19 +02:00
David Heinemeier Hansson 1463fa68f4 Sessions only depend on user and have no callback, so use the faster delete_all 2025-04-05 12:48:52 +02:00
David Heinemeier Hansson 8ff017fc5b Only one invocation of this, not carrying the worth of its indirection
Generally I am wary of including global state checks in the belly of
models. It is one thing to do it as a default parameter, but I think it
is too far to do it inside an actual method.
2025-04-05 12:40:08 +02:00
David Heinemeier Hansson d237885bd4 Extract User::Assignee role
Keep slimming down that User
2025-04-05 12:37:18 +02:00
David Heinemeier Hansson 17bdfb5df5 Already included in the Avatar concern 2025-04-05 12:35:41 +02:00
David Heinemeier Hansson 92ce80cc32 Extract User::Accessor concern
Our User model is getting overloaded
2025-04-05 12:34:39 +02:00
Jorge Manrubia 05fc73e2ae Merge pull request #334 from basecamp/user-admins
Add admin role and animate admin toggle
2025-04-04 08:29:03 +02:00
Jorge Manrubia cfe91c25c9 Add admin role, make sure only admins can remove and promote other users 2025-04-03 17:43:29 +02:00
Kevin McConnell 0820badcc3 Add involvement types to accesses
This provides a way to set the level of involvement that a user has with
a collection, and from which we determine the level of notifications to
send. Users can be access-only, watching, or being notified about
everything.

If you're access-only, you won't get an notifications. If you're
watching, you'll only get notifications for the items you're watching
(which includes the items you've been assigned, have commented on, etc).
If you're set to everything you'll get notifications about all activity
in that collection.

This change replaces our previous concept of subscriptions. Where
previously you'd subscribe to a collection to get notifications in it,
now you'll simply set the notification level on your access.
2025-04-03 16:35:13 +01:00