Commit Graph

96 Commits

Author SHA1 Message Date
Stanko K.R. ba3f6b188e Add account_id to everything 2025-11-17 09:11:42 -05:00
Stanko K.R. fd7a9330e8 Remove email_address & password_digest from User 2025-11-04 07:20:16 +01: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
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 6cff82226b Place concern in order 2025-10-25 20:08:28 +02:00
Jorge Manrubia 392bdae316 Rename highlights -> summary 2025-10-25 20:06:57 +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
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