Skip to content

AU_BUILD_CLOUD_AUDIOCOM OFF build works - #10578

Merged
luapmartin merged 9 commits into
audacity:masterfrom
luapmartin:luapmartin/10364
Apr 1, 2026
Merged

luapmartin merged 9 commits into
audacity:masterfrom
luapmartin:luapmartin/10364

Conversation

@luapmartin

@luapmartin luapmartin commented Mar 20, 2026 •

Copy link
Copy Markdown
Contributor

Resolves: Project does not compile if AU_BUILD_CLOUD_AUDIOCOM is disabled #10364

  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior
  • no cloud option should be accessible from the non-cloud build

QA:

  • Autobot test cases have been run

@luapmartin
luapmartin requested a review from kryksyh March 20, 2026 17:00
@luapmartin luapmartin self-assigned this Mar 20, 2026
@luapmartin

Copy link
Copy Markdown
Contributor Author

@kryksyh I would like to know if a weekly Monday morning build with that AU_BUILD_CLOUD_AUDIOCOM flag turned OFF would make sense on CI to catch regression quickly?

@luapmartin luapmartin linked an issue Mar 20, 2026 that may be closed by this pull request
Comment thread src/app/appfactory.cpp Resolved
@luapmartin
luapmartin force-pushed the luapmartin/10364 branch 2 times, most recently from d54fc35 to cded2e3 Compare March 28, 2026 22:46
@coderabbitai

coderabbitai Bot commented Mar 30, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Cloud features can now be selectively enabled or disabled at build time.
    • Added cloud configuration service for managing cloud project paths and export settings.
  • Refactor

    • Cloud-dependent UI elements (tabs, buttons, pages) now conditionally appear based on cloud availability.
    • Cloud service dependencies abstracted with stub implementations for builds with cloud support disabled.

Walkthrough

Build-time flag AU_BUILD_CLOUD_AUDIOCOM now controls whether the real au3cloud module or stub module is built/registered. A new IAu3CloudConfiguration interface and Au3CloudConfiguration implementation were added and registered when the real module is present; corresponding stub implementations exist for the stub module. IAu3AudioComService gained enabled() with real returning true and stub returning false. Multiple UI/QML components and toolbar/menu models were changed to check the runtime enabled() and to lazily load cloud QML via Loaders; cloud operations early-return when disabled.

Sequence Diagram(s)

sequenceDiagram
    participant UI as Client/UI
    participant Comp as App Component
    participant Service as IAu3AudioComService
    participant Config as IAu3CloudConfiguration
    participant Backend as Cloud Backend

    UI->>Comp: Request cloud operation (save/share/open)
    Comp->>Service: enabled()
    alt Service enabled
        Service-->>Comp: true
        Comp->>Config: cloudProjectsPath()
        Config->>Backend: Query config/storage
        Backend-->>Config: Config/paths
        Config-->>Comp: Return data
        Comp->>Service: performCloudOperation(...)
        Service->>Backend: Execute operation
        Backend-->>Service: Result
        Service-->>Comp: Success/Result
        Comp-->>UI: Return success/result
    else Service disabled
        Service-->>Comp: false
        Comp->>Comp: Log "Cloud support not available"
        Comp-->>UI: Return NotSupported/false/null
    end
Loading
sequenceDiagram
    participant Build as CMake Build
    participant IoC as IoC Container
    participant App as Application
    participant Real as au3cloud (real)
    participant Stub as au3cloud (stub)

    Build->>Build: Evaluate AU_BUILD_CLOUD_AUDIOCOM
    alt Flag ON
        Build->>Real: add_subdirectory(au3cloud)
        Real->>IoC: register IAu3CloudConfiguration (real)
        Real->>IoC: register IAu3AudioComService (real)
        App->>IoC: inject real dependencies
    else Flag OFF
        Build->>Stub: add_subdirectory(stubs/au3cloud)
        Stub->>IoC: register IAu3CloudConfiguration (stub)
        Stub->>IoC: register IAu3AudioComService, IAuthorization, IUsageInfo (stubs)
        App->>IoC: inject stub dependencies
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main objective: enabling builds when AU_BUILD_CLOUD_AUDIOCOM is disabled.
Description check ✅ Passed The description fully completes the required template with issue link, purpose explanation, and all checklist items addressed by the author.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/appshell/qml/Audacity/AppShell/HomePage/HomePage.qml (1)

48-56: ⚠️ Potential issue | 🟡 Minor

