From e564ee887a0df7eeb4eaabbc8fe3d0825fa0e8a1 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Mon, 5 Oct 2026 14:07:54 +0200 Subject: [PATCH 01/13] Fix profile editor spacing after rebase --- .../mastodon/features/account_edit/styles.module.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/account_edit/styles.module.scss b/app/javascript/mastodon/features/account_edit/styles.module.scss index c98bbc09a6..e38b01b911 100644 --- a/app/javascript/mastodon/features/account_edit/styles.module.scss +++ b/app/javascript/mastodon/features/account_edit/styles.module.scss @@ -25,7 +25,7 @@ .avatar { margin-top: -64px; - margin-left: calc(var(--space-4) - 2px); + margin-left: calc(16px - 2px); position: relative; width: 82px; @@ -251,7 +251,7 @@ // Section component .section { - padding: var(--space-6) var(--space-4); + padding: 24px 16px; border-bottom: 1px solid var(--color-border-primary); font-size: 15px; From 4697bbb7488f5bce865a4a718dad51e7bbb03e4a Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 28 Oct 2026 13:41:47 +0100 Subject: [PATCH 02/13] Update dependency `sanitize` --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 82aee8a7fd..9f06e961ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -178,7 +178,7 @@ GEM crack (1.0.1) bigdecimal rexml - crass (1.0.7) + crass (1.0.8) css_parser (3.0.0) addressable ssrf_filter (~> 1.5) @@ -808,8 +808,8 @@ GEM fugit (~> 1.1, >= 1.11.1) safety_net_attestation (0.5.0) jwt (>= 2.0, < 4.0) - sanitize (7.0.0) - crass (~> 1.0.2) + sanitize (7.0.1) + crass (~> 1.0.8) nokogiri (>= 1.16.8) scenic (1.9.0) activerecord (>= 4.0.0) From 337b2236f4197ee489da6e90b5dc2cddc32fa9c6 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 28 Oct 2026 13:42:22 +0100 Subject: [PATCH 03/13] Update dependency `css_parser` --- Gemfile.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9f06e961ec..283e2773e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -179,8 +179,9 @@ GEM bigdecimal rexml crass (1.0.8) - css_parser (3.0.0) + css_parser (3.3.0) addressable + base64 ssrf_filter (~> 1.5) csv (3.3.5) database_cleaner-active_record (2.2.2) From 42c600d2729f966044ee15eb2b002336c6a90b57 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 28 Oct 2026 13:46:45 +0100 Subject: [PATCH 04/13] Update dependency `pghero` --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 283e2773e5..b732445995 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -596,7 +596,7 @@ GEM pastel (0.8.0) tty-color (~> 0.5) pg (1.6.3) - pghero (3.8.0) + pghero (4.1.0) activerecord (>= 7.2) playwright-ruby-client (1.60.0) base64 From 20c0ce956d02fc10a6f82b211b58ed7d15f779f9 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 28 Oct 2026 13:48:40 +0100 Subject: [PATCH 05/13] Update dependency `excon` --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b732445995..3cc418c68a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -231,7 +231,7 @@ GEM erubi (1.13.1) et-orbi (1.4.0) tzinfo - excon (1.5.0) + excon (1.8.0) logger fabrication (3.0.0) faker (3.8.0) From 88683ac613dc4df1b9e02b8a11080508bc2d6756 Mon Sep 17 00:00:00 2001 From: David Roetzel Date: Wed, 7 Oct 2026 14:39:18 +0000 Subject: [PATCH 06/13] Federate local collection item revocation (#40930) --- app/services/revoke_collection_item_service.rb | 4 ++-- spec/services/revoke_collection_item_service_spec.rb | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/services/revoke_collection_item_service.rb b/app/services/revoke_collection_item_service.rb index a5222d2b62..fa314fb407 100644 --- a/app/services/revoke_collection_item_service.rb +++ b/app/services/revoke_collection_item_service.rb @@ -10,13 +10,13 @@ class RevokeCollectionItemService < BaseService @collection_item.revoke! - distribute_stamp_deletion! if @collection_item.remote? + distribute_stamp_deletion! end private def distribute_stamp_deletion! - ActivityPub::DeliveryWorker.perform_async(signed_activity_json, @account.id, @collection.account.inbox_url) + ActivityPub::DeliveryWorker.perform_async(signed_activity_json, @account.id, @collection.account.inbox_url) if @collection_item.remote? ActivityPub::CollectionRawDistributionWorker.perform_async(signed_activity_json, @collection.id) end diff --git a/spec/services/revoke_collection_item_service_spec.rb b/spec/services/revoke_collection_item_service_spec.rb index 760c9038b9..a3defcf53a 100644 --- a/spec/services/revoke_collection_item_service_spec.rb +++ b/spec/services/revoke_collection_item_service_spec.rb @@ -10,6 +10,8 @@ RSpec.describe RevokeCollectionItemService do it 'revokes the collection item and sends a Delete activity' do expect { subject.call(collection_item) } .to change { collection_item.reload.state }.from('accepted').to('revoked') + + expect(ActivityPub::CollectionRawDistributionWorker).to have_enqueued_sidekiq_job end context 'when the collection is remote' do @@ -17,7 +19,7 @@ RSpec.describe RevokeCollectionItemService do let(:collection) { Fabricate(:remote_collection, account:) } let(:collection_item) { Fabricate(:collection_item, collection:, uri: 'https://example.com') } - it 'federates a `Delete` activity' do + it 'federates a `Delete` activity to collection owner as well' do subject.call(collection_item) expect(ActivityPub::DeliveryWorker).to have_enqueued_sidekiq_job.with(instance_of(String), collection_item.account_id, 'https://example.com/actor/1/inbox') From 0e76219b38421f23a00f63b680d28839f70adf69 Mon Sep 17 00:00:00 2001 From: isidzukuri Date: Mon, 12 Oct 2026 09:20:05 +0000 Subject: [PATCH 07/13] Fix error in `dev:populate_sample_data` task (#40995) Co-authored-by: Claire --- lib/tasks/dev.rake | 2 ++ .../rake/task_devpopulate_sample_data_spec.rb | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 spec/lib/rake/task_devpopulate_sample_data_spec.rb diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index 5aefb1fd00..a8201293bb 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -17,6 +17,7 @@ namespace :dev do ).find_or_create_by!(id: 10_000_000) showcase_user.mark_email_as_confirmed! showcase_user.approve! + showcase_account.reload french_post = Status.create_with( text: 'Ceci est un sondage public écrit en Français', @@ -200,6 +201,7 @@ namespace :dev do domain: 'example.org', uri: 'https://example.org/foo/bar', url: 'https://example.org/foo/bar', + inbox_url: 'https://example.org/users/fake.example/inbox', locked: true ).find_or_create_by!(id: 10_000_001) diff --git a/spec/lib/rake/task_devpopulate_sample_data_spec.rb b/spec/lib/rake/task_devpopulate_sample_data_spec.rb new file mode 100644 index 0000000000..6ecff7bc27 --- /dev/null +++ b/spec/lib/rake/task_devpopulate_sample_data_spec.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'rake' + +RSpec.describe Rake::Task do + describe 'dev:populate_sample_data' do + subject { described_class['dev:populate_sample_data'] } + + before do + Rails.application.load_tasks + subject.reenable + end + + describe '.invoke' do + context 'when the task is invoked successfully' do + it 'runs without aborting' do + expect { subject.invoke }.to_not raise_error + end + + it 'populates accounts and users' do + expect { subject.invoke } + .to change(Account, :count).by(3) + .and change(User, :count).by(2) + end + end + end + end +end From 4a1984c20e18a97508f5f39e975ddfdf907f24ce Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 9 Oct 2026 15:13:20 +0000 Subject: [PATCH 08/13] Extract `visibility_scope` method to re-use existing scopes in `AccountStatusesFilter` (#40316) --- app/lib/account_statuses_filter.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/lib/account_statuses_filter.rb b/app/lib/account_statuses_filter.rb index 5fa9a2ca41..f5c82df8ed 100644 --- a/app/lib/account_statuses_filter.rb +++ b/app/lib/account_statuses_filter.rb @@ -49,10 +49,10 @@ class AccountStatusesFilter scope = account.statuses if exclude_direct? - scope = scope.where(visibility: follower? ? %i(public unlisted private) : %i(public unlisted)) + scope = visibility_scope(scope) else scope = account.statuses.left_outer_joins(:mentions) - scope.merge!(scope.where(visibility: follower? ? %i(public unlisted private) : %i(public unlisted)).or(scope.where(mentions: { account_id: current_account.id })).group(Status.arel_table[:id])) + scope.merge!(visibility_scope(scope).or(scope.where(mentions: { account_id: current_account.id })).group(Status.arel_table[:id])) end scope.merge!(filtered_reblogs_scope) if reblogs_may_occur? @@ -60,6 +60,14 @@ class AccountStatusesFilter scope end + def visibility_scope(scope) + if follower? + scope.list_eligible_visibility + else + scope.distributable_visibility + end + end + def filtered_reblogs_scope scope = Status.left_outer_joins(reblog: :account) scope From 3b74e98bcd0738bc2018e2e86a322efb7382d942 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 13 Oct 2026 09:38:42 +0000 Subject: [PATCH 09/13] Fix account timeline with `exclude_direct` also excluding followers-only posts for non-followed users (#41019) --- app/lib/account_statuses_filter.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/lib/account_statuses_filter.rb b/app/lib/account_statuses_filter.rb index f5c82df8ed..ae687dee6f 100644 --- a/app/lib/account_statuses_filter.rb +++ b/app/lib/account_statuses_filter.rb @@ -48,8 +48,11 @@ class AccountStatusesFilter def filtered_scope scope = account.statuses - if exclude_direct? - scope = visibility_scope(scope) + if exclude_direct? && follower? + scope = scope.list_eligible_visibility + elsif exclude_direct? + scope = account.statuses.left_outer_joins(:mentions) + scope.merge!(scope.distributable_visibility.or(scope.where(visibility: :private).where(mentions: { account_id: current_account.id })).group(Status.arel_table[:id])) else scope = account.statuses.left_outer_joins(:mentions) scope.merge!(visibility_scope(scope).or(scope.where(mentions: { account_id: current_account.id })).group(Status.arel_table[:id])) From 005fb389b6005444f89393136fb5ab36ef08d4d2 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 14 Oct 2026 07:11:35 +0000 Subject: [PATCH 10/13] Avoid double constant warning from dev rake spec (#41051) --- spec/lib/rake/task_devpopulate_sample_data_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/rake/task_devpopulate_sample_data_spec.rb b/spec/lib/rake/task_devpopulate_sample_data_spec.rb index 6ecff7bc27..bda22798ee 100644 --- a/spec/lib/rake/task_devpopulate_sample_data_spec.rb +++ b/spec/lib/rake/task_devpopulate_sample_data_spec.rb @@ -8,7 +8,7 @@ RSpec.describe Rake::Task do subject { described_class['dev:populate_sample_data'] } before do - Rails.application.load_tasks + Rails.application.load_tasks unless described_class.tasks.any? subject.reenable end From 43f10922179365dd3882b693bc441a3efa38385a Mon Sep 17 00:00:00 2001 From: isidzukuri <5416083+isidzukuri@users.noreply.github.com> Date: Thu, 15 Oct 2026 09:20:13 +0000 Subject: [PATCH 11/13] Reduce number of queries to DB from StatusCacheHydrator (#41079) Co-authored-by: Claire --- app/lib/status_cache_hydrator.rb | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/app/lib/status_cache_hydrator.rb b/app/lib/status_cache_hydrator.rb index c2cfc9243b..d26751442d 100644 --- a/app/lib/status_cache_hydrator.rb +++ b/app/lib/status_cache_hydrator.rb @@ -53,11 +53,26 @@ class StatusCacheHydrator end def fill_status_payload(payload, status, account, nested: false, fresh: true) - payload[:favourited] = Favourite.exists?(account_id: account.id, status_id: status.id) - payload[:reblogged] = Status.exists?(account_id: account.id, reblog_of_id: status.id) - payload[:muted] = ConversationMute.exists?(account_id: account.id, conversation_id: status.conversation_id) - payload[:bookmarked] = Bookmark.exists?(account_id: account.id, status_id: status.id) - payload[:pinned] = StatusPin.exists?(account_id: account.id, status_id: status.id) if status.account_id == account.id + queries = [ + Favourite.where(account_id: account.id, status_id: status.id).arel.exists.as('favourited'), + Status.where(account_id: account.id, reblog_of_id: status.id).arel.exists.as('reblogged'), + ConversationMute.where(account_id: account.id, conversation_id: status.conversation_id).arel.exists.as('muted'), + Bookmark.where(account_id: account.id, status_id: status.id).arel.exists.as('bookmarked'), + ] + + if status.account_id == account.id + queries.push( + StatusPin.where(account_id: account.id, status_id: status.id).arel.exists.as('pinned') + ) + end + + flags = Status.connection.select_one(Arel::SelectManager.new.project(queries)) + + payload[:favourited] = flags['favourited'] + payload[:reblogged] = flags['reblogged'] + payload[:muted] = flags['muted'] + payload[:bookmarked] = flags['bookmarked'] + payload[:pinned] = flags['pinned'] if status.account_id == account.id payload[:filtered] = mapped_applied_custom_filter(account, status) payload[:quote_approval][:current_user] = status.quote_policy_for_account(account) if payload[:quote_approval] payload[:quote] = hydrate_quote_payload(payload[:quote], status.quote, account, nested:) if payload[:quote] From f38ea42abfa6bba26a86d9d2f5d339a44c88ba60 Mon Sep 17 00:00:00 2001 From: Hugo Gameiro Date: Mon, 19 Oct 2026 08:20:46 +0000 Subject: [PATCH 12/13] Fix slow hashtag timelines with any[] when using min_id (#41132) --- app/models/tag_feed.rb | 9 +++++++++ spec/models/tag_feed_spec.rb | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/app/models/tag_feed.rb b/app/models/tag_feed.rb index 171fe5e158..290dbd5022 100644 --- a/app/models/tag_feed.rb +++ b/app/models/tag_feed.rb @@ -30,6 +30,7 @@ class TagFeed < PublicFeed scope.merge!(tagged_with_any_scope) scope.merge!(tagged_with_all_scope) scope.merge!(tagged_with_none_scope) + scope.merge!(tagged_with_cursor_scope(max_id, since_id, min_id)) scope.merge!(local_only_scope) if local_only? scope.merge!(remote_only_scope) if remote_only? scope.merge!(account_filters_scope) if account? @@ -60,6 +61,14 @@ class TagFeed < PublicFeed Status.group(:id).tagged_with_none(tags_for(options[:none])) end + def tagged_with_cursor_scope(max_id, since_id, min_id) + lower_id = min_id.presence || since_id.presence + scope = Status.all + scope = scope.where(statuses_tags: { status_id: ...max_id }) if max_id.present? + scope = scope.where('statuses_tags.status_id > ?', lower_id) if lower_id.present? + scope + end + def tags_for(names) Tag.matching_name(Array(names).take(LIMIT_PER_MODE)).pluck(:id) if names.present? end diff --git a/spec/models/tag_feed_spec.rb b/spec/models/tag_feed_spec.rb index 8618b67334..b9cf07c01f 100644 --- a/spec/models/tag_feed_spec.rb +++ b/spec/models/tag_feed_spec.rb @@ -67,6 +67,21 @@ RSpec.describe TagFeed do expect(results).to include(status) end + it 'paginates with max_id' do + results = described_class.new(tag_cats, nil, any: [tag_dogs.name]).get(20, both.id) + expect(results).to contain_exactly(status_tagged_with_cats, status_tagged_with_dogs) + end + + it 'paginates with since_id' do + results = described_class.new(tag_cats, nil, any: [tag_dogs.name]).get(20, nil, status_tagged_with_cats.id) + expect(results).to contain_exactly(status_tagged_with_dogs, both) + end + + it 'paginates with min_id' do + results = described_class.new(tag_cats, nil, any: [tag_dogs.name]).get(20, nil, nil, status_tagged_with_cats.id) + expect(results).to contain_exactly(status_tagged_with_dogs, both) + end + context 'when both local_topic_feed_access and remote_topic_feed_access are disabled' do before do Setting.local_topic_feed_access = 'disabled' From d2ea2974a1f1ffb0a690d62965c5b25dcdce18a0 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 28 Oct 2026 17:55:03 +0100 Subject: [PATCH 13/13] Bump ruby version --- .github/actions/setup-ruby/action.yml | 2 +- .github/workflows/bundler-audit.yml | 2 +- .github/workflows/lint-haml.yml | 2 +- .github/workflows/lint-ruby.yml | 2 +- .ruby-version | 2 +- Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup-ruby/action.yml b/.github/actions/setup-ruby/action.yml index 8dcdafb7d9..cf487f3093 100644 --- a/.github/actions/setup-ruby/action.yml +++ b/.github/actions/setup-ruby/action.yml @@ -24,7 +24,7 @@ runs: ${{ inputs.additional-system-dependencies }} - name: Set up Ruby - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1 + uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0 with: ruby-version: ${{ inputs.ruby-version }} bundler-cache: true diff --git a/.github/workflows/bundler-audit.yml b/.github/workflows/bundler-audit.yml index e28552f40a..e94aaa1b73 100644 --- a/.github/workflows/bundler-audit.yml +++ b/.github/workflows/bundler-audit.yml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Ruby - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1 + uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0 with: bundler-cache: true diff --git a/.github/workflows/lint-haml.yml b/.github/workflows/lint-haml.yml index d212a280bf..a3dba81176 100644 --- a/.github/workflows/lint-haml.yml +++ b/.github/workflows/lint-haml.yml @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Ruby - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1 + uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0 with: bundler-cache: true diff --git a/.github/workflows/lint-ruby.yml b/.github/workflows/lint-ruby.yml index a308149d61..9d88cb964d 100644 --- a/.github/workflows/lint-ruby.yml +++ b/.github/workflows/lint-ruby.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Ruby - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1 + uses: ruby/setup-ruby@7f797815d8adceb1c412e7abefdd1ab4abc47a5f # v1.335.0 with: bundler-cache: true diff --git a/.ruby-version b/.ruby-version index 7636e75650..7919852fe1 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -4.0.5 +4.0.9 diff --git a/Dockerfile b/Dockerfile index d850abb5ad..7b929ad983 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ ARG BASE_REGISTRY="docker.io" # Ruby image to use for base image, change with [--build-arg RUBY_VERSION="4.0.x"] # renovate: datasource=docker depName=docker.io/ruby -ARG RUBY_VERSION="4.0.5" +ARG RUBY_VERSION="4.0.9" # # Node.js version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="22"] # renovate: datasource=node-version depName=node ARG NODE_MAJOR_VERSION="24"