In #33558 we removed automatic_backups_enabled setting, and instead rely on backup_frequency being blank to disable.
There was a big oversight there with the site setting type system, which will coerce the value to an integer. It also makes it so you can't blank the value out in the UI.
This is a "fix forward" solution where instead of "set to blank to disable" we do "set to 0 to disable". This works along the grain of the site setting type system for a workable fix where we don't have to deal with the irreversible migration in the previous change.
We can potentially go and add in "nullable" to the type system at a later point.
We're removing the automatic_backups_enabled toggle and depending solely on the backup_frequency value. This PR replaces the setting and adds a migration for any forum that has automatic_backups_enabled disabled.
Shortened AI agent file, so we conserve tokens
Use symlinks for all agent files where needed to avoid round trips to
llm
Added config for Open AI Codex / Gemini and Cursor
This commit responds to feedback in the Discourse Meta discussion
https://meta.discourse.org/t/monospace-font-in-the-markdown-only-editor/359936
This change introduces a user preference that allows users to choose
whether the Markdown editor uses a monospace font. The default setting
is `true` for new sites, but set to `false` for existing sites to avoid
disrupting current users' experiences.
Admins can change the `default_other_enable_markdown_monospace_font`
site setting to manage this for all users.
Building the Discourse ember app is resource-intensive process. This
commit introduces a framework for us to build these assets centrally,
and make them available for people to download.
On every commit to `main`, a new GitHub actions workflow will build
development & production versions of the core assets, and publish them
as a github release under the `discourse/discourse-assets` repository. A
separate repository is being used to avoid polluting the main
`discourse/discourse` repository with one-git-tag-per-release.
The `assemble_ember_build.rb` script is updated to fetch the relevant
asset bundle. Requests are made to `get.discourse.org`, which then
redirects to GitHub releases. This redirection service is being used so
that we have the option to switch away from GitHub releases in future
without breaking existing Discourse installations.
For now, this behavior can be enabled by setting
`DISCOURSE_DOWNLOAD_PRE_BUILT_ASSETS=1`. In the near future, we hope to
make this the default, with opt-out via
`DISCOURSE_DOWNLOAD_PRE_BUILT_ASSETS=0`.
We believe the rich editor is a great experience for the
vast majority of sites and users, so we are enabling it
for all sites and all users by default.
This commit does the following:
* Hides the rich_editor site setting and sets it to true by default.
It can still be overridden by sites that want to disable it
completely.
* Sets `rich_editor` to true for all sites to enable the rich editor
everywhere.
* Adds a new `default_composition_mode` site setting and corresponding
user option that defaults to Rich for all users. The other option is
Markdown.
* Changes the rich editor toggle in the composer to use the new
database-backed user option (`composition_mode`) instead of a local
storage key/value store. This makes the preference persistent
across devices.
Existing key/value store settings for the markdown toggle are
kept, the preference will be saved to the user option automatically.
This change makes it easier to review failed uploads, especially
downloadable ones, by standardizing `skip_reason` and adding a
`skip_details` column to the uploads DB's `uploads` table for extended
failure information.
1. Ensure `Creating optimized images...` message is only available
during optimization
2. Guard upload lookup for optimization
3. Replace undefined `stacktrace` method invocation with `backtrace`
This PR improves the generic bulk import and base scripts by adding
support for several previously unimplemented features and attributes:
- Category Moderation Groups: Implements the import of group-based
moderation settings for categories.
- Group Attributes: Adds import support for public_admission,
public_exit, allow_membership_requests, and assignable_level.
- User Attributes: Adds import support for trust_level and
primary_group_id.
- User Option: Adds import support for the hide_profile_and_presence
user option.
- Multiple Tag Groups per Tag: Updates tag import logic to handle tags
belonging to multiple tag groups.
This commit introduces new features and utilities related to the backup
and restore system that make use of remote URLs:
- `discourse restore` accepts a URL to a backup file
- `discourse backup_url` generates a URL of a backup file (S3 only)
- `discourse import_backup_url` downloads a backup file from a URL to
the configured backup store
This can be used to move content between two Discourse instances by
backing up the entire site, copying the backup URL, importing or
restoring it on the other instance.
This PR addresses a problem with the Xenforo importer.
Xenforo has moved from "likes" table and now calls the same table
"reactions" table. Similarly the columns has been also renamed.
With this PR, the importer is upgraded to use the latest naming.
Signed-off-by: Abhiram Shibu <abhiramshibu1998@gmail.com>
Extend the `import_site_settings` import step to enable the
`migrated_site` flag if possible.
It also includes an escape hatch via the
`SKIP_MIGRATED_SITE_FLAG_UPDATE` flag for cases where you really don't
want to toggle it on.
Building the Discourse JS app is very resource-intensive. This commit
introduces an `assemble_ember_build` script which will check the
existing content of the `dist/` directory and re-use the core build if
possible. Plugins will always be rebuilt.
For now, this functionality is only useful for multi-stage (i.e.
non-standard) Discourse deployments. But in future, this script may be
extended to pull the contents of the `dist/` directory from a remote
location.
Ensure `last_read_post_number` is set to the latest post for imported
topic users with a `watching` notification level, even if they haven't
engaged with the topic
Redis / Valkey over TLS requires authentication involving both a
username and a password.
On most instances, the default username is `default`, but this allows
Discourse to provide its own.
Empty slugs for topics break Discourse. This makes sure that we always
fall back to "topic" as default. And it also uses the configured slug
generation method instead of always using ASCII.
This is the first in a series of PRs to introduce a
ProseMirror-based
WYSIWYM editor experience
alongside our current textarea Markdown editor.
Behind a hidden site setting, this PR adds a toggle to the composer
toolbar, allowing users to switch between the two options.
Our implementation builds upon the excellent ProseMirror and its
non-core Markdown
module, using the
module's schema, parsing, and serialization definitions as the base for
further Discourse-specific features.
An extension API is included to enable further customizations.
The necessary extensions to support all Discourse's core and core
plugins features **will be implemented in subsequent PRs**.
---------
Co-authored-by: David Taylor <david@taylorhq.com>
Nokogiri/libxml is now more strict in terms of params it receives.
It uses kwargs vs options object (I fixed an issue there in #30545) doesn't accept nil/blank html (fixed here) and most importantly handles encoding in a different way. It seems to require explicitly specifying UTF8.
* Build(deps): Bump nokogiri from 1.16.8 to 1.18.1
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.8 to 1.18.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.8...v1.18.1)
---
updated-dependencies:
- dependency-name: nokogiri
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This will help us keep consistency with things that we've decided to rename. Initial rules are for "color scheme" -> "color palette", and "private message" -> "personal message".
Also updates some remaining occurences of "color scheme" in our translation files.
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
Following a recent commit (cb4b8146a3),
the benchmark script wasn’t working anymore (and the related rake task).
This patch fixes it. It also adds some information about Ruby YJIT being
enabled or not.
* This commits ports the personal messages conversion step from smf1.rb into smf2.rb
* Improves error handling for skipped messages
* also adds a brief explanation for possible improvements to topic matching in PMs
It splits the hide_profile_and_presence user option and the default_hide_profile_and_presence site setting for more granular control. It keeps the option to hide the profile under /u/username/preferences/interface and adds the presence toggle in the quick user menu.
Co-authored-by: Régis Hanol <regis@hanol.fr>