Guard the "account" route when cloud QML is absent.

onSetParamsRequested can still select "account" programmatically, but in an AU_BUILD_CLOUD_AUDIOCOM=OFF build AccountPage.qml is not bundled and the Loader just leaves the center empty. Fall back to "projects" (or ignore the request) when !projectsPageHelper.cloudEnabled.

Possible fix
     function setCurrentCentral(name) {
-        if (section === name || !Boolean(name)) {
+        if (!Boolean(name)) {
             return
         }
+        if (name === "account" && !projectsPageHelper.cloudEnabled) {
+            name = "projects"
+        }
+        if (section === name) {
+            return
+        }
 
         section = name

Also applies to: 69-78, 114-118

src/project/qml/Audacity/Project/ProjectsPage.qml (1)

57-60: ⚠️ Potential issue | 🟠 Major

Clamp cloud-only tab indices when cloudEnabled is false.

When tabBar.currentIndex is 1 or 2, hiding the two cloud tab buttons does not stop contentLoader and refreshButton from using those indices. In the off build that still instantiates the cloud loaders, so the page can come up blank with a visible Refresh action. Reset the index to 0 whenever cloud tabs are unavailable, and guard the loader/refresh visibility off the same condition.

Possible fix
     Component.onCompleted: {
-        tabBar.currentIndex = projectsPageModel.tabIndex
+        tabBar.currentIndex = projectsPageModel.cloudEnabled
+            ? projectsPageModel.tabIndex
+            : 0
         tabBar.completed = true
     }
@@
-            visible: tabBar.currentIndex === 1 || tabBar.currentIndex === 2
+            visible: projectsPageModel.cloudEnabled
+                     && (tabBar.currentIndex === 1 || tabBar.currentIndex === 2)
@@
-            return [newAndRecentComp, cloudProjectsComp, cloudAudioFilesComp][tabBar.currentIndex]
+            if (!projectsPageModel.cloudEnabled && tabBar.currentIndex > 0) {
+                return newAndRecentComp
+            }
+            return [newAndRecentComp, cloudProjectsComp, cloudAudioFilesComp][tabBar.currentIndex]

Also applies to: 161-177, 190-200, 245-260

🧹 Nitpick comments (3)
au3/libraries/CMakeLists.txt (1)

115-120: Consider moving au3-network-manager into the base ordered list.

You made it unconditional (good), but keeping it in the late append section can drift from the file’s stated dependency-order convention. Putting it directly in the main LIBRARIES list near its consumers will keep ordering intent explicit.

♻️ Suggested cleanup
 set( LIBRARIES
@@
-   au3-wave-track-fft
-   au3-musehub
+   au3-wave-track-fft
+   au3-network-manager
+   au3-musehub
 )
@@
-# au3-network-manager is a general networking library used by au3-musehub
-# and other modules, so it must be built unconditionally.
-list( APPEND LIBRARIES au3-network-manager)
-
 if (AU_BUILD_CLOUD_AUDIOCOM)
    list( APPEND LIBRARIES au3-url-schemes au3-cloud-audiocom)
 endif()
src/stubs/au3cloud/au3cloudstubmodule.h (1)

13-29: Add a CI leg for the stub module path.

This header introduces a distinct module/context wiring for AU_BUILD_CLOUD_AUDIOCOM=OFF. A build-matrix job that compiles this configuration on every PR would catch missing exports and QML/resource drift early.

src/stubs/au3cloud/au3audiocomservicestub.h (1)

25-31: Consider removing repeated default arguments from override declarations.

Default parameter values are already specified in the base interface (IAu3AudioComService). Repeating them in the override creates a maintenance risk—if the interface defaults change, these could become inconsistent.

♻️ Suggested simplification
-    muse::ProgressPtr uploadProject(au::project::IAudacityProjectPtr project, const std::string& name,
-                                    std::function<bool()> projectSaveCallback = nullptr, bool forceOverwrite = false) override;
+    muse::ProgressPtr uploadProject(au::project::IAudacityProjectPtr project, const std::string& name,
+                                    std::function<bool()> projectSaveCallback, bool forceOverwrite) override;
     muse::ProgressPtr shareAudio(const std::string& title) override;
 
-    muse::ProgressPtr openCloudProject(const muse::io::path_t& localPath, const std::string& projectId = {},
-                                       bool forceOverwrite = false) override;
+    muse::ProgressPtr openCloudProject(const muse::io::path_t& localPath, const std::string& projectId,
+                                       bool forceOverwrite) override;
     muse::ProgressPtr resumeProjectSync(au::project::IAudacityProjectPtr project) override;

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 7cbf8f2f-1ffc-49f4-9746-e2a7d297e1c0

📥 Commits

Reviewing files that changed from the base of the PR and between 617b304 and 5cf933a57c3f3a0e6605dda3666a7cbf2268f319.

📒 Files selected for processing (44)
  • CMakeLists.txt
  • au3/libraries/CMakeLists.txt
  • src/CMakeLists.txt
  • src/app/appfactory.cpp
  • src/appshell/qml/Audacity/AppShell/CMakeLists.txt
  • src/appshell/qml/Audacity/AppShell/DevTools/DevToolsPage.qml
  • src/appshell/qml/Audacity/AppShell/FirstLaunchSetup/firstlaunchsetupmodel.cpp
  • src/appshell/qml/Audacity/AppShell/FirstLaunchSetup/firstlaunchsetupmodel.h
  • src/appshell/qml/Audacity/AppShell/HomePage/HomeMenu.qml
  • src/appshell/qml/Audacity/AppShell/HomePage/HomePage.qml
  • src/appshell/qml/Audacity/AppShell/PublishPage/publishtoolbarmodel.cpp
  • src/appshell/qml/Audacity/AppShell/PublishPage/publishtoolbarmodel.h
  • src/appshell/qml/Audacity/AppShell/welcomedialogmodel.h
  • src/au3cloud/CMakeLists.txt
  • src/au3cloud/au3cloudmodule.cpp
  • src/au3cloud/au3cloudmodule.h
  • src/au3cloud/iau3audiocomservice.h
  • src/au3cloud/iau3cloudconfiguration.h
  • src/au3cloud/internal/au3audiocomservice.cpp
  • src/au3cloud/internal/au3audiocomservice.h
  • src/au3cloud/internal/au3cloudconfiguration.cpp
  • src/au3cloud/internal/au3cloudconfiguration.h
  • src/importexport/export/internal/au3/au3exporter.cpp
  • src/importexport/export/internal/au3/au3exporter.h
  • src/project/internal/projectactionscontroller.cpp
  • src/project/internal/projectconfiguration.cpp
  • src/project/internal/projectconfiguration.h
  • src/project/qml/Audacity/Project/ProjectsPage.qml
  • src/project/view/projectspagemodel.cpp
  • src/project/view/projectspagemodel.h
  • src/projectscene/view/toolbars/projecttoolbarmodel.cpp
  • src/projectscene/view/toolbars/projecttoolbarmodel.h
  • src/stubs/CMakeLists.txt
  • src/stubs/au3cloud/CMakeLists.txt
  • src/stubs/au3cloud/au3audiocomservicestub.cpp
  • src/stubs/au3cloud/au3audiocomservicestub.h
  • src/stubs/au3cloud/au3cloudconfigurationstub.cpp
  • src/stubs/au3cloud/au3cloudconfigurationstub.h
  • src/stubs/au3cloud/au3cloudstubmodule.cpp
  • src/stubs/au3cloud/au3cloudstubmodule.h
  • src/stubs/au3cloud/authorizationstub.cpp
  • src/stubs/au3cloud/authorizationstub.h
  • src/stubs/au3cloud/usageinfostub.cpp
  • src/stubs/au3cloud/usageinfostub.h
💤 Files with no reviewable changes (1)
  • src/appshell/qml/Audacity/AppShell/welcomedialogmodel.h

@@ -66,8 +63,8 @@ qt_add_qml_module(appshell_qml
FirstLaunchSetup/WorkspaceLayoutPage.qml
FirstLaunchSetup/SigninAudiocomPage.qml
FirstLaunchSetup/AppUpdatesAndUsageInfoPage.qml
SigninAudiocomDialog.qml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if SigninAudiocomDialog.qml has cloud-specific dependencies
fd -t f "SigninAudiocomDialog.qml" --exec cat {} \; | head -100

Repository: audacity/audacity

Length of output: 1220


🏁 Script executed:

# Find SigninAudiocomPage definition and check its location
fd -t f "SigninAudiocomPage.*" -x echo {}

# Also check the CMakeLists.txt context around the problematic line
fd -t f "CMakeLists.txt" -path "*/AppShell/*" -x cat {} | head -100

Repository: audacity/audacity

Length of output: 323


🏁 Script executed:

# Search for where SigninAudiocomPage is conditionally included
rg "SigninAudiocomPage" --type cmake --type qml -B 3 -A 3

Repository: audacity/audacity

Length of output: 1897


🏁 Script executed:

# Check if AU_BUILD_CLOUD_AUDIOCOM is used to gate other similar files
rg "AU_BUILD_CLOUD_AUDIOCOM" --type cmake -B 2 -A 2

Repository: audacity/audacity

Length of output: 1532


🏁 Script executed:

cat -n src/appshell/qml/Audacity/AppShell/CMakeLists.txt

Repository: audacity/audacity

Length of output: 6156


🏁 Script executed:

# Also check SigninAudiocomPage.qml for cloud-specific dependencies
cat -n src/appshell/qml/Audacity/AppShell/FirstLaunchSetup/SigninAudiocomPage.qml | head -50

Repository: audacity/audacity

Length of output: 2838


🏁 Script executed:

cat -n src/appshell/qml/Audacity/AppShell/FirstLaunchSetup/SigninAudiocomPage.qml | tail -50

Repository: audacity/audacity

Length of output: 2333


🏁 Script executed:

# Check the C++ model for cloud dependencies
cat -n src/appshell/qml/Audacity/AppShell/FirstLaunchSetup/signinaudiocompagemodel.h

Repository: audacity/audacity

Length of output: 2368


🏁 Script executed:

# Check where SigninAudiocomDialog is actually used in the codebase
rg "SigninAudiocomDialog" -A 2 -B 2

Repository: audacity/audacity

Length of output: 1516


Gate SigninAudiocomDialog.qml and related components behind AU_BUILD_CLOUD_AUDIOCOM.

The file depends on SigninAudiocomPageModel, which injects au3cloud::IAuthorization (see signinaudiocompagemodel.h line 20). This cloud-specific type will not be available when AU_BUILD_CLOUD_AUDIOCOM is disabled, causing runtime failures. Move the file and SigninAudiocomPage.qml into the conditional block in CMakeLists.txt alongside other cloud-only QML files, and also guard the C++ model sources (signinaudiocompagemodel.cpp/h).

Comment on lines +119 to +122
{
"name": "cloud",
"title": "Cloud Tests"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Runtime error when AU_BUILD_CLOUD_AUDIOCOM=OFF: Loader source file won't exist.

The "cloud" menu entry is always visible (lines 119-122), but Cloud/CloudTests.qml is conditionally compiled only when AU_BUILD_CLOUD_AUDIOCOM is ON (per CMakeLists.txt:104-110). When the flag is OFF, clicking "Cloud Tests" will cause a Loader error because the QML file doesn't exist in the QRC.

Consider either:

  1. Exposing a cloudEnabled property to QML and conditionally including the menu item, or
  2. Using Loader.status to handle the missing file gracefully.
Option 1: Conditionally show menu item (preferred)
 model: [
     // ... other entries ...
-    {
-        "name": "cloud",
-        "title": "Cloud Tests"
-    }
+].concat(cloudEnabled ? [{
+    "name": "cloud",
+    "title": "Cloud Tests"
+}] : [])

This requires exposing a cloudEnabled property similar to other pages in this PR.

Option 2: Handle Loader error
 Component {
     id: cloudComp

     Loader {
         source: "Cloud/CloudTests.qml"
+        onStatusChanged: {
+            if (status === Loader.Error) {
+                console.warn("Cloud Tests not available in this build")
+            }
+        }
     }
 }

Also applies to: 177-183

Comment on lines +35 to +53
muse::ProgressPtr Au3AudioComServiceStub::uploadProject(au::project::IAudacityProjectPtr, const std::string&,
std::function<bool()>, bool)
{
return nullptr;
}

muse::ProgressPtr Au3AudioComServiceStub::shareAudio(const std::string&)
{
return nullptr;
}

muse::ProgressPtr Au3AudioComServiceStub::openCloudProject(const muse::io::path_t&, const std::string&, bool)
{
return nullptr;
}

muse::ProgressPtr Au3AudioComServiceStub::resumeProjectSync(au::project::IAudacityProjectPtr)
{
return nullptr;

@coderabbitai coderabbitai Bot Mar 30, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Don't return nullptr from the stubbed progress APIs.

Lines 38, 43, 48, and 53 make the disabled build rely on every caller remembering to null-check. src/project/internal/projectactionscontroller.cpp currently dereferences the results of uploadProject(), shareAudio(), and openCloudProject() via progress->finished() without a guard, so one missed capability check becomes a crash. Return an already-finished failure/canceled muse::ProgressPtr here instead of nullptr.

@embarc-gabriel embarc-gabriel Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luapmartin I'll fix this in my current PR adding the null check

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 13a6d006-64f3-4d0c-94e6-1cbe001cd011

📥 Commits

Reviewing files that changed from the base of the PR and between 5cf933a57c3f3a0e6605dda3666a7cbf2268f319 and 91ef60f89ac1b7d2b0f1882029449b338602e536.

📒 Files selected for processing (1)
  • CMakeLists.txt

Comment thread CMakeLists.txt Outdated
@@ -103,7 +103,10 @@ set(MUSE_MODULE_VST_QML ON)
# Modules (alphabetical order please)
option(AU_BUILD_APPSHELL_MODULE "Build appshell module" ON)
option(AU_BUILD_AUTOMATION_TESTS "Build automation tests" ON)
option(AU_BUILD_CLOUD_AUDIOCOM "Build cloud audiocom module" ON)
option(AU_BUILD_CLOUD_AUDIOCOM "Build cloud audiocom module" OFF)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Defaulting AU_BUILD_CLOUD_AUDIOCOM to OFF changes baseline build behavior.

On Line 106, this flips the default feature state for all unconfigured builds. The objective is to make OFF builds compile, but this also disables cloud audiocom by default, which is a broader behavior change than required.

Suggested adjustment
-option(AU_BUILD_CLOUD_AUDIOCOM "Build cloud audiocom module" OFF)
+option(AU_BUILD_CLOUD_AUDIOCOM "Build cloud audiocom module" ON)

I’d keep the default ON and enforce OFF coverage in CI (e.g., a scheduled OFF build) instead.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
option(AU_BUILD_CLOUD_AUDIOCOM "Build cloud audiocom module" OFF)
option(AU_BUILD_CLOUD_AUDIOCOM "Build cloud audiocom module" ON)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/appshell/qml/Audacity/AppShell/HomePage/HomePage.qml (1)

48-56: ⚠️ Potential issue | 🟠 Major

Guard the account section when AccountPage.qml is compiled out.

HomeMenu hides the account entry when cloudEnabled is false, but setCurrentCentral() still accepts "account" unconditionally. In an AU_BUILD_CLOUD_AUDIOCOM=OFF build, this routes to an accountComp that cannot load—leaving the central panel empty. The issue surfaces via two paths: URI params in onSetParamsRequested (line 50) and section changes in onSectionChanged (line 59), both of which bypass the menu's visibility guard.

Please add a check in setCurrentCentral() to redirect "account" requests to "projects" when cloudEnabled is false.

🔧 Suggested guard
 function setCurrentCentral(name) {
-        if (section === name || !Boolean(name)) {
+        if (!Boolean(name)) {
             return
         }
+        if (!projectsPageHelper.cloudEnabled && name === "account") {
+            name = "projects"
+        }
+        if (section === name) {
+            return
+        }
 
         section = name

Also applies to: 58–60, 114–119

src/project/qml/Audacity/Project/ProjectsPage.qml (1)

57-60: ⚠️ Potential issue | 🟠 Major

Clamp restored tab index to available tabs when cloud is disabled.

When projectsPageModel.tabIndex comes back as 1 or 2 while cloudEnabled is false, this code restores that index and loads the cloud components even though the tabs are hidden. This causes the page to display a cloud view when cloud is unavailable, creating inconsistent UI behavior and potentially loading cloud components without necessary services. Clamp tabBar.currentIndex to the valid range [0, cloudEnabled ? 2 : 0] during initialization, and apply the same guard in sourceComponent before indexing the component array.

♻️ Duplicate comments (2)
src/appshell/qml/Audacity/AppShell/DevTools/DevToolsPage.qml (1)

119-122: ⚠️ Potential issue | 🟠 Major

Cloud Tests remains reachable in OFF builds, but its QML source is conditionally absent.

Line 119-Line 122 always exposes the "cloud" entry, while Line 181 loads "Cloud/CloudTests.qml", which is only added to the QML module when AU_BUILD_CLOUD_AUDIOCOM is ON. In OFF builds this still leads to Loader errors when selected. Please gate the menu entry (preferred) or provide an explicit unavailable fallback for this target.

Also applies to: 180-182

src/stubs/au3cloud/au3audiocomservicestub.cpp (1)

35-39: ⚠️ Potential issue | 🟠 Major

Avoid nullptr for stub progress APIs.

Returning null muse::ProgressPtr makes callers brittle and creates easy crash paths when a guard is missed. Prefer returning a valid already-finished failure/canceled progress object.

Also applies to: 41-44, 46-49, 51-54


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 58721a9f-8ffa-49e0-82e8-14d8f518f736

📥 Commits

Reviewing files that changed from the base of the PR and between 91ef60f89ac1b7d2b0f1882029449b338602e536 and e98a894.

📒 Files selected for processing (44)
  • CMakeLists.txt
  • au3/libraries/CMakeLists.txt
  • src/CMakeLists.txt
  • src/app/appfactory.cpp
  • src/appshell/qml/Audacity/AppShell/CMakeLists.txt
  • src/appshell/qml/Audacity/AppShell/DevTools/DevToolsPage.qml
  • src/appshell/qml/Audacity/AppShell/FirstLaunchSetup/firstlaunchsetupmodel.cpp
  • src/appshell/qml/Audacity/AppShell/FirstLaunchSetup/firstlaunchsetupmodel.h
  • src/appshell/qml/Audacity/AppShell/HomePage/HomeMenu.qml
  • src/appshell/qml/Audacity/AppShell/HomePage/HomePage.qml
  • src/appshell/qml/Audacity/AppShell/PublishPage/publishtoolbarmodel.cpp
  • src/appshell/qml/Audacity/AppShell/PublishPage/publishtoolbarmodel.h
  • src/appshell/qml/Audacity/AppShell/welcomedialogmodel.h
  • src/au3cloud/CMakeLists.txt
  • src/au3cloud/au3cloudmodule.cpp
  • src/au3cloud/au3cloudmodule.h
  • src/au3cloud/iau3audiocomservice.h
  • src/au3cloud/iau3cloudconfiguration.h
  • src/au3cloud/internal/au3audiocomservice.cpp
  • src/au3cloud/internal/au3audiocomservice.h
  • src/au3cloud/internal/au3cloudconfiguration.cpp
  • src/au3cloud/internal/au3cloudconfiguration.h
  • src/importexport/export/internal/au3/au3exporter.cpp
  • src/importexport/export/internal/au3/au3exporter.h
  • src/project/internal/projectactionscontroller.cpp
  • src/project/internal/projectconfiguration.cpp
  • src/project/internal/projectconfiguration.h
  • src/project/qml/Audacity/Project/ProjectsPage.qml
  • src/project/view/projectspagemodel.cpp
  • src/project/view/projectspagemodel.h
  • src/projectscene/view/toolbars/projecttoolbarmodel.cpp
  • src/projectscene/view/toolbars/projecttoolbarmodel.h
  • src/stubs/CMakeLists.txt
  • src/stubs/au3cloud/CMakeLists.txt
  • src/stubs/au3cloud/au3audiocomservicestub.cpp
  • src/stubs/au3cloud/au3audiocomservicestub.h
  • src/stubs/au3cloud/au3cloudconfigurationstub.cpp
  • src/stubs/au3cloud/au3cloudconfigurationstub.h
  • src/stubs/au3cloud/au3cloudstubmodule.cpp
  • src/stubs/au3cloud/au3cloudstubmodule.h
  • src/stubs/au3cloud/authorizationstub.cpp
  • src/stubs/au3cloud/authorizationstub.h
  • src/stubs/au3cloud/usageinfostub.cpp
  • src/stubs/au3cloud/usageinfostub.h
💤 Files with no reviewable changes (1)
  • src/appshell/qml/Audacity/AppShell/welcomedialogmodel.h

Comment thread src/CMakeLists.txt Resolved
Comment on lines +442 to +445
if (!audioComService()->enabled()) {
LOGE() << "Cloud support is not available";
return false;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Deduplicate the repeated cloud-availability guard.

These three blocks are identical. Consider a small helper (e.g., ensureCloudAvailable()) to keep message/behavior consistent in one place.

Also applies to: 796-799, 1002-1005

@luapmartin
luapmartin merged commit b9e70a6 into audacity:master Apr 1, 2026
8 checks passed
@luapmartin
luapmartin deleted the luapmartin/10364 branch April 1, 2026 10:17
@coderabbitai coderabbitai Bot mentioned this pull request Apr 1, 2026
11 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project does not compile if AU_BUILD_CLOUD_AUDIOCOM is disabled

2 participants