Commit Graph
61608 Commits
Author SHA1 Message Date
Blake Erickson 1a705ab862 DEV: Have converted videos use the cdn url (#35480)
Once a video is converted have it use the cdn url instead of the direct
url.
2025-10-21 12:44:11 -06:00
Blake Erickson 737c4ea194 DEV: Update tag_groups api doc schema (#35520)
This just updates the api docs to use the new json schema format for the
json response of the GET tag_groups.json endpoint.
2025-10-21 12:43:41 -06:00
Sérgio Saquetim a138e25333 DEV: Disable widgets by default (#35504)
This commit represents the last phase before removing the old widget 
rendering system from the codebase.

It switches the Glimmer Post Stream to enabled and disables any other
widget rendering by default, but the settings still allow sites that
were not ready to enable them temporarily.

The final removal is expected in about one month.

See the following meta topics for more information:

- https://meta.discourse.org/t/upcoming-eol-for-the-widget-rendering-system/375332
- https://meta.discourse.org/t/upcoming-post-stream-changes-how-to-prepare-themes-and-plugins/372063
2025-10-21 15:18:34 -03:00
David Taylor 7d794f45b6 DEV: Move 'unknown OID' embeddings fix into core (#35519)
Having it in d-ai's plugin.rb file solves it when running plugin tests.
But when running core tests, plugins are not loaded, but the tables
still exist in the database.

Followup to 6247fdc255
2025-10-21 15:23:24 +01:00
Renato Atilio 6710390585 FIX: [rich editor] convert newlines to hard breaks when parsed from HTML (#35518)
Updates `prosemirror-model` to use this fix: [When preserving
whitespace, replace newlines with line break replacements

](https://github.com/ProseMirror/prosemirror-model/commit/79e9f2b9497ec3aac70d180aa846267dafa48d9a)

Adds `linebreakReplacement: true` to our hard break node spec
definition.

Adds a system test to confirm a `white-space: pre` HTML pasted from the
clipboard parses new lines as hard breaks.
2025-10-21 11:19:21 -03:00
Juan David Martínez Cubillos fe262687ed DEV: Unify image handling modes in ExcerptParser (#35417)
**Description**

Replaces separate @strip_images and @markdown_images boolean flags with
a single @image_mode variable that can be :strip, :markdown, or nil.
Keeping the interface but ensuring only one
2025-10-21 15:11:11 +02:00
Tomas Vavrda f51960287f FEATURE: Add Czech default quotation marks (#34797)
cf. https://meta.discourse.org/t/european-typography-rules/382506
2025-10-21 09:55:36 +02:00
Justin Moore 9125f85e69 FIX: Add Azure communication service endpoint to SMTP authentication override (#33226)
Per [this
topic](https://meta.discourse.org/t/struggling-to-configure-smtp-in-discourse-with-azure-communication-service/290511), Azure communication service requires the `login` authentication method
on their SMTP service.
2025-10-21 09:39:25 +02:00
Krzysztof Kotlarek 6e39bb9728 FIX: Persist reviewable notes when toggle tabs (#35495)
When adding a note through the timeline tab, the note wasn't being
persisted to the reviewable's reviewable_notes array. This caused the
note to disappear when switching between tabs.
2025-10-21 10:23:41 +08:00
Krzysztof Kotlarek 760674cad3 DEV: Add discourse-dev seed for post voting reviewable (#35435)
Add DiscourseDev::ReviewablePostVotingPostVotingComment to generate a
post voting comment reviewable.
2025-10-21 09:57:05 +08:00
Alan Guo Xiang Tan 2baabe5ce6 FIX: Ensure chat service has loaded channel before rendering channel (#35433)
This is a follow up to cf4193e6e1.

When chat is being initialized, we initiate an async request to
`/chat/api/me/channels` via `this.chat.loadChannels` but do not await on the request to be completed.
This is fine when a user is not visiting a chat channel route directly.

However, not awaiting on `this.chat.loadChannels` can cause problems
like a user's thread list or drafts to not be displayed if the
`/chat/api/me/channels` request does not return before rendering
happens. To resolve this, we will now wait for the promise in
`this.chat.loadChannels` to resolve before allowing rendering to happen on the `ChatChannelRoute`.
2025-10-21 09:20:48 +08:00
Gary Pendergast d8e7741d96 DEV: Send a 204 response when updating site settings. (#35349)
When a `PUT`, `POST`, or `DELETE` operation doesn't need to return any
data, we've historically either returned nothing, or `{ success: "OK"
}`.

A more consistent way to return the same data would be with a 204 status
response. This gives the same information as the `{ success: "OK" }`
body (ie, that the operation successfully completed), without needing to
read or parse the response body.

This change adds a 204 response for `Admin::SiteSettingsController`.
Additional controllers could be migrated in follow-up PRs, or on an
ad-hoc basis.
2025-10-21 11:43:10 +11:00
Renato Atilio dd201fd999 DEV: remove duplicate code mark input rule (#35505) 2025-10-20 21:35:22 -03:00
Gary PendergastandKrzysztof Kotlarek 23e7542f60 DEV: Improve the helper methods for defining reviewable actions (#35406)
This change adds a new `ReviewableActionBuilder#build_bundle` helper for
quickly defining action bundles that can be performed on reviewables.
`ReviewableActionBuilder#build_action` has also been updated to allow
plugin-defined actions to appear correctly.

The core reviewable types have been updated to use this new method, and
I've also added support for reviewable chat messages, to demonstrate
plugin support.

Co-authored-by: Krzysztof Kotlarek <kotlarek.krzysztof@gmail.com>
2025-10-21 11:13:13 +11:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 7b588feebd Build(deps): Bump mini_racer from 0.19.0 to 0.19.1 (#35509)
Bumps [mini_racer](https://github.com/discourse/mini_racer) from 0.19.0
to 0.19.1.
- [Changelog](https://github.com/rubyjs/mini_racer/blob/main/CHANGELOG)
-
[Commits](https://github.com/discourse/mini_racer/compare/v0.19.0...v0.19.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 00:31:02 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 5bcb03180b Build(deps-dev): Bump annotaterb from 4.19.0 to 4.20.0 (#35510)
Bumps [annotaterb](https://github.com/drwl/annotaterb) from 4.19.0 to
4.20.0.
- [Changelog](https://github.com/drwl/annotaterb/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/drwl/annotaterb/compare/v4.19.0...v4.20.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 00:29:40 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> d515851928 Build(deps): Bump rrule from 0.6.0 to 0.7.0 (#35508)
Bumps [rrule](https://github.com/square/ruby-rrule) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/square/ruby-rrule/releases)
-
[Changelog](https://github.com/square/ruby-rrule/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/square/ruby-rrule/compare/v0.6.0...v0.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 00:29:07 +02:00
Joffrey JAFFEUX c2e4cb30af DEV: fix failing specs (#35507)
Since the new modifier has been added, some specs were not using using
the focus check on the composer (included in `fill_composer` method) and
we were actually not focused which was causing these specs to fail.
2025-10-20 23:39:20 +02:00
Joffrey JAFFEUX 33ca54d306 FIX: adds timeout to prevent-scroll-on-focus modifier (#35503)
The `{{prevent-scroll-on-focus}}` modifier is a workaround for a bug in
iOS where safari won't follow `preventScroll: true` and will actually
scroll. I thought that not having the timeout would be good enough, but
we actually need this delay to ensure we are past the moment where
safari will start respecting `preventScroll: true`.
2025-10-20 19:15:23 +02:00
David Taylor 883ec80a77 DEV: Replace node globSync with find (#35501)
`globSync` isn't available in earlier versions of node 22.

Followup to 0fcd2f12dc
2025-10-20 15:34:48 +01:00
David Taylor 1d33e72389 DEV: Use native promise for lib/ajax (#35483)
The `RSVP.Promise` polyfill has some subtle differences to native
promises. In this case, we ran into a problem where calling `reject()`
inside JQuery's `error` handler would throw an exception, and then stop
JQuery's own error cleanup from running. That caused subtle problems,
like the global `ajaxError` event failing to fire.

Switching from `RSVP.Promise` to `Promise` normally introducing subtle
timing changes. However, I think in this case we are insulated from that
because we're already calling resolve/reject via `@ember/runloop`'s
`run()` function. 🤞
2025-10-20 14:43:26 +01:00
David Taylor 585ba17f56 DEV: Rename theme-transpiler to asset-processor (#35498)
This is already used for more than just themes, and we plan to extend
its usage even further
2025-10-20 14:16:46 +01:00
chapoiandawesomerobot 33e79f6272 UX: Move AI bot PM to navigation menu (#35189)
The header space is becoming very crowded with translations, chat, and
AI bot all enabled.
This commit makes the new default for AI conversations a link in the
community section in the sidebar instead of a header button.


<img width="1412" height="246" alt="CleanShot 2025-10-04 at 15 44 05@2x"
src="https://github.com/user-attachments/assets/45c48607-bbaa-4993-9e92-bb8db2d7f45a"
/>
<img width="478" height="650" alt="CleanShot 2025-10-04 at 15 44 32@2x"
src="https://github.com/user-attachments/assets/67af3afa-6a46-4c79-8aa9-fc789a086056"
/>

There is also a new back-to-forum button added in, conform with other
custom-sidebar pages such as /admin and /docs.
<img width="1966" height="1004" alt="CleanShot 2025-10-04 at 15 45
04@2x"
src="https://github.com/user-attachments/assets/5b167aba-9305-476f-a449-ec4a186bc6f7"
/>

---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2025-10-20 09:15:51 -04:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1522c181e8 Build(deps-dev): Bump rspec-core from 3.13.5 to 3.13.6 (#35487)
Bumps [rspec-core](https://github.com/rspec/rspec) from 3.13.5 to
3.13.6.
-
[Changelog](https://github.com/rspec/rspec/blob/rspec-core-v3.13.6/rspec-core/Changelog.md)
-
[Commits](https://github.com/rspec/rspec/compare/rspec-core-v3.13.5...rspec-core-v3.13.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 15:06:22 +02:00
Joffrey JAFFEUX 0a75c18f57 FIX: prevents body scroll in input focus (#35497)
We had already a workaround for this, but this is supposed to be an even
better one. I never managed to repro the bug with this workaround.

What we are trying to prevent:
<img width="922" height="2000" alt="IMG_8116 2 (1)"
src="https://github.com/user-attachments/assets/28fb3150-1cb6-43b7-9ca6-f0e7e18dcc80"
/>

Example discussion online about this bug:

https://stackoverflow.com/questions/60797340/ios-safari-prevent-or-control-scroll-on-input-focus

This commit also extracts this logic as modifier:
`{{preventScrollOnFocus}}`
2025-10-20 15:04:09 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4328d29138 Build(deps-dev): Bump eslint from 9.37.0 to 9.38.0 in the lint group (#35488)
Bumps the lint group with 1 update:
[eslint](https://github.com/eslint/eslint).


Updates `eslint` from 9.37.0 to 9.38.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.37.0...v9.38.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 14:34:10 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 5e2160134f Build(deps): Bump ace-builds from 1.43.3 to 1.43.4 (#35491)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.43.3 to
1.43.4.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
-
[Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/ajaxorg/ace-builds/compare/v1.43.3...v1.43.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 14:33:17 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 782c2cc65f Build(deps): Bump @rollup/browser from 4.52.4 to 4.52.5 (#35489)
Bumps [@rollup/browser](https://github.com/rollup/rollup) from 4.52.4 to
4.52.5.
- [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.4...v4.52.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 14:32:51 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ccdef3eb86 Build(deps): Bump puma from 7.0.4 to 7.1.0 (#35485)
Bumps [puma](https://github.com/puma/puma) from 7.0.4 to 7.1.0.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/main/History.md)
- [Commits](https://github.com/puma/puma/compare/v7.0.4...v7.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 14:17:48 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 67f91c3c4c Build(deps-dev): Bump playwright from 1.56.0 to 1.56.1 (#35490)
Bumps [playwright](https://github.com/microsoft/playwright) from 1.56.0
to 1.56.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
-
[Commits](https://github.com/microsoft/playwright/compare/v1.56.0...v1.56.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 14:14:02 +02:00
David Taylor 37648149c4 DEV: Move admin -> discourse/admin (#35322)
This commit includes the file renames only. See prior preparation commit for more details on motivation and implementation.
2025-10-20 12:46:11 +01:00
Jarek Radosz 0fcd2f12dc DEV: Prepare for admin -> discourse/admin rename (#35322)
To simplify our repository architecture, we're moving the admin panel from a separate package(/ember-addon) to a directory inside the main app package. This will make future configuration of tools like typescript/glint, and Vite, much easier. It also means that the admin panel is now transpiled via Webpack, and can internally make use of async-imports and bundle-splitting.

Admin modules will now be referenced like `discourse/admin/...`. Backwards-compatibility is maintained for the old import paths via a custom babel transform.

A 'compatModules' technique is used to keep all of the admin invokables and routes/controllers/templates available to Ember's resolver.
2025-10-20 12:46:11 +01:00
David Battersby e30f6b919d UX: mobile lightbox padding and styling improvements (#35494)
Adds a safe inset bottom for lightbox captions on mobile and removes
image padding on small screens. This change also applies bottom
depending on whether caption is being set or not.

How it looks:

<img width="225" height="487" alt="IMG_9334"
src="https://github.com/user-attachments/assets/d92d379a-ad63-44d0-8320-a0861b2a10e4"
/>
2025-10-20 14:59:03 +04:00
Loïc Guitaut 695533b99c DEV: Add a compact_blank option to the ActiveModel array type (#35476)
Instead of having to clean an array in a contract using a
`before_validation` block, for example, we can now pass `compact_blank:
true` to the attribute, like this:

```ruby
attribute :ids, :array, compact_blank: true
```
2025-10-20 11:33:36 +02:00
Jordan Vidrine 1354173224 UX: Fix overflow on admin search input (#35481) 2025-10-17 16:33:15 -05:00
Renato Atilio f50b637354 FIX: prosemirror input rule code mark check (#35416)
Updates `prosemirror-inputrules` to use this fix:
https://github.com/ProseMirror/prosemirror-inputrules/commit/7f63cfbb58310394ee83c578b2c910311b59428c

Adjusts our `markInputRule` so we can type something like

```
**`code`**
```

And the `code` will get the `strong` input rule applied, but cases like
these should not apply the `strong` input rule:
```
`** code` **
*`* code`**
**`code*`*
etc
```

And adds a simple test.
2025-10-17 18:12:59 -03:00
Kris e2c701a849 UX: remove total and update backfill message for AI translations (#35479)
This removes the "N posts are ready to translate" message and updates
the backfill estimate text to also reference the date

Before:
<img width="2228" height="430" alt="image"
src="https://github.com/user-attachments/assets/112c933f-0bae-4e87-8949-317a9b6eccb8"
/>


After:
<img width="2194" height="624" alt="image"
src="https://github.com/user-attachments/assets/b4157144-e3c6-481c-beeb-a5d841230b55"
/>
2025-10-17 14:09:28 -04:00
Régis HanolandKudzai Tuso aa01898112 FIX: improve topic tracking state sync (#35478)
In "_correctMissingState()" we should not be breaking out of the for
loop on the first topic we've already seen, instead we should continue
iterating over all the information provided by the server.

Internal ref - t/105864/20

Co-authored-by: Kudzai Tuso <kudzai@discourse.org>
2025-10-17 19:24:46 +02:00
Roman Rizzi 424edb1b4b FIX: Disable AI Problem Checks (#35475)
The underlying problem check system has some issues we need to address
before being able to run these reliably.
2025-10-17 14:07:32 -03:00
Régis Hanol 67f2fbb923 FIX: Job exception: Holidays::InvalidRegion (#35473)
When we updated the list of available/supported holidays regions in
eabbac18cf and in
1983a44812 we left some records with
invalid regions.

This adds a migration to correct old records, as well as adding an error
handling to log an error when a region is invalid, rather than throwing
an exception and breaking the background job.

Ref - https://meta.discourse.org/t/-/384873
2025-10-17 17:53:53 +02:00
Keegan George 85de78b428 DEV: Conditionally show AI image caption button (#35463)
## 🔍 Overview

None of the vision capable LLMs currently support captioning SVGs, and
attempting to caption images results in some odd behavior. On the server
side, we already [only allow specific
extensions](https://github.com/discourse/discourse/blob/e2eb9fe93f8a338df6981bae0b378f9c9eb57555/plugins/discourse-ai/lib/completions/upload_encoder.rb#L13-L19)
before captioning, but the client side we still were showing the image
caption button.

This update hides the image caption button on image extensions that are
not supported for AI image captioning. To achieve this, we also update
the plugin API method: `api.addComposerImageWrapperButton` so that it
supports an optional `includeCondition` param to conditionally show the
button based on the image source URL.

## 📹 Preview


https://github.com/user-attachments/assets/c9507475-ae3d-4356-8586-3fcc5d070b83
2025-10-17 08:16:25 -07:00
Rafael dos Santos Silva 6b7a086644 FEATURE: Add estimated completion time to AI translation backfill (#35474)
## Summary
- Adds estimated completion time (ETA) display for AI translation
backfill progress
- ETA is calculated based on the configured hourly rate and remaining
untranslated posts
- Display format automatically adjusts based on time remaining (minutes,
hours, or days)
- ETA appears inline with the post count for better UX

## Implementation Details
- Backend sends `hourly_rate` from site settings to frontend
- Frontend calculates total remaining posts across all locales
- ETA calculation: `remaining_posts / hourly_rate`
- Format logic:
  - < 1 hour: shows minutes
  - 1-24 hours: shows hours  
  - \> 24 hours: shows days
- Only displays when backfill is enabled and there are posts remaining

<img width="1243" height="242" alt="image"
src="https://github.com/user-attachments/assets/314bc399-9694-43ec-8591-0237c1b902f6"
/>
2025-10-17 11:55:26 -03:00
Rafael dos Santos Silva 34c4621ad4 DEV: Increase max translation backfill rate to 100k (#35472) 2025-10-17 10:55:23 -03:00
David Taylor c49d5d5d6f DEV: Cleanup unused javascripts/* files (#35471) 2025-10-17 14:09:03 +01:00
Jarek Radosz e2e9b3b679 DEV: Don't serialize error objects back into js (#35468)
This will prevent errors like:

```
MiniRacer: InternalError (unsupported type Logster: Message) lib/discourse_js_processor.rb:86
```
2025-10-17 15:00:56 +02:00
David Taylor 1346318a4c DEV: Disable babel compact for theme compiler (#35469)
Compact docs:

> All optional newlines and whitespace will be omitted when generating
code in compact mode.

By default it's in auto mode, and emits a warning when it gets
auto-disabled for large files.

We use terser to strip unnecessary whitespace in production, so there's
no real benefit to us using `compact`. Easier to just disable it and
stop the warnings.
2025-10-17 13:58:28 +01:00
David Taylor d9e0a44007 DEV: Fix Zeitwerk reloading in post-voting (#35470)
1. Update `register_preloaded_category_custom_fields` API to be
reload-safe

2. Update post-voting to use this in all cases, and remove the
`respond_to?` checks since this plugin is now bundled with core
2025-10-17 13:58:12 +01:00
Régis Hanol 03629cd561 PERF: N+1 when checking for category moderators when loading channels (#35466)
Avoids an N+1 when loading /chat/api/me/channels and checking for
category moderators.

Internal ref - t/165130
2025-10-17 14:29:28 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> c0aa330340 Build(deps-dev): Bump prism from 1.5.2 to 1.6.0 (#35460)
Bumps [prism](https://github.com/ruby/prism) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/ruby/prism/releases)
- [Changelog](https://github.com/ruby/prism/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ruby/prism/compare/v1.5.2...v1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-17 14:00:32 +02:00
Joffrey JAFFEUX 52e5801e3d FIX: allows check_policy to find mailer class (#35464) 2025-10-17 11:19:33 +02:00