Skip to content

fix(dashboard-banners): Remove invalid banner var#6335

Merged
regdocs merged 1 commit intodevelopfrom
dashboard-banner-hotfix
May 5, 2026
Merged

fix(dashboard-banners): Remove invalid banner var#6335
regdocs merged 1 commit intodevelopfrom
dashboard-banner-hotfix

Conversation

@regdocs
Copy link
Copy Markdown
Member

@regdocs regdocs commented May 5, 2026

No description provided.

@regdocs regdocs requested a review from siduck as a code owner May 5, 2026 12:58
@regdocs regdocs merged commit 14bdea0 into develop May 5, 2026
7 checks passed
@regdocs regdocs deleted the dashboard-banner-hotfix branch May 5, 2026 12:59
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 5, 2026

Greptile Summary

  • Removes a v-if co-located with a v-for on <AlertBanner>. In Vue 3 v-if is evaluated before v-for, so banner would be undefined at the time the condition was checked — making the old guard a no-op (or a runtime error) rather than a working filter.
  • The equivalent filter is now applied once in the onSuccess handler, after isRelevantBanner and before the dismissed-banners check, which is the correct place for this logic.
  • No functional change to end-user behaviour; banners without a title or message are still excluded from localBanners.

Confidence Score: 5/5

Safe to merge — the change is a targeted fix for a Vue anti-pattern with no behavioural regressions.

Single-file, two-line change that corrects an invalid v-if + v-for co-location by moving equivalent logic to the data layer. The filtering semantics are preserved and no edge cases are introduced.

No files require special attention.

Important Files Changed

Filename Overview
dashboard/src/components/CustomAlerts.vue Moves the `banner.title

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[API: get_user_banners] -->|onSuccess data| B[filter: isRelevantBanner]
    B --> C["filter: banner.title || banner.message\n(moved here from template v-if)"]
    C --> D[filter: not in localDismissedBanners]
    D --> E[localBanners array]
    E --> F[v-for: render AlertBanner components]
Loading

Reviews (1): Last reviewed commit: "fix(dashboard-banners): Remove invalid b..." | Re-trigger Greptile

@regdocs regdocs added the hotfix label May 5, 2026
@regdocs regdocs restored the dashboard-banner-hotfix branch May 5, 2026 13:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.65%. Comparing base (0805c87) to head (e17eac2).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #6335       +/-   ##
============================================
+ Coverage    49.80%   60.65%   +10.84%     
============================================
  Files          944      109      -835     
  Lines        78387    17457    -60930     
  Branches       351      351               
============================================
- Hits         39043    10589    -28454     
+ Misses       39320     6844    -32476     
  Partials        24       24               
Flag Coverage Δ
dashboard 60.65% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@saurabh6790
Copy link
Copy Markdown
Member

@mergify backport release/2026-W19

@saurabh6790 saurabh6790 removed the hotfix label May 5, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 5, 2026

backport release/2026-W19

✅ Backports have been created

Details

saurabh6790 added a commit that referenced this pull request May 5, 2026
fix(dashboard-banners): Remove invalid banner var (backport #6335)
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.

2 participants