Commit Graph
4299 Commits
Author SHA1 Message Date
Joffrey JAFFEUX 17d6cb2111 FIX: supports html entities in chat (#34591) 2025-08-28 07:34:24 +02:00
Penar Musaraj e01751d427 DEV: Add provider URL for Apple auth (#34581) 2025-08-27 12:57:34 -04:00
Kris a79aaa5ead UX: only show AI persona dropdown with multiple options (#34527)
Currently we show the AI persona dropdown on the AI conversations page
if there's only one option:

<img width="2192" height="828" alt="image"
src="https://github.com/user-attachments/assets/79316217-e9e8-48f6-b9de-4a61f5d8ba25"
/>

To simplify, we should only show it when more than one option are
present:

<img width="2202" height="1180" alt="image"
src="https://github.com/user-attachments/assets/baff1bab-da85-4e9f-9091-a5df544b3762"
/>

and it appears again with multiple options: 

<img width="880" height="354" alt="image"
src="https://github.com/user-attachments/assets/e666916f-b958-4370-9e5e-bf7558f48f52"
/>
2025-08-27 11:55:35 -04:00
Jarek RadoszandDavid Taylor 06f841da08 DEV: Update Ember to 6.6.0 (#34460)
This upgrade does not include any breaking changes for Discourse
themes/plugins. Two of the three deprecations in Ember 6 (array
prototype extensions, component-template resolution) have already been
polyfilled in Discourse. The third (action helper/modifier) is
polyfilled in this commit.

Performance testing shows a 2-3% improvement in Discourse rendering
time, thanks to upstream performance fixes in the glimmer-vm since the
regressions in the Ember 5.x series.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2025-08-27 16:48:40 +01:00
David Battersby 9bf6db72da FIX: prevent group chat when cannot see group members (#34571)
This change prevents the user from starting a group chat with groups
when the current user does not have permission to view the group's
members.

The group is omitted from both the default list and results list when
searching.

Internal ref: /t/-/145343
2025-08-27 14:54:47 +04:00
Natalie Tay 5de7572434 FIX: Exclude deleted posts and topics from assignments lists in various places (#34564)
This PR adds a check if the post an assignment is attached to is deleted
(by the author or another user) prior to listing it in
`/topics/group-topics-assigned/group_name.json`. This is done via
TopicQuery

Related:
https://meta.discourse.org/t/topic-deletion-should-clear-assignment/271996
2025-08-27 17:01:38 +08:00
Discourse Translator Bot 0d4ca82c91 Update translations (#34568) 2025-08-27 11:00:03 +02:00
Gary Pendergast c333888e01 DEV: When chat is full page, scroll user cards with the avatar (#34556)
When a user card is rendered, there are two phases: first, where a
placeholder is created, then after the user card data is retrieved, the
data is inserted into the user card structure.

This causes an issue where, if the placeholder is too close to the
bottom of the viewport, and there's a lot of data being inserted into
the user card, then the user card will be partially rendered outside of
the viewport, resulting in odd scrolling behaviour.

To address this issue, this change makes use of float-kit's ability to
auto-update the position of the user-card. There are three relevant UX
changes from this:

- When the avatar is close to the bottom of the viewport, the
placeholder renders below the avatar, and the final user card is much
bigger, the user card will jump from being below the avatar, to above
the avatar.
- The user card follows the avatar when the chat window scrolls.
- When the avatar scrolls out of view, the user card is hidden.
2025-08-27 17:00:48 +10:00
Sam 0584a13517 DEV: new API endpoint for data explorer query running (#34561)
New GET endpoint at /data-explorer/queries/ID/run.json

Allows for simple execution of queries based on ID

Previous endpoint was POST and required group name, which makes it
harder to use via API
2025-08-27 15:52:08 +10:00
Sam 37bf41b8de PERF: do not hydrate all candidates in big relation (#34553)
Fixes "related topics" so they are instant vs many seconds long
2025-08-27 14:09:04 +10:00
Joffrey JAFFEUX 711ead1909 DEV: removed support for include_expired (#34549)
This is a barely used param but we have to carry this over.
2025-08-27 01:18:51 +02:00
Joffrey JAFFEUX 5adc33ae29 FIX: use CDN url for chat (#34541) 2025-08-26 18:04:25 +02:00
Penar Musaraj 7514546a78 FIX: Correctly order events in upcoming events list (#34526)
Previously, the dates within a month could go out of order. We were
using plain javascript objects here with the date (DD) as the key, but
these are unordered, so `12` would often be listed after `03`.

Switching to a map allows us to sort properly.
2025-08-26 11:56:21 -04:00
Gabriel Grubba 4782dc9cdf Revert "FIX: use CDN url for chat" (#34540)
Reverts discourse/discourse#34507

Previews are broken, the CDN URL is incorrect
2025-08-26 11:24:51 -03:00
Discourse Translator Bot fbdb1e2070 Update translations (#34537) 2025-08-26 16:12:30 +02:00
Joffrey JAFFEUX b4fd3d7d57 FIX: correctly start weeks en Monday (#34536)
Prior to this fix we would generate a range which would be incorrect as
we would use Monday as the end of the week.
2025-08-26 15:36:04 +02:00
361029ad4d DEV: full calendar v6 (#33737)
This commit makes the following changes:
- uses fullcalendar 6
- replaces the server generated upcoming dates for recurring events with
a frontend implementation of the RRULE standard (using the fullcalendar
RRULE plugin)
- displays a preview of the event on click on the upcoming events
calendar

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2025-08-26 10:35:05 +02:00
chapoi aebba256df UX: restyling of the solved popup (#34518)
This commit aims to polish the popup a tiny bit by subduing the title
size and close button, and making sure they play better together.

| Header | After |
|--------|--------|
| <img width="1956" height="1400" alt="CleanShot 2025-08-25 at 16 19
59@2x"
src="https://github.com/user-attachments/assets/d2eeddaa-7c99-433f-b70c-ccca1fb0a5bd"
/> | <img width="1956" height="1400" alt="CleanShot 2025-08-25 at 16 20
30@2x"
src="https://github.com/user-attachments/assets/0c8614c1-96c3-4c24-a185-bc5b4570f31d"
/> |
2025-08-26 09:58:29 +02:00
SamandJoffrey JAFFEUX 8cf83a6104 FIX: use CDN url for chat (#34507)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-08-26 13:59:59 +10:00
Roman Rizzi 30c8055722 DEV: Only run embeddings test if there's a valid embedding model (#34525) 2025-08-25 17:21:39 -03:00
Sérgio Saquetim 95a95a492b DEV: Deprecate Site.mobileView/desktopView during initialization (#34122)
This commit introduces deprecation warnings for accessing Site.mobileView or
Site.desktopView during application initialization to prevent
layout-related errors and improve code reliability.

The changes include:

* Added deprecation warnings for Site.mobileView and Site.desktopView
access during the initialization phase.
* Updated multiple plugins and components to avoid these deprecated
calls during startup.
* Refactored initialization logic across discourse-ai, discourse-chat,
discourse-calendar, discourse-reactions, discourse-assign,
discourse-subscriptions, and discourse-user-notes plugins
* Improved error prevention by discouraging early access to
view-dependent properties before the application is fully initialized
* Enhanced code maintainability by establishing clearer boundaries
between initialization and runtime phases

This deprecation helps prevent subtle bugs that can occur when
components try to determine the view type before the application context
is properly established, leading to more robust plugin initialization
patterns.
2025-08-25 16:49:52 -03:00
Roman Rizzi 41e87ba91f FEATURE: Re-introduce quick test validation when selecting embeddings model (#34524)
We used to run a quick test when selecting a embedding model, but it was
removed in https://github.com/discourse/discourse-ai/pull/1049. We
already do this for LLMs so it makes sense to also do it here.
2025-08-25 16:39:35 -03:00
Loïc Guitaut ca81e8a5b2 DEV: Unify ListChannelMessages/ListChannelThreadMessages behaviors
We recently updated `Chat::ListChannelThreadMessages` to take an option
so its `max_page_size` could be configured.

This behavior should be consistent between
`Chat::ListChannelThreadMessages` and `Chat::ListChannelMessages` since
they’re basically doing the same thing.

This patch updates the behavior of the `Chat::ListChannelMessages`
service.
2025-08-25 13:48:02 +02:00
chapoi efe3d2ae83 UX: add class to inline-footnote to display as inline-block (#34515)
This avoids the spacing caused by line breaks.
Meta report:
https://meta.discourse.org/t/extra-spaces-around-footnote/380153
2025-08-25 13:17:55 +02:00
chapoi c6b2949d64 UX: remove chat and message buttons on currentUser profile (#34513)
Remove the rendering of the chat and message CTA when viewing your own
profile.
They serve little purpose, add to confusion, and take up valuable above
the fold space on mobile.

| Before | After |
|--------|--------|
| <img width="690" height="1490" alt="CleanShot 2025-08-25 at 11 47
24@2x"
src="https://github.com/user-attachments/assets/7d3539b6-5599-448b-b610-00adcacaf28b"
/> | <img width="690" height="1490" alt="CleanShot 2025-08-25 at 11 46
47@2x"
src="https://github.com/user-attachments/assets/1c0b4512-693d-4e39-b1ae-3ee30375e127"
/> |
2025-08-25 12:04:29 +02:00
Discourse Translator Bot 9c429cd00e Update translations (#34510) 2025-08-25 11:43:23 +02:00
fokx f002aa4022 FEATURE: Allow choosing custom emoji in reaction (#34312)
This PR allows user to choose any emoji in reaction, like the old retort plugin.

* Add a `discourse_reactions_experimental_allow_any_emoji` option, if enabled, will add a button of EmojiPicker in the ReactionsPicker
* When the EmojiPicker is shown, will prevent ReactionsPicker from collapse when clicking at outside(necessary on mobile device) / moving mouse outside of ReactionsPicker
* This is considered a disabled by default experimental feature for now, admins can enable
at their own discretion, as there is not currently a way to limit which reactions can be used here
2025-08-25 18:14:36 +10:00
Roman RizziandSam Saffron edeb9d6cfc FEATURE: Use embeddings to find similar topics to the one being composed (#34448)
Co-authored-by: Sam Saffron <sam.saffron@gmail.com>
2025-08-25 13:38:01 +10:00
Discourse Translator Bot e44347414a Update translations (#34482) 2025-08-22 17:11:31 +02:00
David Taylor 12c80d43ad DEV: Remove AssigneeChooser (#34487)
This was almost exactly identical to the default
`EmailGroupUserChooser`, so we can just use that and update the CSS
selector accordingly.

Also resolves the `select-kit-resolved-components` deprecation
2025-08-22 12:34:36 +01:00
Jarek Radosz c1a54b1d29 DEV: Vendor-in built-in-components (#34488)
`<TextField />` and `<Textarea />`
2025-08-22 13:32:39 +02:00
Meghna a052e05983 UX: remove "(Sign in with Apple)" as suffix as we're already including it as prefix (#34481) 2025-08-22 15:27:54 +05:30
Jarek Radosz 2c4e3d6d47 DEV: Manually fix Rails/UnusedRenderContent offenses (#34418)
(no autofix for this one)

From [rubocop
docs](https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsunusedrendercontent):

> If you try to render content along with a non-content status code
(100-199, 204, 205, or 304), it will be dropped from the response.
2025-08-22 11:42:12 +02:00
Renato Atilio e8aeb272bb UX: improvements to rich editor spoiler (#34149)
Adds `commands` and `state` keys to the `RichEditorExtension` and uses
them for the spoiler toolbar item, so it shows the current state when
inside a spoiler node, and toggles the state when triggered.

Improves the `keymap` key chaining mechanism to also include the base
keymap as part of the chain, so custom commands can be triggered before
getting to the base keymap.

Extends the ENTER key handling with a different behavior for inline
nodes such as `[spoiler]` or `<kbd>` (inline spoiler and inline html):
- if at the start of a node, moves the node to a paragraph below
- if in the middle of the node, splits it but strips the node from the
second half, keeping it "unstyled"
- if at the end of the node, adds and selects a new paragraph

Appends an empty space (" ") after these inline nodes when they happen
at the end of a block node, allowing to tap/right-arrow out of the
inline node.

Adds a `[spoiler]` input rule which adds an inline spoiler if
mid-sentence or a block spoiler if at the beginning of a text block.

Replaces the "toggle" for revealing the spoiler node, instead of using a
click handler we now track the cursor position and reveal when it's
inside a spoiler node.

Tweaks the `bbcode-block` markdown-it handler to avoid applying a bbcode
block for a scenario like `[spoiler]spoiled[/spoiler] `, with the
trailing space, otherwise our inline node on ProseMirror would be
re-parsed as block on the next markdown-it parsing.

Updates the styling using the default `--d-border-radius`.

<img width="725" height="234" alt="image"
src="https://github.com/user-attachments/assets/6a509fe0-73e8-4f01-98c9-ed96d087ce1c"
/>
2025-08-21 13:56:31 -03:00
Meghna 2e5ac6dd5d UX: change "Open AI" to OpenAI (#34459) 2025-08-21 17:22:17 +05:30
Discourse Translator Bot 7d3bfe978e Update translations (#34436) 2025-08-21 11:02:39 +02:00
Martin Brennan ad2d3007d5 FEATURE: Disable user tips + narrative bot welcome post for all sites (round 2) (#34373)
We want to temporarily disable user tips and the Discobot welcome PM
on all sites by default until we have time to improve their
functionality, because
right now they create a lot of noise for new members and admins without
providing obvious benefits.

Existing sites which have customized any of these localization strings will have
`disable_discourse_narrative_bot_welcome_post` kept as `false`:

* system_messages.welcome_user.subject_template OR
* system_messages.welcome_user.text_body_template OR
* discourse_narrative_bot.new_user_narrative.hello.message

Followup revert 70859e277f.
2025-08-21 09:17:20 +10:00
Roman Rizzi 5ccd7fa1e4 FIX: Default prompts have to be explicit about the expected format. (#34442)
Wrapping the expected response with `<output>` tags confuses models,
especially those from the Claude family, which don't have schema support
and rely on prefilling. Relying on prefilling means they only know the
response must start with `{`, and how the JSON looks is only hinted at
in the system prompt.
2025-08-20 13:56:21 -03:00
chapoi f698bb9088 UX: fix cmd-k bottom padding (#34440)
Moved some things around to fix the lack of bottom padding while
searching for results:
<img width="1706" height="398" alt="CleanShot 2025-08-20 at 15 58 32@2x"
src="https://github.com/user-attachments/assets/c67f2c35-719d-4a3d-98ee-191353a476e2"
/>

🔽 
<img width="1706" height="398" alt="CleanShot 2025-08-20 at 15 52 13@2x"
src="https://github.com/user-attachments/assets/65869c9d-06b7-4dd9-b5ef-156e320a798a"
/>
2025-08-20 16:45:39 +02:00
Charles Lechasseur 4380efbf78 FIX: Relax Matrix room ID validation (#34399)
This PR relaxes the accepted format of Matrix room IDs in the Matrix
chat provider. It allows the new room ID format in [Room
v12](https://github.com/matrix-org/matrix-spec-proposals/blob/matthew/msc4291/proposals/4291-room-ids-as-hashes.md)
to be used in Discourse.

Reported here:
https://meta.discourse.org/t/new-matrix-v12-rooms-not-supported-by-chat-integration/378675
2025-08-20 13:18:29 +10:00
Martin Brennan 30e0058463 DEV: Replace <Input /> text usage in plugins (#34352)
Replaces usage of the Ember `<Input />` component with
native `<input>` elements in core plugins for text and
number inputs.

Generated with claude.
2025-08-20 11:23:41 +10:00
Discourse Translator BotandGerhard Schlager ab0b0573a1 Update translations (#34413)
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-08-19 16:23:59 +02:00
Discourse Translator Bot 74066bffa2 Update translations (#34116) 2025-08-19 12:14:51 +02:00
SamandMartin Brennan f0fc5646dc FEATURE: dynamic poll support (#34368)
If a poll is created with `dynamic-poll=true`
then options can be amended after you post poll.

This is useful for polls like: "favorite IDE" where you want
people to easily be allowed to add options.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-08-19 16:43:36 +10:00
Sam 87476ce2c1 FEATURE: add support for Groq as a pre-configured LLM (#34402) 2025-08-19 16:17:45 +10:00
Kelv a3bc8c80d7 DEV: floatkit autocomplete for ai-bot-conversations (#34354)
This PR changes the ai-bot-conversations component to use the
floatkit-based autocomplete menu for the AI bot chat interface when
autocompleting hashtags (`#`) and mentions (`@`). Also fixes a bug where autocompleting in the full page search input field results in the search immediately submitting.
2025-08-19 10:48:07 +08:00
Nat 4edad4dc3c SECURITY: Escape names 2025-08-19 10:09:14 +08:00
Roman Rizzi 5d27b185e2 FEATURE: Skip spam scanning when relevant content is unchanged or edited by staff (#34391) 2025-08-19 09:04:02 +10:00
Roman Rizzi 4abe2229f1 FIX: Include llm_persona_triage scripts in the AI features' triage section (#34395) 2025-08-19 08:59:48 +10:00
Roman Rizzi 565a70b72c FIX: Truncate seeded persona's names to fit name length constraint (#34393) 2025-08-18 18:08:43 -03:00