19 Commits

Author SHA1 Message Date
Kevin McConnell e105ca6fb5 Remove zero-padding from account slug
This shortens URLs in the self-hosted case, where external account ID is
typically a small number.
2026-01-28 11:59:42 +00:00
Jorge Manrubia 1083f715a8 This was moved to the gem already by Mike 2025-11-28 15:53:58 +01: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
Mike Dalessio 9f117159a6 Restore structured logging of queenbee_id
and clean up some other small remaining "plan b" to-dos.
2025-11-24 15:50:45 -05:00
Donal McBreen cc7e091508 Disable multi-db for SQLite 2025-11-21 09:15:19 +00:00
Mike Dalessio 3b717bbe0d Move AccountSlug::Extractor later in the stack
so that in development, it runs after reloading; but still before the
database selector middleware in case we ever want to do something
account-specific.
2025-11-18 09:20:47 -05:00
Mike Dalessio 2a1817d902 Bringing back the TurboStreamsExtension
so that, for example, notification content contains the URLs properly
scoped to the account.
2025-11-17 09:12:41 -05:00
Mike Dalessio e3d86bb21e Clean up some spots where "current account" is ambiguous
Primarily this is in tests (which were caught by temporarily
introducing acts_as_tenant and enabling safety checks), but notably
action cable connections were not working properly, and that's now
fixed.
2025-11-17 09:12:41 -05:00
Mike Dalessio 5a7f08067a Move setting Current.account into the middleware
so that code called from the Rails controllers can use Current.account
2025-11-17 09:12:40 -05:00
Mike Dalessio 006aa4d6b3 Tests need to set up the script_name properly
which requires tweaking fixtures for the memberships and the account
2025-11-17 09:11:42 -05:00
Mike Dalessio 030433b99d Remove debugging statements 2025-11-17 09:11:42 -05:00
Mike Dalessio ec54014832 Add account slug middleware
and set Current.account
2025-11-17 09:11:42 -05:00
Mike Dalessio 4d3c265042 Rip out activerecord-tenanting
Co-authored-by: Stanko K.R. <stanko@stanko.io>
2025-11-17 09:11:35 -05: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
Mike Dalessio 8e64ef741f dev: Fix the default tenant to be the correct Honcho id 2025-10-21 15:13:29 -07:00
Mike Dalessio 5540b0fd1b Make sure session cookie has the correct path for the tenant
ref: https://fizzy.37signals.com/5986089/collections/7/cards/1234
2025-08-10 18:53:52 -04:00
Mike Dalessio 05984845ca Change Active Storage account slug extension to a to_prepare block
because it was breaking in development after a reload.
2025-07-03 19:01:03 -04:00
Mike Dalessio 3844dc9ff3 Patch Active Storage controllers to generate slugged URLs
This really only impacts the Disk service in development.

I proposed this upstream in https://github.com/rails/rails/pull/55248,
but it's not clear if the presence of script_name should _always_
prefix generated URLs, so for now it's local to Fizzy.
2025-07-01 15:56:14 -04:00
Mike Dalessio e378c5a45e Extract pieces from the tenanting initializer
into:

- tenanting/account_slug
- tenanting/logging
- tenanting/turbo
2025-07-01 15:56:14 -04:00