From 519abe4fc2f2b09de63e0ea86160edea59325486 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 17 Apr 2026 19:30:13 +0200 Subject: [PATCH] Fixed changelog encoding & prepared re-release v26.4.1 (#745) --- .github/workflows/build-and-release.yml | 45 ++++++++++++------- .../Assistants/I18N/allTexts.lua | 3 ++ .../Components/Changelog.Logs.cs | 2 +- .../plugin.lua | 3 ++ .../plugin.lua | 3 ++ .../Tools/Services/RustService.Updates.cs | 18 ++++++++ .../Tools/Services/UpdateService.cs | 21 ++++++++- .../wwwroot/changelog/v26.4.1.md | 3 +- metadata.txt | 4 +- 9 files changed, 80 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 60963a27..60b4b947 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -976,25 +976,36 @@ jobs: FORMATTED_BUILD_TIME: ${{ needs.read_metadata.outputs.formatted_build_time }} CHANGELOG: ${{ needs.read_metadata.outputs.changelog }} - run: | + run: | # Read the platforms JSON, which was created in the previous step: platforms=$(cat $GITHUB_WORKSPACE/.updates/platforms.json) - - # Replace newlines in changelog with \n - changelog=$(echo "$CHANGELOG" | awk '{printf "%s\\n", $0}') - - # Escape double quotes in changelog: - changelog=$(echo "$changelog" | sed 's/"/\\"/g') - - # Create the latest.json file: - cat < $GITHUB_WORKSPACE/release/assets/latest.json - { - "version": "$FORMATTED_VERSION", - "notes": "$changelog", - "pub_date": "$FORMATTED_BUILD_TIME", - "platforms": $platforms - } - EOOOF + + # Create the latest.json file via jq so the changelog is escaped as valid JSON. + jq -n \ + --arg version "$FORMATTED_VERSION" \ + --arg notes "$CHANGELOG" \ + --arg pub_date "$FORMATTED_BUILD_TIME" \ + --argjson platforms "$platforms" \ + '{ + version: $version, + notes: $notes, + pub_date: $pub_date, + platforms: $platforms + }' > $GITHUB_WORKSPACE/release/assets/latest.json + + - name: Validate latest.json + env: + CHANGELOG: ${{ needs.read_metadata.outputs.changelog }} + + run: | + # Ensure the generated file is valid JSON and the changelog round-trips unchanged. + jq -e . $GITHUB_WORKSPACE/release/assets/latest.json > /dev/null + + generated_notes=$(jq -r '.notes' $GITHUB_WORKSPACE/release/assets/latest.json) + if [[ "$generated_notes" != "$CHANGELOG" ]]; then + echo "The generated notes field does not match the changelog input." + exit 1 + fi - name: Show all release assets run: ls -Rlhat $GITHUB_WORKSPACE/release/assets diff --git a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua index 73a9c8ee..07569e09 100644 --- a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua +++ b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua @@ -7513,6 +7513,9 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::RUSTSERVICE::T4007657575"] = "Failed -- No update found. UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T1015418291"] = "No update found." +-- Failed to check for updates. Please try again later. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T1064148123"] = "Failed to check for updates. Please try again later." + -- Failed to install update automatically. Please try again manually. UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T3709709946"] = "Failed to install update automatically. Please try again manually." diff --git a/app/MindWork AI Studio/Components/Changelog.Logs.cs b/app/MindWork AI Studio/Components/Changelog.Logs.cs index 191935a4..02d21b52 100644 --- a/app/MindWork AI Studio/Components/Changelog.Logs.cs +++ b/app/MindWork AI Studio/Components/Changelog.Logs.cs @@ -13,7 +13,7 @@ public partial class Changelog public static readonly Log[] LOGS = [ - new (235, "v26.4.1, build 235 (2026-04-17 09:48 UTC)", "v26.4.1.md"), + new (235, "v26.4.1, build 235 (2026-04-17 17:25 UTC)", "v26.4.1.md"), new (234, "v26.2.2, build 234 (2026-02-22 14:16 UTC)", "v26.2.2.md"), new (233, "v26.2.1, build 233 (2026-02-01 19:16 UTC)", "v26.2.1.md"), new (232, "v26.1.2, build 232 (2026-01-25 14:05 UTC)", "v26.1.2.md"), diff --git a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua index b844c0e4..b65b6552 100644 --- a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua @@ -7515,6 +7515,9 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::RUSTSERVICE::T4007657575"] = "Abrufe -- No update found. UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T1015418291"] = "Kein Update gefunden." +-- Failed to check for updates. Please try again later. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T1064148123"] = "Die Suche nach Updates ist fehlgeschlagen. Bitte versuchen Sie es später erneut." + -- Failed to install update automatically. Please try again manually. UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T3709709946"] = "Fehler bei der automatischen Installation des Updates. Bitte versuchen Sie es manuell erneut." diff --git a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua index a64b11df..434c6aa3 100644 --- a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua @@ -7515,6 +7515,9 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::RUSTSERVICE::T4007657575"] = "Failed -- No update found. UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T1015418291"] = "No update found." +-- Failed to check for updates. Please try again later. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T1064148123"] = "Failed to check for updates. Please try again later." + -- Failed to install update automatically. Please try again manually. UI_TEXT_CONTENT["AISTUDIO::TOOLS::SERVICES::UPDATESERVICE::T3709709946"] = "Failed to install update automatically. Please try again manually." diff --git a/app/MindWork AI Studio/Tools/Services/RustService.Updates.cs b/app/MindWork AI Studio/Tools/Services/RustService.Updates.cs index 1686b777..fdf2a211 100644 --- a/app/MindWork AI Studio/Tools/Services/RustService.Updates.cs +++ b/app/MindWork AI Studio/Tools/Services/RustService.Updates.cs @@ -10,6 +10,22 @@ public sealed partial class RustService { var cts = new CancellationTokenSource(TimeSpan.FromSeconds(45)); var response = await this.http.GetFromJsonAsync("/updates/check", this.jsonRustSerializerOptions, cts.Token); + + if (response == default) + { + this.logger!.LogError("Failed to check for an update: the Rust endpoint returned an empty response."); + return new UpdateResponse + { + Error = true, + UpdateIsAvailable = false, + NewVersion = string.Empty, + Changelog = string.Empty + }; + } + + if (response.Error) + this.logger!.LogWarning("The Rust updater reported an error while checking for updates."); + this.logger!.LogInformation($"Checked for an update: update available='{response.UpdateIsAvailable}'; error='{response.Error}'; next version='{response.NewVersion}'; changelog len='{response.Changelog.Length}'"); return response; } @@ -20,6 +36,8 @@ public sealed partial class RustService { Error = true, UpdateIsAvailable = false, + NewVersion = string.Empty, + Changelog = string.Empty }; } } diff --git a/app/MindWork AI Studio/Tools/Services/UpdateService.cs b/app/MindWork AI Studio/Tools/Services/UpdateService.cs index 8c0e8565..4a873242 100644 --- a/app/MindWork AI Studio/Tools/Services/UpdateService.cs +++ b/app/MindWork AI Studio/Tools/Services/UpdateService.cs @@ -16,14 +16,16 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver private readonly SettingsManager settingsManager; private readonly MessageBus messageBus; private readonly RustService rust; + private readonly ILogger logger; private TimeSpan updateInterval; - public UpdateService(MessageBus messageBus, SettingsManager settingsManager, RustService rust) + public UpdateService(MessageBus messageBus, SettingsManager settingsManager, RustService rust, ILogger logger) { this.settingsManager = settingsManager; this.messageBus = messageBus; this.rust = rust; + this.logger = logger; this.messageBus.RegisterComponent(this); this.ApplyFilters([], [ Event.USER_SEARCH_FOR_UPDATE ]); @@ -113,6 +115,23 @@ public sealed class UpdateService : BackgroundService, IMessageBusReceiver return; var response = await this.rust.CheckForUpdate(); + if (response.Error) + { + this.logger.LogWarning("Update check failed. The updater did not return a usable result."); + + if (notifyUserWhenNoUpdate) + { + SNACKBAR!.Add(TB("Failed to check for updates. Please try again later."), Severity.Error, config => + { + config.Icon = Icons.Material.Filled.Error; + config.IconSize = Size.Large; + config.IconColor = Color.Error; + }); + } + + return; + } + if (response.UpdateIsAvailable) { // ReSharper disable RedundantAssignment diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md b/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md index 6143b38e..3ff00c6a 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md @@ -1,4 +1,4 @@ -# v26.4.1, build 235 (2026-04-17 09:48 UTC) +# v26.4.1, build 235 (2026-04-17 17:25 UTC) - Added support for the latest AI models, e.g., Qwen 3.5 & 3.6-family, Mistral Large 3 & Small 4, OpenAI GPT 5.4, Claude Opus 4.7 etc. - Added assistant plugins, making it possible to extend AI Studio with custom assistants. Many thanks to Nils Kruthof `nilskruthoff` for this contribution. - Added a slide planner assistant, which helps you turn longer texts or documents into clear, structured presentation slides. Many thanks to Sabrina `Sabrina-devops` for her wonderful work on this assistant. @@ -29,6 +29,7 @@ - Improved the translation assistant by updating the system and user prompts. - Improved how results from assistants are transferred into chats, so follow-up conversations now show clearer context while keeping the chat easier to understand. - Improved OpenAI-compatible providers by refactoring their streaming request handling to be more consistent and reliable. +- Improved the app update check so malformed update metadata is handled more reliably and users now receive a clear error message instead of a misleading "No update found" response. - Fixed an issue where assistants hidden via configuration plugins still appear in "Send to ..." menus. Thanks, Gunnar, for reporting this issue. - Fixed an issue with chat templates that could stop working because the stored validation result for attached files was reused. AI Studio now checks attached files again when you use a chat template. - Fixed an issue with voice recording where AI Studio could log errors and keep the feature available even though required parts failed to initialize. Voice recording is now disabled automatically for the current session in that case. diff --git a/metadata.txt b/metadata.txt index 53e6d28f..d6cfb34a 100644 --- a/metadata.txt +++ b/metadata.txt @@ -1,12 +1,12 @@ 26.4.1 -2026-04-17 09:48:42 UTC +2026-04-17 17:25:44 UTC 235 9.0.116 (commit fb4af7e1b3) 9.0.15 (commit 4250c8399a) 1.93.1 (commit 01f6ddf75) 8.15.0 1.8.3 -0c87a491ace, release +c6ed7e3c0ce, release osx-arm64 144.0.7543.0 1.17.1 \ No newline at end of file