Commit Graph
61349 Commits
Author SHA1 Message Date
Kelv ac554f1f60 DEV: add ical format response for discourse-post-events index route (#35143)
Reverts the removal of this from
https://github.com/discourse/discourse-calendar/pull/231. This opens up
the relative url `/discourse-post-event/events.ics` for access to an
ical formatted response.

We also make available the `order` argument for this endpoint which
defaults to ascending order if there is no value or invalid value
passed. This maintains existing behaviour while allowing for users to
specify that they want most recent events first.
2025-10-07 10:19:34 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 87c528a15b Build(deps): Bump pp from 0.6.2 to 0.6.3 (#35222)
Bumps [pp](https://github.com/ruby/pp) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/ruby/pp/releases)
- [Commits](https://github.com/ruby/pp/compare/v0.6.2...v0.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 10:09:39 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 8508d5afcd Build(deps): Bump openssl from 3.3.0 to 3.3.1 (#35223)
Bumps [openssl](https://github.com/ruby/openssl) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/ruby/openssl/releases)
- [Changelog](https://github.com/ruby/openssl/blob/master/History.md)
- [Commits](https://github.com/ruby/openssl/compare/v3.3.0...v3.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 10:09:25 +08:00
Roman Rizzi 0e512ec08b DEV: Revert PG Vector 0.8.0 upgrade (#35220) 2025-10-06 17:27:50 -03:00
Roman Rizzi b51b35b5e8 DEV: Update PG Vector to 0.8.0 (#35156) 2025-10-06 16:28:30 -03:00
Régis Hanol c3efcc99e3 FIX: wildcard watched word and regexps (#35217)
If you have a watched word with a wildcard and then enable the "watched
words regexp" site setting, you might end up in a situation where you
can't post anymore because of the invalid regexp.

This ensures we correctly skip invalid regexps.

Ref - https://meta.discourse.org/t/-/382417
2025-10-06 20:49:02 +02:00
Roman Rizzi 908ba6dc95 FIX: Skip triage on edits when unhandled flags exist (#35218)
When a post is edited, avoid re-flagging it if there’s already a flag
pending in the review queue. This prevents duplicate triage runs and
reduces unnecessary processing.
2025-10-06 15:08:12 -03:00
Jarek Radosz c02de976fc DEV: Clean up d-cakeday code after the move (#35213) 2025-10-06 19:42:22 +02:00
Kris aa4685da80 REFACTOR: merge mobile and desktop login CSS into common (#34793)
This eliminates mobile/login-signup-page.scss and
desktop/login-signup-page.scss in favor of breakpoints in
common/base/login-signup-page.scss

There are a few large blocks within breakpoints that didn't have a
suitable place to merge into the existing common styles, so this file
can use some more cleanup... but this gets everything centralized to
start, and shouldn't result in any major visual changes.

Tested on desktop/ipad/mobile.
2025-10-06 13:14:38 -04:00
Natalie Tay 8a468904af FIX: Spec ambiguity when selecting category dropdowns (#35215)
https://github.com/discourse/discourse/pull/35211 introduced some specs
that require selecting parent category dropdown, but there are two
dropdowns and spec is confoosed.
2025-10-07 00:45:09 +08:00
Natalie Tay 8841ce71c1 FIX: Navigating via topic filters should not untranslate a category name (#35211)
There's a bug now that translated category names get replaced. This
applies to logged in users on sites where
`SiteSetting.content_localization_enabled` and
`SiteSetting.lazy_load_categories_groups` are enabled for the user.

The fix here has been checked for N+1s, and it was covered before in
https://github.com/discourse/discourse/pull/34212/files#diff-a064afa7c610321917d3edfd0a462197d7cb3b76191552dfb770f3b9fb11db18.
2025-10-06 23:31:06 +08:00
ducks 6971fffa32 FIX: crash in Admin::PluginsController when plugin has nil commit URL path (#35186)
The `discourse_owned?` method in `lib/plugin/instance.rb` was calling
`.split` on `parsed_commit_url.path` without checking if the path could
be nil. This caused a 500 error on `/admin/plugins` when any plugin had
a commit URL that parsed successfully but returned a nil path (e.g.,
plugins without a git remote configured).

Added a nil check for `parsed_commit_url.path` to gracefully handle this
edge case and prevent the crash. Also added a test case to verify the
method returns false when the parsed URL has a nil path.
2025-10-06 14:39:23 +00:00
Gerhard Schlager a3283d3b8e DEV: Add priority handling and error management in TopologicalSorter (#35191) 2025-10-06 16:29:52 +02:00
Gerhard Schlager f96e47106b DEV: Set Regex timeout for migrations (#35190) 2025-10-06 16:29:34 +02:00
Jarek RadoszandLoïc Guitaut 71834c898f DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073)
Co-authored-by: Loïc Guitaut <loic@discourse.org>
2025-10-06 16:11:01 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 9a0a99b77d Build(deps): Bump @rollup/browser from 4.52.3 to 4.52.4 (#35194)
Bumps [@rollup/browser](https://github.com/rollup/rollup) from 4.52.3 to
4.52.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.52.3...v4.52.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 15:29:29 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> d466f8943f Build(deps): Bump rdoc from 6.14.2 to 6.15.0 (#35193)
Bumps [rdoc](https://github.com/ruby/rdoc) from 6.14.2 to 6.15.0.
- [Release notes](https://github.com/ruby/rdoc/releases)
- [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rdoc/compare/v6.14.2...v6.15.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 15:29:01 +02:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Discourse CI
9b680d8d46 Build(deps): Bump ember-auto-import from 2.10.1 to 2.11.0 (#35195)
Bumps
[ember-auto-import](https://github.com/embroider-build/ember-auto-import/tree/HEAD/packages/ember-auto-import)
from 2.10.1 to 2.11.0.
- [Release
notes](https://github.com/embroider-build/ember-auto-import/releases)
-
[Changelog](https://github.com/embroider-build/ember-auto-import/blob/main/packages/ember-auto-import/CHANGELOG.md)
-
[Commits](https://github.com/embroider-build/ember-auto-import/commits/HEAD/packages/ember-auto-import)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-10-06 14:33:48 +02:00
Natalie Tay 273c21997a DEV: Move locale check to unified concern (#35207)
Moves the `in_user_locale?` check to the localizable which can be used
by any localized model.

/t/163217, related https://github.com/discourse/discourse/pull/35152
2025-10-06 20:11:52 +08:00
Arpit Jalan 390eaf532e FEATURE: add plugin_modifier to include AI summary in topic view serializer (#35110) 2025-10-06 17:24:01 +05:30
David Taylor 8c2d5f9a35 DEV: Drop plugin-api version handling (#35181)
The version parameter of the JS plugin-api has never really been used
properly. These days, themes and plugins use the
`.discourse-compatibility` system for defining compatibility with core,
and we made the plugin-api version argument optional in
acad83199e.

This commit removes the internal infrastructure which supported the
versioning system. There is no change to the API. Any passed version
numbers will be ignored.
2025-10-06 10:52:47 +01:00
Discourse Translator Bot f5fa4803e4 Update translations (#35208) 2025-10-06 11:26:37 +02:00
Osama Sayegh 7d2256c455 FEATURE: Split setting for allowing mods to manage categories and groups (#35174)
This commit splits the `moderators_manage_categories_and_groups` setting
into 2 separate settings to allow for more precise control over
categories and groups management by moderators.

Internal topic: t/141392.
2025-10-06 10:43:42 +03:00
Alan Guo Xiang Tan 45e80ce6cc DEV: Fix a flaky system test (#35206)
Follow-up to 0bc18fdf78

The `before` hooks were arragned in such a way that we were visiting the
admin user page first before the site setting was updated.
2025-10-06 15:16:25 +08:00
Natalie Tay 58bdb35fab DEV: Add translation specs for navigating across categories (#35152)
These specs are to ensure category names remain translated when
navigating around.

In a future PR there will be a fix for logged in users, where category
names get overridden in the local store due to async requests updating
the category names in store.

1 of 2.

/t/163217
2025-10-06 14:24:12 +08:00
Ted Johansson 3e310cde6e FIX: Ensure a reviewable is created when directly taking action on user (#35198)
In a previous refactor we lost the functionality that creates a reviewable when a moderator immediately takes action on a post and chooses to either silence or suspend a user.
2025-10-06 14:14:44 +08:00
Osama Sayegh a7fb9e1897 FEATURE: Allow editing theme-owned palettes (#34722)
This commit allows editing colors of palettes that are installed with
themes. Prior to this commit, editing colors of theme-owned palettes wasn't
allowed because a theme update could override the edits made by admins
and there was no way to revert edits to the original values. With this
commit, all of that is solved by copying the palette when it's first edited
by an admin, and making future updates to the theme update the original
copy only with the ability for admins to revert to the colors in the
original copy at any time.

Internal topic: t/162130.
2025-10-06 09:02:39 +03:00
small-lovely-cat 43d6193680 FIX: align text display behaviour for user-menu-billing with other buttons (#35200)
This PR is aimed at fixing a visual
mismatch in buttons at user-menu. More context in https://meta.discourse.org/t/minor-ui-mismatches-in-user-menu-billing-button/384751.
2025-10-06 13:32:45 +08:00
David Battersby 0c0296db69 DEV: remove category badge recursive (#35175)
Cleanup task to remove the recursive option from the category link
helper.

This was mostly replaced with the additional of the `ancestors` option
in #26638, this PR removes the last instance of where it was used and
removes it from the helper.
2025-10-06 09:31:33 +04:00
Alan Guo Xiang Tan ac2199c7ec DEV: Fix DMultiSelect component creating one promise per input event (#35142)
Before this change, every update to the `searchTerm` tracked property would create a new promise in the `data` function. The issue was that once the debounce delay completed, only the most recent promise would be handled, leaving the other promises in a limbo state. This is problematic because we pass these promises to TrackedAsyncData, which registers a test waiter in the test environment. If promises are never settled, the test waiters will never complete, causing tests to hang indefinitely.
2025-10-06 13:04:47 +08:00
Ted Johansson 3ec699a156 DEV: Hide overly technical image compression settings (#35197)
In our efforts to increase the signal-to-noise ratio and discoverability of site settings, we're hiding overly technical settings that few users override.
2025-10-06 13:04:31 +08:00
Martin Brennan 5faaa6f869 FEATURE: Bump wiki topics when OP is edited (#35137)
c.f. https://github.com/discourse/discourse/pull/34945

This commit updates `PostRevisor` to bump a topic if the
edited post is a wiki post and it is also the first post in
the topic (OP).

In this case, people want to know about a
change to the OP, because it may need to be reviewed (in the case of a
wiki) or it should be “promoted” so that others can see what’s changed
(in the case of general documentation).

A related change in this commit is to add a `should_bump_topic`
plugin modifier, so plugins like Discourse Doc Categories
(see https://meta.discourse.org/t/discourse-doc-categories/322376)
can enforce bumping in certain cases.
2025-10-06 12:46:28 +10:00
chapoi 5012d213e0 UX: remove subtitle from 404 page (#35185)
Removing the subtitle until we can make a better distinction between
"page not found" and "no access" 404 pages.
2025-10-04 10:34:50 -06:00
chapoi 2f9109f4b9 UX: update the copy in settings for the mobile logo (#35184)
The settings text doesn't reflect reality, as wide rectangular logo isn't a requirement. A square one works just as well, and is recommended to optimise header space.
2025-10-03 14:35:45 -06:00
Penar Musaraj ec23b73153 DEV: Bypass video thumbnail generation if events don't fire (#35182)
In the current version of DiscourseHub on iOS 26, video uploads are stalling.

This is because the video thumbnail generation code relies on video events and it looks like iOS 26 webviews are not firing those events.

This may require a fix in DiscourseHub, but in the meantime, we need to tighten the logic in thumbnail generation here.
2025-10-03 14:13:47 -04:00
Jarek Radosz 3729361c32 DEV: Move discourse-cakeday to core (#35172)
https://meta.discourse.org/t/373574

Internal `/t/-/159301`
2025-10-03 18:38:51 +02:00
Gerhard Schlager 58558849ac DEV: Add options to run only or skip some steps in converter and importer (#35127)
Examples:

* Run only the "badges" and "users" steps in the converter:
  ```
  migrations/bin/cli convert discourse --reset --only=badges,users
  ```

* Run all steps except "users" in the converter:
  ```
  migrations/bin/cli convert discourse --reset --skip=users
  ```

* Run only the "badges" step in importer:
   This also runs all steps that "badges" depends on (e.g. "users" and "uploads").
  ```
  migrations/bin/cli import --reset --only=badges
  ```

* Run only the "badges" step in importer and skip the "users" on which "badges" depends:
  ```
  migrations/bin/cli import --reset --only=badges --skip=users
  ```
2025-10-03 16:44:36 +02:00
Joffrey JAFFEUX ce7caaa0bc DEV: force chrome headless in dev container (#35179)
This will ensure tools like cursor can use our playwright’s chrome
executable and start it in --headless mode.
2025-10-03 16:44:14 +02:00
Discourse Translator Bot 5d239c5608 Update translations (#35139) 2025-10-03 15:55:36 +02:00
David Taylor e0dc8fefbb DEV: Improvements to DiscourseConnect spec helpers (#35173)
- Rename SSO -> DiscourseConnect. SSO is the general term for all
external login methods. DiscourseConnect is the name for this protocol
- Allocate different IP for each parallel spec environment, so they
don't clash. This will resolve some flaky specs we're seeing
- Only bind to localhost. No need to make this available from other
machines
2025-10-03 14:53:56 +01:00
chapoi 68d4113a75 FIX: double declarative button class names (#35177)
Buttons can only have 1 declarative class, not a combination. 

| BC | AC |
|--------|--------|
| <img width="666" height="1214" alt="CleanShot 2025-10-03 at 07 24
22@2x"
src="https://github.com/user-attachments/assets/448e4193-13a9-483c-80f7-6acc86e253d0"
/> | <img width="666" height="1214" alt="CleanShot 2025-10-03 at 07 23
56@2x"
src="https://github.com/user-attachments/assets/45c3abe5-a59f-4cf5-ad5e-19efb4721023"
/> |
2025-10-03 07:48:24 -06:00
David Taylor 564f82b84f DEV: Fix pause_test devtools URLs when running in container (#35171)
The `uri` variable was replaced when we moved from selenium to
playwright, so this was raising an error
2025-10-03 13:56:22 +01:00
David Taylor 04ed87792f DEV: Bump devcontainer image (#35168) 2025-10-03 14:04:32 +02:00
David Battersby 875a56921f FIX: pass ancestor data to category badge helper (#35169)
The badge in `CategoryChooser` is incorrectly showing the child category
badge when displaying both parent and child as the selected option. This
was already fixed for cases where the `ancestors` option is passed to
`categoryBadgeHTML` in the category link helper.

Updating the option within CategoryChooser fixes this issue, but I have
also added a fallback fix for any other components that still use the
recursive option.

_Note: as part of #26638 the preferred approach was to pass `ancestors:
category.predecessors` in place of `recursive: true`. That way reducing
multiple calls to `Category.findById` at the component level when
looping through category parents. We may want to completely remove the
recursive option in the future but leaving it be for now._

### Before

The category emojis are working correctly on the top header:

<img width="448" height="68" alt="Screenshot 2025-10-03 at 2 44 02 PM"
src="https://github.com/user-attachments/assets/f929cebf-3523-40cd-ac44-4c8d240793d5"
/>

The category chooser is showing the incorrect emoji for the parent
category when editing the topic:

<img width="430" height="159" alt="Screenshot 2025-10-03 at 2 43 55 PM"
src="https://github.com/user-attachments/assets/a7ed5cff-db10-4899-8096-45bd2b882eea"
/>

### After

<img width="451" height="153" alt="Screenshot 2025-10-03 at 2 43 02 PM"
src="https://github.com/user-attachments/assets/6033c164-3451-4526-8ff0-29819f8ae3d7"
/>
2025-10-03 15:43:34 +04:00
Jarek RadoszandLoïc Guitaut a54e3208cb DEV: Hand-pick Rails/WhereNot autofixes (#35117)
We can't enable `Rails/WhereNot` lint/autofix, because it would break
code that uses mini_sql instead of AR (which rubocop, and tbh also we,
can't easily differentiate)

Those are safe because they either:
* are executed in AR model scope definitions
* are clearly chained starting from a AR model
* are less-clearly chained, but still can be traced to a AR model/scope

---------

Co-authored-by: Loïc Guitaut <loic@discourse.org>
2025-10-03 13:29:22 +02:00
David Taylor e5ca38d2be DEV: Add ruby-lsp to development gems (#35170)
This significantly simplifies and speeds up using the ruby LSP in
development, since a separate 'composed bundle' is no longer needed.
2025-10-03 13:17:01 +02:00
Osama SayeghandAlan Guo Xiang Tan 0bc18fdf78 FEATURE: Add site setting to prevent mods from changing trust levels (#35160)
This commit adds a new setting `moderators_change_trust_levels` to
control whether moderators are allowed to change trust level of users.
Moderators are currently allowed to change trust levels, so this new
setting is enabled by default to avoid sudden changes in behavior for
existing sites.

When the setting is disabled and moderators are not allowed to change
trust levels, they see the trust levels dropdown disabled.

Internal topic: t/141392.

---------

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-10-03 13:19:24 +03:00
Juan David Martínez Cubillos b880921acf DEV: Ignore Posts with out topics when reordering posts based on their creation date (#35122)
**Description**
Add an option to ignore orphaned posts since these can cause errors when
running the task like:

```
ERROR:
duplicate key value violates unique
PG:: UniqueViolation:
DETAIL: Key (topic_i, post_number, user_id)=(212064, 1, 33887) already exists.

```
2025-10-03 11:58:24 +02:00
Loïc Guitaut a9c988a606 DEV: Serialize cookies using MessagePack (#35082)
This PR uses MessagePack instead of JSON for serializing our cookies.

MessagePack is almost as fast as Marshal but without the security
issues. It’s also able to serialize more objects than JSON (like Time,
Symbol, etc.). As it’s a binary format, it takes less space than JSON,
sometimes half less. Finally, MessagePack isn’t Ruby-specific and
implementations exist in every existing language.

Regarding the cookies Discourse is using, we can see a small improvement
on the `_forum_session` one when it’s almost empty (around 2%), but the
more things are put into it, the more we’ll see savings. For the `_t`
cookie, we’re saving around 20% for free.
2025-10-03 11:40:49 +02:00
David Taylor 00375be665 PERF: Re-use topic-footer-button elements when rerendering (#35167)
As well as improving perf, this should resolve some flaky specs we're
seeing

Followup to 4d03447450
2025-10-03 10:28:32 +01:00