From 1d5654cafa14e9620400c3458c2f602fa2d196fd Mon Sep 17 00:00:00 2001 From: Adam Haris Date: Thu, 4 Dec 2025 10:41:21 +0100 Subject: [PATCH 1/9] configurable actionmailer settings (ENV) --- config/environments/production.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/config/environments/production.rb b/config/environments/production.rb index 86b66b968..5bfc990a8 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -80,6 +80,23 @@ Rails.application.configure do config.action_mailer.perform_caching = false + config.action_mailer.delivery_method = ENV.fetch("MAILER_DELIVERY_METHOD", "sendmail").to_sym + + config.action_mailer.smtp_settings = { + address: ENV.fetch("SMTP_ADDRESS", "localhost"), + port: ENV.fetch("SMTP_PORT", "587").to_i, + domain: ENV.fetch("SMTP_DOMAIN", nil), + user_name: ENV.fetch("SMTP_USERNAME", nil), + password: ENV.fetch("SMTP_PASSWORD", nil), + authentication: ENV.fetch("SMTP_AUTHENTICATION", "plain"), + enable_starttls_auto: ENV.fetch("SMTP_ENABLE_STARTTLS_AUTO", "true") == "true" + } + + config.action_mailer.sendmail_settings = { + location: ENV.fetch("SENDMAIL_LOCATION", "/usr/sbin/sendmail"), + arguments: ENV.fetch("SENDMAIL_ARGUMENTS", "-i") + } + # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false From 9de59ca37badf9bd5e9cfce9c50fb52428e304e3 Mon Sep 17 00:00:00 2001 From: Adam Haris Date: Fri, 5 Dec 2025 12:38:19 +0100 Subject: [PATCH 2/9] default to smtp --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 5bfc990a8..1b97dedb1 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -80,7 +80,7 @@ Rails.application.configure do config.action_mailer.perform_caching = false - config.action_mailer.delivery_method = ENV.fetch("MAILER_DELIVERY_METHOD", "sendmail").to_sym + config.action_mailer.delivery_method = ENV.fetch("MAILER_DELIVERY_METHOD", "smtp").to_sym config.action_mailer.smtp_settings = { address: ENV.fetch("SMTP_ADDRESS", "localhost"), From 99bee0e0e0af576a122a75d8aa0a8aa50bc1be1e Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Tue, 9 Dec 2025 11:37:54 +0000 Subject: [PATCH 3/9] Make SMTP config conditional on SMTP_ADDRESS - If `SMTP_ADDRESS` is set, configure Action Mailer to use it, along with additional optional SMTP-related settings. - Otherwise, don't set config (for compatibility with engines like fizzy-saas). - Remove sendmail env setup, since by default there is no sendmail in the container, and custom deployment can use whatever config the want directly. If we end up needing this, we can bring it back via its own env. --- README.md | 8 +++--- config/deploy.yml | 3 ++- config/environments/production.rb | 43 ++++++++++--------------------- 3 files changed, 19 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 07f55614e..27440196e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This repo contains a starter deployment file that you can modify for your own sp The steps to configure your very own Fizzy are: 1. Fork the repo -2. Edit few things in config/deploy.yml, .kamal/secrets, and config/environments/production.rb +2. Edit few things in config/deploy.yml and .kamal/secrets 3. Run `kamal setup` to do your first deploy. We'll go through each of these in turn. @@ -37,6 +37,7 @@ We've added comments to that file to highlight what each setting needs to be, bu - `ssh/user`: If you access your server a `root` you can leave this alone; if you use a different user, set it here. - `proxy/ssl` and `proxy/host`: Kamal can set up SSL certificates for you automatically. To enable that, set the hostname again as `host`. If you don't want SSL for some reason, you can set `ssl: false` to turn it off. - `env/clear/MAILER_FROM_ADDRESS`: This is the email address that Fizzy will send emails from. It should usually be an address from the same domain where you're running Fizzy. +- `env/clear/SMTP_ADDRESS`: The address of an SMTP server that you can send email through. You can use a 3rd-party service for this, like Sendgrid or Postmark, in which case their documentation will tell you what to use for this. Fizzy also requires a few environment variables to be set up, some of which contain secrets. The simplest way to do this is to put them in a file called `.kamal/secrets`. @@ -58,6 +59,7 @@ SMTP_PASSWORD=email-provider-password The values you enter here will be specific to you, and you can get or create them as follows: - `SECRET_KEY_BASE` should be a long, random secret. You can run `bin/rails secret` to create a suitable value for this. +- `SMTP_USERNAME` & `SMTP_PASSWORD` should be valid credentials for your SMTP server. If you're using a 3rd-party service here, consult their documentation for what to use. - `VAPID_PUBLIC_KEY` & `VAPID_PRIVATE_KEY` are a pair of credentials that are used for sending notifications. You can create your own keys by starting a development console with: ```sh @@ -73,10 +75,6 @@ The values you enter here will be specific to you, and you can get or create the puts "VAPID_PUBLIC_KEY=#{vapid_key.public_key}" ``` -- `SMTP_USERNAME`/`SMTP_PASSWORD` are credentials you should get from your email provider. - -Lastly, you'll need to set up the rest of your email configuration in `config/environments/production.rb`. There is an example configuration in comments at the top of that file. The actual settings you use here will depend on your email provider, but in most cases will look similar to that section, so you can uncomment it and edit to suit. Note that it will use the `SMTP_USERNAME` and `SMTP_PASSWORD` values you entered in your secrets. - Once you've made all those changes, commit them to your fork so they're saved. ### Deploy Fizzy! diff --git a/config/deploy.yml b/config/deploy.yml index 0e855727d..8245a7136 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -28,7 +28,8 @@ env: - SMTP_USERNAME - SMTP_PASSWORD clear: - MAILER_FROM_ADDRESS: support@example.com # The email address that Fizzy sends email from + MAILER_FROM_ADDRESS: support@example.com # The email "from" address that Fizzy sends email from + SMTP_ADDRESS: mail.example.com # The SMTP server you'll use to send email SOLID_QUEUE_IN_PUMA: true # Run background jobs in the app container diff --git a/config/environments/production.rb b/config/environments/production.rb index 1b97dedb1..3c676693f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -5,18 +5,20 @@ Rails.application.configure do # Email provider Settings # - # Configure these according to whichever email provider you use. An example setup - # using SMTP looks like the following: - # - # config.action_mailer.smtp_settings = { - # address: 'smtp.example.com', # The address of your email provider's SMTP server - # port: 2525, - # domain: 'example.com', # Your domain, which Fizzy will send email from - # user_name: ENV["SMTP_USERNAME"], - # password: ENV["SMTP_PASSWORD"], - # authentication: :plain, - # enable_starttls_auto: true - # } + # SMTP setting can be configured via environment variables. + # For other configuration options, consult the Action Mailer documentation. + if smtp_address = ENV["SMTP_ADDRESS"].presence + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + address: smtp_address, + port: ENV.fetch("SMTP_PORT", "587").to_i, + domain: ENV.fetch("SMTP_DOMAIN", nil), + user_name: ENV.fetch("SMTP_USERNAME", nil), + password: ENV.fetch("SMTP_PASSWORD", nil), + authentication: ENV.fetch("SMTP_AUTHENTICATION", "plain"), + enable_starttls_auto: ENV.fetch("SMTP_ENABLE_STARTTLS_AUTO", "true") == "true" + } + end # Code is not reloaded between requests. config.enable_reloading = false @@ -80,23 +82,6 @@ Rails.application.configure do config.action_mailer.perform_caching = false - config.action_mailer.delivery_method = ENV.fetch("MAILER_DELIVERY_METHOD", "smtp").to_sym - - config.action_mailer.smtp_settings = { - address: ENV.fetch("SMTP_ADDRESS", "localhost"), - port: ENV.fetch("SMTP_PORT", "587").to_i, - domain: ENV.fetch("SMTP_DOMAIN", nil), - user_name: ENV.fetch("SMTP_USERNAME", nil), - password: ENV.fetch("SMTP_PASSWORD", nil), - authentication: ENV.fetch("SMTP_AUTHENTICATION", "plain"), - enable_starttls_auto: ENV.fetch("SMTP_ENABLE_STARTTLS_AUTO", "true") == "true" - } - - config.action_mailer.sendmail_settings = { - location: ENV.fetch("SENDMAIL_LOCATION", "/usr/sbin/sendmail"), - arguments: ENV.fetch("SENDMAIL_ARGUMENTS", "-i") - } - # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false From d12eaa40734c9f8656c8f13b724992f125f3c22d Mon Sep 17 00:00:00 2001 From: Zoltan Hosszu Date: Mon, 8 Dec 2025 12:25:51 +0100 Subject: [PATCH 4/9] Fixing Lexxy prompt menu spacing --- app/assets/stylesheets/lexxy.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/lexxy.css b/app/assets/stylesheets/lexxy.css index 7b647caca..616f8e62e 100644 --- a/app/assets/stylesheets/lexxy.css +++ b/app/assets/stylesheets/lexxy.css @@ -293,6 +293,10 @@ max-height: 200px; overflow: scroll; + + &:is(.lexxy-prompt-menu--visible) { + padding: var(--lexxy-prompt-padding); + } } .lexxy-prompt-menu--visible { From 6074ed23472aae777e3aa978733e9ec27201cfb7 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 9 Dec 2025 15:56:10 -0600 Subject: [PATCH 5/9] Add blank slate to the main menu --- app/assets/stylesheets/nav.css | 9 +++++++++ app/views/my/menus/_jump.html.erb | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/app/assets/stylesheets/nav.css b/app/assets/stylesheets/nav.css index 8d9b2e5c1..b50189366 100644 --- a/app/assets/stylesheets/nav.css +++ b/app/assets/stylesheets/nav.css @@ -219,6 +219,15 @@ } } + .nav__blank-slate { + font-size: var(--text-small); + margin: 1rem auto; + + .nav:has(.popup__item:not([hidden])) & { + display: none; + } + } + .nav__footer { background-color: var(--color-canvas); border-block-start: 1px solid var(--color-ink-lighter); diff --git a/app/views/my/menus/_jump.html.erb b/app/views/my/menus/_jump.html.erb index e35d03105..1f1ea70c9 100644 --- a/app/views/my/menus/_jump.html.erb +++ b/app/views/my/menus/_jump.html.erb @@ -25,4 +25,8 @@ <%= yield %> + + From 85bd5c2df524fa9dc98255874cc28e72305f71ce Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Tue, 9 Dec 2025 15:50:01 -0800 Subject: [PATCH 6/9] Rails seeded parallel tests (#2037) Enable work stealing by default for a tiny speedup at the cost of small loss in reproducibility. References https://github.com/rails/rails/pull/56175 --- Gemfile.lock | 2 +- Gemfile.saas.lock | 2 +- test/test_helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ea4794b5a..91ce042ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,7 +13,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: bf81d40a91880c059ce9d0447219385a2c8e4a15 + revision: 554970f3e9b520bc302a339c13aa1d98866be3aa branch: ast-immediate-variants-process-locally specs: actioncable (8.2.0.alpha) diff --git a/Gemfile.saas.lock b/Gemfile.saas.lock index aabe04258..2ab43a2af 100644 --- a/Gemfile.saas.lock +++ b/Gemfile.saas.lock @@ -82,7 +82,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: bf81d40a91880c059ce9d0447219385a2c8e4a15 + revision: 554970f3e9b520bc302a339c13aa1d98866be3aa branch: ast-immediate-variants-process-locally specs: actioncable (8.2.0.alpha) diff --git a/test/test_helper.rb b/test/test_helper.rb index d18f4c9c4..12ab491ed 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -38,7 +38,7 @@ end module ActiveSupport class TestCase - parallelize(workers: :number_of_processors) + parallelize workers: :number_of_processors, work_stealing: ENV["WORK_STEALING"] != "false" # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. fixtures :all From 8a732b081dde86740c9fef1e6b3335a14a8fe0b4 Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Tue, 9 Dec 2025 15:54:06 -0800 Subject: [PATCH 7/9] Bump Rails to current ast-immediate-variants-process-locally branch --- Gemfile.lock | 2 +- Gemfile.saas.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 91ce042ce..d99375463 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,7 +13,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: 554970f3e9b520bc302a339c13aa1d98866be3aa + revision: 0636a79d1bf268db6cdbbc6327106d08c3ff3751 branch: ast-immediate-variants-process-locally specs: actioncable (8.2.0.alpha) diff --git a/Gemfile.saas.lock b/Gemfile.saas.lock index 2ab43a2af..b5768acbe 100644 --- a/Gemfile.saas.lock +++ b/Gemfile.saas.lock @@ -82,7 +82,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: 554970f3e9b520bc302a339c13aa1d98866be3aa + revision: 0636a79d1bf268db6cdbbc6327106d08c3ff3751 branch: ast-immediate-variants-process-locally specs: actioncable (8.2.0.alpha) From d60643f5ef62750153962c320b266862cbf4718f Mon Sep 17 00:00:00 2001 From: Robin Brandt Date: Tue, 9 Dec 2025 20:16:15 -0500 Subject: [PATCH 8/9] Allow chromium unstable endpoint --- app/models/push/subscription.rb | 1 + test/models/push/subscription_test.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/push/subscription.rb b/app/models/push/subscription.rb index afd417367..1248e9091 100644 --- a/app/models/push/subscription.rb +++ b/app/models/push/subscription.rb @@ -1,5 +1,6 @@ class Push::Subscription < ApplicationRecord PERMITTED_ENDPOINT_HOSTS = %w[ + jmt17.google.com fcm.googleapis.com updates.push.services.mozilla.com web.push.apple.com diff --git a/test/models/push/subscription_test.rb b/test/models/push/subscription_test.rb index 9f4650614..89887599f 100644 --- a/test/models/push/subscription_test.rb +++ b/test/models/push/subscription_test.rb @@ -98,6 +98,7 @@ class Push::SubscriptionTest < ActiveSupport::TestCase test "accepts all permitted push service domains" do permitted_endpoints = [ "https://fcm.googleapis.com/fcm/send/token123", + "https://jmt17.google.com/fcm/send/token123", "https://updates.push.services.mozilla.com/wpush/v2/token123", "https://web.push.apple.com/QaBC123", "https://wns2-db5p.notify.windows.com/w/?token=abc123" From 9d5ddfccec7b5d3d417f410995f490ec20ab26be Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Wed, 10 Dec 2025 09:18:20 +0100 Subject: [PATCH 9/9] Remove semver-major-days from Dependabot on GH actions --- .github/dependabot.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f4f755614..dbb544dc1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -30,4 +30,3 @@ updates: open-pull-requests-limit: 10 cooldown: default-days: 7 - semver-major-days: 14