Skip to content

Fix the plugin description update (regression)#381

Merged
pierreguillot merged 1 commit intomainfrom
fix/plugin-description-update
Apr 14, 2026
Merged

Fix the plugin description update (regression)#381
pierreguillot merged 1 commit intomainfrom
fix/plugin-description-update

Conversation

@pierreguillot
Copy link
Copy Markdown
Contributor

No description provided.

@pierreguillot pierreguillot added this to the 2.4.2 milestone Apr 14, 2026
@pierreguillot pierreguillot self-assigned this Apr 14, 2026
@pierreguillot pierreguillot added the bug Something isn't working label Apr 14, 2026
Copilot AI review requested due to automatic review settings April 14, 2026 06:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts track analysis execution so the plugin Description is produced and applied as part of the analysis completion path (via the async result), addressing a regression where the description update timing/flow was incorrect.

Changes:

  • Change Track::Processor::runAnalysis to return bool (launch success) instead of returning an optional Plugin::Description.
  • Extend the analysis completion callback / future result to include Plugin::Description, and apply it when analysis ends.
  • Update Track::Director to set the track description from the analysis-ended callback rather than at launch time.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Source/Track/AnlTrackProcessor.h Updates analysis API + async result/callback signatures to carry Plugin::Description.
Source/Track/AnlTrackProcessor.cpp Includes Plugin::Description in async results for waveform/plugin analyses and forwards it to onAnalysisEnded.
Source/Track/AnlTrackDirector.cpp Consumes the new callback signature and updates when/where AttrType::description is set.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix a regression where track plugin descriptions were not being updated correctly by ensuring the analysis pipeline returns the Plugin::Description alongside the computed results and applying it when analysis completes.

Changes:

  • Changed Track::Processor::runAnalysis to return bool (launched or not) instead of returning an optional description.
  • Extended the async analysis result to include Plugin::Description, and expanded onAnalysisEnded to provide it.
  • Updated Track::Director to set AttrType::description when analysis completes (instead of at launch).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
Source/Track/AnlTrackProcessor.h Updates processor API and async result type to carry Plugin::Description.
Source/Track/AnlTrackProcessor.cpp Builds description into async result and forwards it via callback.
Source/Track/AnlTrackDirector.cpp Applies description on analysis completion and adapts to new runAnalysis() return type.
Comments suppressed due to low confidence (1)

Source/Track/AnlTrackDirector.cpp:733

  • runAnalysis() no longer updates AttrType::description when launching the analysis; it’s now only updated on successful completion in onAnalysisEnded. This can leave AttrType::key and AttrType::description temporarily inconsistent while analysis is running, and permanently inconsistent if the analysis is aborted or fails (since the callback only sets description on result.wasOk()). Consider setting the new description at launch (or clearing it) so UI/state derived from description stays consistent with the selected key even when the analysis doesn’t complete.
        mProcessor.stopAnalysis();
        auto const result = mProcessor.runAnalysis(mAccessor, *mAudioFormatReader.get(), inputResults);
        if(result)
        {
            MiscDebug("Track", "analysis launched");
            mAccessor.setAttr<AttrType::warnings>(WarningType::none, notification);
            startTimer(50);
            timerCallback();
        }

@pierreguillot pierreguillot force-pushed the fix/plugin-description-update branch 3 times, most recently from be58577 to 7e9b27d Compare April 14, 2026 14:01
@pierreguillot pierreguillot requested a review from Copilot April 14, 2026 14:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a regression in how a track’s plugin description is updated by ensuring the description is propagated when the analysis completes (together with the results), rather than being returned synchronously at launch time.

Changes:

  • Change Track::Processor::runAnalysis to return bool (launched or not) and carry Plugin::Description through the async result.
  • Extend onAnalysisEnded to include Plugin::Description, and update Track::Director to set AttrType::description when analysis finishes successfully.
  • Update processor async state (std::future) to include Plugin::Description in its completion tuple.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Source/Track/AnlTrackProcessor.h Updates analysis API and callback signature to include Plugin::Description.
Source/Track/AnlTrackProcessor.cpp Threads plugin description through the async analysis completion result.
Source/Track/AnlTrackDirector.cpp Applies the completed analysis description/results to the model on success.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the track analysis pipeline so that plugin Description is propagated alongside analysis Results when the async analysis finishes, addressing a regression where the description was not updated correctly.

Changes:

  • Change Track::Processor::runAnalysis() to return bool (launch success) instead of returning a Plugin::Description.
  • Extend async analysis results to include Plugin::Description and forward it via onAnalysisEnded.
  • Update Track::Director to consume the new callback signature and set the track description/results on completion.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Source/Track/AnlTrackProcessor.h Updates processor API and callback signature to deliver Plugin::Description on completion.
Source/Track/AnlTrackProcessor.cpp Carries Plugin::Description through the async future result tuple and forwards it to onAnalysisEnded.
Source/Track/AnlTrackDirector.cpp Updates callback wiring and stops setting description at launch time; sets it on analysis completion instead.
Comments suppressed due to low confidence (2)

Source/Track/AnlTrackDirector.cpp:385

  • onAnalysisEnded now receives the computed Plugin::Description, but the Director only writes it to AttrType::description on success. If the analysis fails (plugin error), the track may keep a stale description that no longer matches the current key/state, which can break subsequent state sanitization/UI (especially since runAnalysis() no longer returns a description). Consider updating AttrType::description regardless of result.wasOk() (or at least in the error branch too) so the model stays consistent with the selected plugin.
    mProcessor.onAnalysisEnded = [&](juce::Result const& result, Results const& data, Plugin::Description const& description)
    {
        if(result.wasOk())
        {
            mAccessor.setAttr<AttrType::description>(description, NotificationType::synchronous);
            mAccessor.setAttr<AttrType::results>(data, NotificationType::synchronous);
            runRendering();
        }
        else
        {
            mAccessor.setAttr<AttrType::warnings>(WarningType::plugin, NotificationType::synchronous);
            warmAboutPlugin(result.getErrorMessage());
        }

Source/Track/AnlTrackDirector.cpp:734

  • Processor::runAnalysis() now returns false for cases like allocation failure (it no longer throws). In Director::runAnalysis, when result is false the code silently does nothing (no warnings/alert), whereas previously the exception path would set WarningType::plugin and inform the user. Please handle the false return explicitly (e.g., set an appropriate warning and show an error) or change the API to return an error-bearing type (juce::Result/expected) so failures aren’t silent.
    try
    {
        mProcessor.stopAnalysis();
        auto const result = mProcessor.runAnalysis(mAccessor, *mAudioFormatReader.get(), inputResults);
        if(result)
        {
            MiscDebug("Track", "analysis launched");
            mAccessor.setAttr<AttrType::warnings>(WarningType::none, notification);
            startTimer(50);
            timerCallback();
        }
    }

@pierreguillot pierreguillot force-pushed the fix/plugin-description-update branch from 7e15396 to e569b2c Compare April 14, 2026 17:48
@pierreguillot pierreguillot merged commit 943bffc into main Apr 14, 2026
16 checks passed
@pierreguillot pierreguillot deleted the fix/plugin-description-update branch April 14, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants