Commit Graph

768 Commits

Author SHA1 Message Date
Stanko K.R. 9cfd1e43af Enable subscribing to specific actions 2025-09-16 20:03:57 +02:00
Stanko K.R. a515ea3b1f Create webhooks 2025-09-16 20:03:55 +02:00
Jorge Manrubia b5a2c4a25e Tidy up code a bit 2025-09-16 13:18:13 +02:00
Jason Zimdars f57b6627e7 User needs to be explicity set to watching to receive this notification 2025-09-16 12:58:56 +02:00
Jorge Manrubia b87a572f58 Fix VCR test 2025-09-16 12:30:23 +02:00
Jorge Manrubia a6eb928688 Fix: update ends_at when flushing bundles
If not, it can happen that the bundlers remains in a delivered state
even when it is not covering its window anymore because it has been delivered.
2025-09-16 12:10:06 +02:00
Jorge Manrubia 09325403e5 Add missing test (we were only testing this logic via the bundle test) 2025-09-16 11:22:14 +02:00
Mike Dalessio d5a4239d19 Rename the queenbee_id and signal_user_id columns
to be more generic for the open-source release.

Find the signal account via Account#external_account

Find the signal user via User#external_user
2025-09-15 13:57:53 -04:00
Jorge Manrubia 3d8437bd5f Truncate summaries to keep within API limits
https://fizzy.37signals.com/5986089/cards/1739
2025-09-15 16:14:29 +02:00
Jorge Manrubia 05ba0b703e Update VCR fixtures 2025-09-15 14:27:10 +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
Mike Dalessio 5dec991d7c Introduce a few system tests
Primarily I'm trying to exercise active storage and action cable /
turbo streams, both of which have been brittle when making changes to
tenanting.
2025-09-13 13:18:32 -04:00
Mike Dalessio 5c44a93172 Fix VCR cassettes for user highlights 2025-09-13 10:54:38 -04:00
Jorge Manrubia c386b42e07 Fix VCR fixtures 2025-09-12 19:01:10 +02:00
Jorge Manrubia ba3b782d21 Merge branch 'main' into watchers
* main:
  Fix add card not working in the cards screen
  Submit and refresh results as you type terms
  Fix: When expanding filters, submitting filters should keep the filters expanded
  Invalidate cache when filter changes
  Switch to gpt-5-chat
  Handle filter toggles with JS
  Prevent glitch where you see the filter bar expanded when you clear it
  Remove unused templates
  Fix: all collections link not working after moving to turbo frame
  Restore cache I deleted by mistake
  Speed up filter expansion with turbo stream
  Fix: filtering collections not working after moving menu to turbo frame
  Respect params when loading the menu or they won't be reflected!
  Add HTTP cache for the menu
  Load main menu lazily with a turbo frame
  Inline :has(&) as it's REALLY slow in Safari
  Extract helper method
  Remove transition that is making Safari choke when navigating to Fizzy menus
  Reduce page size to reduce load for processing local times on initial page load
  Avoid having to parse strings

# Conflicts:
#	app/views/cards/index/_add_card_button.html.erb
#	test/vcr_cassettes/period_highlight_test-test_don_t_generate_highlights_for_existing_periods.yml
#	test/vcr_cassettes/period_highlight_test-test_generate_period_highlights.yml
#	test/vcr_cassettes/user/highlights_test-test_don_t_generate_highlights_for_existing_periods.yml
#	test/vcr_cassettes/user/highlights_test-test_generate_weekly_highlights.yml
2025-09-12 18:52:17 +02:00
Jorge Manrubia eabce24415 Switch to gpt-5-chat
Cheaper and good enough

https://3.basecamp.com/2914079/buckets/37331921/todos/9041305517
2025-09-12 16:16:54 +02:00
Jason Zimdars d9d3e9f1a2 Update VCR for highlights tests
I don't see how this is related to my changes but it keeps failing
2025-09-11 22:32:04 -05:00
Jason Zimdars 9ad813e5d0 Fix misleading test
The access involvement changes exposed that this test wasn't doing what it said it was. For this to be a self-assignment the event creator and assignee need to be the same
2025-09-11 21:33:21 -05:00
Jason Zimdars c4dec29b49 Assignment notifications should always be delivered
- They're effectively @mentions
- This means watching really reflects the UI state: Watching for new cards
2025-09-11 21:21:11 -05:00
Jason Zimdars e68b344cc2 Remove _Everything_ inolvement 2025-09-11 12:34:31 -05:00
Jorge Manrubia d345f707a1 Remove job test 2025-09-10 11:47:17 +02: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 7f7ecf0346 Delete notifications when the user loses access to the collection 2025-09-10 10:24:20 +02:00
Jorge Manrubia 2e51a34694 Extract method to fetch all the notifications for a card for a given user
We'll need to handle access changes
2025-09-10 10:08:14 +02:00
Jorge Manrubia 58c525e5a6 Broadcast notifications that are deleted
To prevent 404s when someone doesn't refresh the page
2025-09-10 09:50:22 +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 07bdcb7a9c Pass the new param this partial requires 2025-09-09 12:12:39 +02:00
Jorge Manrubia c36420800e Fix test (and remove warning) 2025-09-09 12:12:22 +02:00
Jorge Manrubia e89749153f Fix VCR tests 2025-09-09 10:20:15 +02:00
Jorge Manrubia ebfc168266 Make sure it considers the week before if this is invoked on a sunday 2025-09-08 08:38:33 +02:00
Jorge Manrubia d13a9e01db Update VCR fixtures 2025-09-05 18:04:58 +02:00
Jorge Manrubia d9cc592566 Merge pull request #1007 from basecamp/weekly-highlights
Weekly highlights
2025-09-05 17:03:38 +02:00
Jorge Manrubia aad61b36bc Generate highlights in the user timezone, now that we persist it
Also, remove the dates and duration from the highlights records. Those are not relevant, only the events-derived
key is. If two users with different timezones have different activities, they should see different summaries.
2025-09-05 12:39:09 +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
Jason Zimdars 3814c17d49 Be defensive about unwanted elements it sometimes inserts 2025-09-04 12:52:01 -05:00
Jason Zimdars 53f06d2554 Adjust summary, style in newspaper format 2025-09-02 22:14:13 -05:00
Jorge Manrubia d785f9f80f Don't show summaries when using filters 2025-09-02 12:20:02 +02:00
Jorge Manrubia 0c979a41c5 Format 2025-09-02 11:12:33 +02:00
Mike Dalessio 85b6f46422 Do not try to bundle notifications for system users
ref: https://fizzy.37signals.com/5986089/collections/7/cards/1471
2025-09-01 12:37:34 -04:00
Jorge Manrubia dfbc77c2e5 Render weekly highlights considering periods of inactivity 2025-09-01 17:09:43 +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
Jason Zimdars e86be26f43 Update test
This test is a little naive because it matches cards in stages
regardless of engagement status unlike the actual conroller. For example
`@new_card` gets created and moved to a stage but it's actually not even
published and so shouldn't be stageable.
2025-08-28 21:24:23 -05:00
Mike Dalessio f4f38015dd Merge pull request #993 from basecamp/flavorjones/clean-up-unused-routes-1
refactor: remove unused routes associated with "resource :account"
2025-08-28 12:19:05 -04:00
Mike Dalessio 5f4ee049c6 Fix up hotkeys
ref: https://fizzy.37signals.com/5986089/collections/2/cards/1452
2025-08-28 11:47:45 -04:00
Mike Dalessio 28c4cc7cee test: backfill hotkeys helper tests
and remove support for the unused use case of comma-delimited-strings
2025-08-28 11:44:51 -04: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
Mike Dalessio e26c1db5c5 test: backfill account route tests to prepare for refactor 2025-08-28 11:01:52 -04:00