Commit Graph

264 Commits

Author SHA1 Message Date
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 6073f79191 Invalidate cards when watching/unwatching
Follow up to https://fizzy.37signals.com/5986089/cards/2198
2025-10-06 16:13:33 +02:00
Jorge Manrubia c846221208 Invalidate cards when watchers change 2025-10-06 15:44:12 +02:00
Jorge Manrubia 38116f64e4 Higher fidelity for watching/unwatching cards 2025-10-06 10:48:31 +02:00
Jorge Manrubia 5e09944606 Separate card and collection watchers
https://fizzy.37signals.com/5986089/cards/375
2025-10-03 19:04:01 +02:00
Mike Dalessio 2d327e6294 Render a helpful menu of tenants temporarily 2025-10-02 16:33:25 -04:00
Mike Dalessio 47370084d2 Remove code related to Launchpad auth or 37id Users 2025-10-02 16:33:23 -04:00
Jorge Manrubia 1b6b82a6cc Redirect to cards when searching by card id 2025-09-30 13:52:27 +02:00
Jorge Manrubia f7f4aa6eaf Add more controller tests 2025-09-28 22:02:01 +02:00
Jorge Manrubia 23895e53aa Add tests for new controllers 2025-09-28 21:11:07 +02:00
Jorge Manrubia 0b0fb57e58 Fix tests 2025-09-28 20:31:41 +02:00
Jorge Manrubia e14262dc01 Fix tests, remove workflow controllers 2025-09-28 18:50:26 +02:00
Jorge Manrubia 1b39e0b45e Format 2025-09-28 11:18:54 +02:00
Jorge Manrubia d7ef9749c0 Remove old drop controller 2025-09-26 12:33:29 +02:00
Jorge Manrubia 2f6a639682 Prepare entropy code for the new auto postpone approach 2025-09-24 16:22:42 +02:00
Jorge Manrubia de60b198bd Fix tests 2025-09-19 16:52:13 +02:00
Jorge Manrubia e6608748f6 Fix test 2025-09-17 19:40:03 +02:00
Jorge Manrubia a680235773 Redirect to home if remove yourself from the collection 2025-09-17 18:21:50 +02:00
Stanko K.R. 34222b9717 Add missing actions 2025-09-16 20:23:50 +02:00
Stanko K.R. 63e64a060d Use HTML5 validation for the URL 2025-09-16 20:08:06 +02:00
Stanko K.R. 02a421675f Scope Webhooks to Collections 2025-09-16 20:07:25 +02:00
Stanko K.R. 680a69ad29 Add tests for webhooks controllers 2025-09-16 20:04:20 +02:00
Mike Dalessio 2630e4bd74 Extract 37id and QB controllers, models, and tests 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 4e72566856 Flatten card resource
We only need the parent collection for creating cards. Carrying it in the
rest of actions is a hassle.
2025-09-10 11:24:23 +02:00
Jorge Manrubia d533f05c7b Use vanilla resources for handling notifications 2025-09-10 09:17:57 +02:00
Jorge Manrubia be246d204f Replace assignees with a turbo stream instead of replacing the full card
So that we don't lose th editing context if you do it while editing a card

https://fizzy.37signals.com/5986089/collections/2/cards/1479
2025-09-09 15:32:18 +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 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 6f2670d6dd Merge main into bundle-emails branch and resolve conflicts 2025-09-01 11:49:20 +02:00
Mike Dalessio 87d81e608b refactor: remove unused routes associated with "resource :account"
- Drop from 313 unused routes to 306 unused routes
- Use a namespace for the account-related resource routes
- Controllers are nested under the "Account" module now
- Move views from "accounts/" to "account/"
2025-08-28 11:12:24 -04: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
Stanko K.R. 89af9066d3 Remove Fizzy Do command logic 2025-08-22 07:33:24 +02:00
Jorge Manrubia fa82dc0384 Remove code related to Fizzy Do /command support and filtering
https://3.basecamp.com/2914079/buckets/37331921/messages/8961776532
2025-08-18 13:41:20 +02:00
Mike Dalessio e84cd529d5 The "sign out" button now clears the Launchpad login.
ref: https://fizzy.37signals.com/5986089/collections/2/cards/1382
2025-08-15 12:25:10 -04:00
Stanko K.R. 67c9bdc3d9 Add controller tests for conversations and messages 2025-08-13 15:14:12 +02:00
Jason Zimdars aa13853ae4 Add a third, "On deck" column in Collections 2025-08-12 17:58:12 -05:00
Jorge Manrubia 588f03e927 Remove insight experimental code
Also, downgrade LLM for commands to mini. It's much cheaper and I only upgraded because of the
interpretation complexities that the insight command introduced.

We are implementing a much better approach with Ask.
2025-08-11 13:40:56 +02:00
Mike Dalessio 57269b1b9c Allow local authentication with LOCAL_AUTHENTICATION=1
You can touch `tmp/local-auth.txt` to persist this setting.
2025-08-06 17:05:35 -04:00
Jorge Manrubia 539f83eaee Add VCR fixtures for test 2025-07-25 14:51:28 +02:00
Kevin McConnell 02bdfc780c Skip failing activity summary test 2025-07-25 11:45:22 +01:00
Jorge Manrubia 7de45cc061 Remove vcr_record! and fix VCR fixtures due to different timestamps 2025-07-24 16:48:06 +02:00
Jason Zimdars 6ef390f201 Test the destroy action 2025-07-23 17:26:01 -05: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 fc1ff7bf5e Fix tests 2025-07-23 12:21:20 +02:00
Jorge Manrubia c3ae05833e Make models selectable 2025-07-23 11:02:34 +02:00
Jorge Manrubia e6004047fc Rename file 2025-07-22 19:14:07 +02:00
Jorge Manrubia 493d517a0c Make sure non-staff user can't access to the prompt editor 2025-07-22 19:05:59 +02:00
Jorge Manrubia 2a7552f474 Add controller test 2025-07-22 18:57:50 +02:00
Jason Zimdars f6d8d3021d Add controller test 2025-07-21 20:06:41 -05:00