Commit Graph
561 Commits
Author SHA1 Message Date
Sam b5838d7d42 DEV: Remove redundant double-assignment in admin search scoring (#37544) 2026-02-05 18:05:23 +11:00
Natalie Tay debac2fd5b FIX: Ensure composer also filters tags when searching (#37555)
When editing a topic via the composer, tags with parent tag requirements
weren't appearing in search results, even though the parent tag was
already selected on the topic. When the composer opens for editing, it
was using these serialized string tags. The mini-tag-chooser couldn't
extract tag IDs from strings

This commit fixes that. Also adds a system spec testing the composer and
title header scenarios.
2026-02-05 15:03:15 +08:00
Sam afd259a29c FIX: Handle tag group names containing quote characters in filter suggestions (#37549)
minor fix allows UI to handle

This "amazing" category group: category group
2026-02-05 18:00:20 +11:00
Alan Guo Xiang Tan e9413a1eda DEV: Add topTags and categoryTopTags getters to Site model (#37472)
What is the problem?

The `Site` model stores `top_tags` and `category_top_tags` as plain
JavaScript objects (POJOs), but consumers often need Tag model instances
to access Tag-specific methods and properties.

What is the solution?

Add `topTags` and `categoryTopTags` getter properties to the `Site`
model
that lazily transform the underlying POJOs into Tag model instances
using
`store.createRecord()`.
2026-02-05 14:52:52 +08:00
Alan Guo Xiang Tan 2b7282ff44 FIX: Extract tag names from objects in tag-list site setting (#37554)
What is the problem?

After commit 9e99066b07, `TagChooser` passes tag objects (with `id`,
`name`, `slug` properties) to its `onChange` callback instead of tag
name strings. The `TagList` site setting component was not updated to
handle this change, causing `changeSelectedTags` to call
`tags.join("|")`
on objects, which produces `[object Object]|[object Object]` instead of
the expected pipe-delimited tag names. This breaks settings like
`enable_solved_tags` in the discourse-solved plugin.

What is the solution?

Update `TagList#changeSelectedTags` to extract the `name` property from
each tag object before joining: `tags.map((t) => t.name).join("|")`.
2026-02-05 14:52:20 +08:00
Krzysztof Kotlarek e91fda642c DEV: Support tag objects in AddCategoryTagClasses (#37514)
Following the changes in #36678 where tags are now returned as objects
  with {id, name, slug} instead of plain strings, this updates the
  `AddCategoryTagClasses` component to handle both formats.

Screenshot with bug:
<img width="917" height="151" alt="Screenshot 2026-02-04 at 9 43 11 am"
src="https://github.com/user-attachments/assets/03171676-0512-4943-81fe-48d74dddfcd4"
/>
2026-02-05 13:45:09 +08:00
Jarek Radosz 1ed9a02691 FIX: Report trend icons regression (#37529)
regressed in 7fd9550f64
2026-02-05 14:37:04 +10:00
Sam e0d8ba788e DEV: Remove empty acceptance test blocks left behind after footer-message removal (#37543)
Dead code removal
2026-02-05 09:56:25 +08:00
Jordan Vidrine 54c6d08b01 UX: Convert caret icons to chevron icons for better visibility & concistency (#37539)
This change affects any caret icon across the app to be converted to an
angle icon.

**Before**
<img width="462" height="150" alt="CleanShot 2026-02-04 at 15 53 10@2x"
src="https://github.com/user-attachments/assets/adf52ce6-b958-4650-bf99-836203884640"
/>


**After**
<img width="454" height="136" alt="CleanShot 2026-02-04 at 15 50 22@2x"
src="https://github.com/user-attachments/assets/eea2f844-fdc7-4fa7-98f5-af393ae835b8"
/>
2026-02-04 16:43:09 -06:00
Sam 8ba67d4b7f FIX: Properly reject loadScript promise on failure (#37435)
Previously, loadScript would silently fail when scripts or CSS files
failed to load, leaving callers with an unresolved promise. This made
error handling impossible and could cause retry logic to fail since
the URL remained in the _loading cache indefinitely.

Changes:
- Add error callback support to loadWithTag function
- Reject the promise with a descriptive error on load failure
- Clean up _loading cache on failure via finally() handler
- Clear onload/onreadystatechange handlers on error to prevent
  duplicate callbacks
- Add unit tests for rejection and retry behavior
2026-02-05 06:58:41 +11:00
Sam 20811cc9c0 FIX: exclude 't' shortcut from min length bypass (#37440)
The 't' shortcut (in:title) modifies where to search but still
requires actual search terms to produce meaningful results. Unlike
'l' (latest) and 'r' (recent) which return results on their own,
't' alone should enforce the minimum search term length.

Renames `valid_search_shortcut?` to `min_length_bypass?` to better
describe the method's purpose.
2026-02-05 06:58:19 +11:00
Sam 0a060f5063 FIX: Re-throw non-403 errors in loadIntoIdentityMap (#37521)
code was adding special handling for 403 but eating all the rest of the
exceptions
2026-02-05 06:56:57 +11:00
Renato Atilio 5171c32f4b FIX: restore whisper state when reopening a draft (#37510)
When a whisper draft is re-opened, which can happen by opening a draft
from the drafts page or by hitting reply on a topic with an existing
draft, the whisper state was lost.

This PR fixes it.
2026-02-04 16:28:34 -03:00
Régis Hanol 471b1a662c FIX: auto-switch to private when selecting restricted parent category (#37530)
When creating a new category and selecting a restricted parent category,
the visibility should automatically switch to "Private" mode.

Previously, if a user toggled between Public/Private before selecting a
restricted parent, the UI would incorrectly stay on "Public" even though
the parent category required restricted access.

This commit:
- Resets visibility state when selecting a restricted parent category
- Resets to public when removing the parent category
- Adds controlled mode to ConditionalContent component (when @onChange
is provided, the component respects external @activeName changes)
- Removes dead code (userModifiedPermissions)
- Uses DToggleSwitch page object in category specs
2026-02-04 16:05:18 +01:00
Régis Hanol ad53518ec6 FEATURE: add filter to admin badges list (#37527)
Adds a search/filter input to the admin badges page, allowing admins to
quickly find badges by name or description instead of scrolling through
a long list.

Ref - https://meta.discourse.org/t/395044

## Example of using the badge filter

<img width="1458" height="1203" alt="2026-02-04 @ 12 20 06"
src="https://github.com/user-attachments/assets/69be8ae1-affb-4ca4-b34a-792eca1760cf"
/>
2026-02-04 16:05:03 +01:00
Natalie Tay 2d7f8062fa FIX: User preferences page for tracking tags should show tag name (#37517)
Reported here:
https://meta.discourse.org/t/tag-ids-displaying-instead-of-slugs/395070

The fix ensures that we return the names and not just the IDs
2026-02-04 15:47:50 +08:00
Sam 424304582e FIX: Remove dead code left over from preview cleanup (#37519) 2026-02-04 15:02:00 +08:00
Sam cd07d02429 DEV: Remove pointless empty willDestroy in wrap-node-view (#37520) 2026-02-04 15:01:42 +08:00
Alan Guo Xiang Tan 02fd694014 UX: Count all reviewables on user profile flags counter (#37402)
What is the problem?

The flagged posts count on user profiles only shows
`ReviewableFlaggedPost` items
and excludes other reviewable types like `ReviewableQueuedPost`,
`ReviewableUser`,
and plugin-provided reviewables (chat, AI, etc.).

`User#number_of_flagged_posts` queries only `ReviewableFlaggedPost`
records, and
the review queue link includes `type="ReviewableFlaggedPost"` as a query
parameter
to scope results. This has been confusing for staff who expect the count
to reflect
all pending review items for a user, not just flagged posts.

What is the solution?

Product has decided to change the label from "X flagged posts" to "X
flags" and
stop scoping to just `ReviewableFlaggedPost`, so the counter reflects
all
reviewables for the user.

1. Rename `User#number_of_flagged_posts` to `User#number_of_flags` and
query
   all `Reviewable` records instead of just `ReviewableFlaggedPost`
2. Remove `type="ReviewableFlaggedPost"` from the review queue link
query params
so clicking through shows all reviewables matching the username filter
3. Rename the translation key from `flagged_posts` to `flags` and CSS
class from
   `.flagged-posts` to `.flags`
2026-02-04 14:04:57 +08:00
Martin Brennan e89637330d UX: Upcoming change page copyedit & learn more URLs (#37469)
Add learn more URLs to all upcoming changes and rename the link to
"Feedback..." to encourage feedback from admins.

Add overall learn more URL for the upcoming change page to point
to the announcement topic.
2026-02-04 12:25:34 +10:00
Martin Brennan a2b8fc8dce DEV: Remove lib/utilities isiPad (#37471)
This has been superseded by the newer isIpadOS device
detection in our capabilities service

https://github.com/discourse/discourse/pull/37470 should
be merged first to get rid of some other usages
2026-02-04 09:34:11 +10:00
Kris 643ab82df5 UX: Show that topic was deleted in review queue (#37497)
Reported here:
https://meta.discourse.org/t/visual-bug-in-review-queue-notification/394828

This will ensure we render a title even when the topic is deleted...
both in the queue and in notifications


Before:
<img width="800" alt="image"
src="https://github.com/user-attachments/assets/77843c1c-2e51-4106-bf54-6a02769a0b8c"
/>

<img width="319" height="94" alt="image"
src="https://github.com/user-attachments/assets/29775c08-72eb-4cca-a895-dd1075eb69a7"
/>



After: 
<img width="800" alt="image"
src="https://github.com/user-attachments/assets/04d6c09c-c26f-4104-bcd0-4511a00dcae6"
/>


<img width="300" alt="image"
src="https://github.com/user-attachments/assets/cb3497c6-617a-429d-8930-33dad9de8bd7"
/>
2026-02-03 17:04:16 -05:00
Renato Atilio a27ec8746e DEV: separate DOM creation from text on image node view lightbox caption (#37498) 2026-02-03 18:15:42 -03:00
Régis Hanolandawesomerobot 9cb85906b8 DEV: Refactor category permissions to use group IDs (#37483)
This change improves the reliability of category permission management
by using group IDs instead of group names for all operations.

Changes include:
- Use group_id for permission add/remove/update operations
- Better handling of subcategory permissions inherited from parent
- Add granular permission messages (full/reply/see-only access)
- Load parent category permissions when editing subcategories
- Remove unused methods and simplify permission logic

## When selecting a restricted parent category, we mark the current
category as private, disable the group selector and link to the
"advanced security" tab

<img width="1487" height="1237" alt="2026-02-03 @ 16 11 17"
src="https://github.com/user-attachments/assets/add9444f-0cd6-414a-b307-80ba3af8e811"
/>

## In the "advanced security" tab, I've improved the message displayed
when adding the "everyone" group

<img width="1487" height="1237" alt="2026-02-03 @ 16 11 37"
src="https://github.com/user-attachments/assets/3d628504-af25-412d-b5a3-956fa1c6769e"
/>
<img width="1487" height="1237" alt="2026-02-03 @ 16 11 41"
src="https://github.com/user-attachments/assets/9225e47b-b6f6-4fa3-97c5-4877df314e47"
/>
<img width="1487" height="1237" alt="2026-02-03 @ 16 11 43"
src="https://github.com/user-attachments/assets/2cddd8ff-380e-4ecd-a17c-3e0adaac55a3"
/>
<img width="1487" height="1237" alt="2026-02-03 @ 16 11 46"
src="https://github.com/user-attachments/assets/1a23ec2d-8950-449e-b99d-a057b3a60e61"
/>

---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2026-02-03 22:08:32 +01:00
Kris dd2663a88d UX: ensure read-only only appears once, on the relevant category (#37492) 2026-02-03 15:03:04 -05:00
Jarek Radosz e71bb36e6d DEV: Update linting and run lttf (#37494) 2026-02-03 20:02:58 +01:00
Jarek Radosz d29d38332f DEV: Move and fix incorrectly named tests (#37488)
Those were not being run because of missing `-test` suffix.
2026-02-03 19:10:06 +01:00
Keegan George 1280021430 FIX: Clear forced sidebar when leaving AI bot from another panel (#37490)
## 🔍 Overview
This update is a second try at:
https://github.com/discourse/discourse/commit/8506eab38f238214eef43fa9626e7494a4511941
which was reverted in
https://github.com/discourse/discourse/commit/f086d1dd188116699d36be1afda0029521ed906e
due to the admin panel sidebar no longer showing. This updated fix now
ensures that we only remove the forced sidebar if AI bot conversations
page had set it.
2026-02-03 09:57:32 -08:00
Renato Atilio 6372ac40fc FIX: missing category on composer when lazy_load_categories (#37484)
When using `lazy_load_categories`, it is possible to open the composer
without _any_ pre-cached categories, which currently omits the Category
field from the composer.

This PR changes `showCategoryChooser` to consider `lazy_load_categories`
enabled as having `manyCategories`.
2026-02-03 14:02:24 -03:00
Jarek Radosz 25702ef75d DEV: Solve/LTTF more ember lints (#37448)
[avoid-leaking-state-in-ember-objects](https://github.com/discourse/discourse/commit/438132fca245c9a9030b078cd2b23863f8c75069),
[no-observers](https://github.com/discourse/discourse/commit/3161c1c77e4aac223055cb7c29605cb22689c30c),
[no-tracked-properties-from-args](https://github.com/discourse/discourse/commit/5b99b3e0ad2499fb56309abc5945eb536ebb18c5),
[no-jquery](https://github.com/discourse/discourse/commit/532afdf129a5ecbbef3e16bd055025a14030b6c8),
[route-path-style](https://github.com/discourse/discourse/pull/37448/commits/0609d5169540239744498e430ca908cda2c6bf29),
[routes-segments-snake-case](https://github.com/discourse/discourse/pull/37448/commits/65b7c91baecad619ccc2e0c6eaa7993d99879bfc)
2026-02-03 15:45:35 +01:00
Joffrey JAFFEUX 34377e20c0 FIX: ensures whole label has cursor disabled (#37474)
Prior to this fix only when hover the text itself we would show it as
disabled.
2026-02-03 12:04:42 +01:00
Kris a9f343f5cc UX: clarify color usage in collapsed color picker (#37461)
Separates colors out into "presets" and "already used" groups,
eliminates the checkmark, and adds an "edit presets" button for admins.
2026-02-03 17:00:50 +10:00
Keegan George ec42f4cfaa FIX: typos, dead code, debug statements, incorrect naming, etc. (#37462)
## 🔍 Overview

This update ensures that we fix some typos in the codebase, along with a broken CSS selector, accidental debug statements, and invalid references.
2026-02-02 16:12:33 -08:00
Martin Brennan 84e6257909 FIX: Do not mutate color swatch array (#37433)
We should use toSorted not sort, since the latter
modifies the original array which violates DDAU
2026-02-03 09:31:17 +10:00
Régis Hanol 148c0dc25b DEV: Fix DDAU violations in upsert-category form components (#37383)
Converts the upsert-category panel components (appearance, general,
security, settings, tags) from legacy Ember patterns to modern Glimmer
components with proper Data Down, Actions Up (DDAU) architecture.

Changes include:
- Replace `buildCategoryPanel` base class with standard Glimmer
components
- Convert `@discourseComputed` decorators to native getters with
`@cached`
- Use `this.args.form.set()` for state updates instead of mutating
category
- Remove `TrackedObject` usage in favor of plain objects with spread
operators
- Extract `UpsertCategoryPermissionRow` as a standalone DDAU-compliant
component
- Use immutable array methods (`.toSorted()`, `.map()`, `.filter()`)
throughout
- Read form state from `transientData` for proper reactivity
2026-02-02 22:29:36 +01:00
Kris fb5892408e UX: show all quote share buttons by default (#37417)
We had a bit of an odd animation for this on hover, and really it seems
more trouble than it's worth! there are some hover edge cases/jitter,
and if you go to click share without knowing about this functionality...
you can accidentally click on one of the buttons that appears on hover.

We can expose all share buttons by default and simplify

Before (buttons only appear when hovering over share):
<img width="425" height="96" alt="image"
src="https://github.com/user-attachments/assets/686fbab9-13fd-4580-b8b2-0a1585794f18"
/>
<img width="396" height="93" alt="image"
src="https://github.com/user-attachments/assets/0ce45b29-b5c1-4c84-b143-1bbf9214daa1"
/>


After (buttons always appear):
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/fe59639a-79c7-4a70-bbe8-c7a7fad0c35d"
/>
2026-02-02 13:32:54 -05:00
Kris 17636a66b1 UX: adjust text and fix alignment for simplified category creation (#37454)
For category creation when `enable_simplified_category_creation` is
enabled

Updates the text for the public/private options, and fixes group input
width on mobile

Before:
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/133278c6-fd87-4b4f-ba60-f2582ada58d5"
/>

After:
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/2d588ddb-3da4-4202-8c98-945ce8d2fd0a"
/>
2026-02-02 13:02:18 -05:00
Régis Hanol d6afd3de93 FIX: sort tags by name when tags_sort_alphabetically is enabled (#37363)
Follow-up to #37339.

The previous fix addressed sorting when clicking the "sort by name"
button, but missed the initialization path when the
`tags_sort_alphabetically` site setting is enabled. Tags were still
being sorted by `id` instead of `name` on initial page load.

This also adds tests for both sorting paths (site setting and manual
toggle) to prevent regressions.

Ref - https://meta.discourse.org/t/394485
2026-02-02 18:18:48 +01:00
Kris ecae4a6ae3 FIX: switch to toSorted to avoid mutating original emoji array (#37450)
Related to
https://meta.discourse.org/t/admin-config-emoji-non-responsive-locks-up/394857

After uploading an emoji I can see an error on the index, 

>  Error: Assertion Failed: You attempted to update `_value` on
`TrackedStorageImpl`, but it had already been used previously in the
same computation.
Attempting to update a value after using it in a computation can cause
logical errors,
infinite revalidation bugs, and performance issues, and is not
supported.
 
`sort` mutates the array in-place, `toSorted` returns a new array
2026-02-02 11:16:43 -05:00
Kris cdc0023975 DEV: remove wrapping span from before-topic-progress outlet (#37449)
This removes a span tag that can sometimes get in the way
2026-02-02 10:55:04 -05:00
Penar Musaraj aab48a88f1 UX: Improve styling of Apps section in Profile > Security (#37408) 2026-02-02 10:01:12 -05:00
Jarek Radosz 6b000b0044 DEV: Fix/LTTF require-tagless-components lint (#37422)
(best reviewed w/ whitespace diffs disabled)
2026-02-02 13:53:50 +01:00
Sam edd8ff1e00 Revert "Partial revert "DEV: fix a large amount of typos (#37428)" (#37442)" (#37447)
@discourse-translator-bot keep_translations
2026-02-02 13:40:11 +01:00
Joffrey JAFFEUX 9d40d63e92 DEV: consistently return boolean in hasPastEntries (#37444)
Technically returning undefined had a correct behavior in the code, but
given the naming of the function `hasPastEntries`, always returning a
boolean is more appropriate.
2026-02-02 12:03:12 +01:00
Jarek Radosz f4385ea464 Partial revert "DEV: fix a large amount of typos (#37428)" (#37442) 2026-02-02 11:53:15 +01:00
Sam a1c2ac845d DEV: fix a large amount of typos (#37428) 2026-02-02 16:31:58 +11:00
Martin Brennan effce878c5 FIX: Minor upcoming change bugs/edge cases (#37425)
Found with automated AI review, all legit minor issues.

* Avoid notifying admins about upcoming changes they already
  opted into
* Cache upcomingChanges getter in UI to avoid recreating TrackedObjects
* Fix previous_value not always stored in Toggle
2026-02-02 12:48:15 +10:00
Natalie Tay 9e99066b07 DEV: Expand top_tags, topic.tags, etc, to return an array of tag objects instead of tag names (#36678)
Currently in several endpoints, we return an array of strings for tags.
Our goal with this PR is to expand array tag name strings to an array of
tag objects.

#### before: Tags were returned as string arrays
```
{ "tags": ["support", "bug-report"] }
```

#### after: Tags are returned as object arrays
```
{ "tags": [{"id": 12, "name": "support", "slug": "support"}, {"id": 13, "name": "bug-report", "slug": "bug-report"}] }
```

This allows us to start referencing tags by their ids, and return more
information for a tag for future features.

This commit involves updating several areas:
- topic lists (/latest.json, /top.json, /c/:category/:id.json, etc, for
`top_tags`)
- tag chooser components (`MiniTagChooser`, `TagDrop`, etc)
- topic view (/t/:id.json)
- tag groups (/tag_groups.json, tags, parent_tag)
- category settings
- staff action logs
- synonyms
- ...

APIs that reference tags based on their names will still be supported
with a deprecation warning. Moving on, we will reference them using
their tag ids.
2026-02-02 10:03:02 +08:00
Martin Brennan 42da6860fd DEV: Migrate existing experiments to upcoming changes (#37401)
- **DEV: Migrate experimental_impersonation to upcoming changes**
- **DEV: Migrate experimental_form_templates to upcoming changes**
- **DEV: Migrate experimental_auto_grid_images to upcoming changes**
2026-02-02 11:08:12 +10:00
Jarek Radosz 4713e3abc8 DEV: Remove two unused components (#37423) 2026-02-01 12:11:02 +01:00