Skip to content

fix: remove duplicate toast error message from popup UI#585

Open
gurusatsangi wants to merge 1 commit into
fossasia:mainfrom
gurusatsangi:fix-invalid-org-error
Open

fix: remove duplicate toast error message from popup UI#585
gurusatsangi wants to merge 1 commit into
fossasia:mainfrom
gurusatsangi:fix-invalid-org-error

Conversation

@gurusatsangi
Copy link
Copy Markdown
Contributor

@gurusatsangi gurusatsangi commented Apr 20, 2026

Fixes

Fixes #584

Summary of Changes

  • Removed Materialize.toast() calls from error handling logic
  • Prevented duplicate error messages from appearing in the UI
  • Ensured errors are displayed only within the Scrum Report section

Screenshots / Demo

Before

  • Error shown in Scrum Report
  • Additional floating toast near scrollbar
image

After

  • Error shown only in Scrum Report
  • No floating toast message
image

Checklist

  • Code follows project guidelines
  • Tested locally
  • No console errors
  • UI behavior improved

Reviewer Notes

  • This is a UI cleanup fix
  • No changes to core logic or API calls
  • Improves user experience by removing redundant notifications

Summary by Sourcery

Bug Fixes:

  • Prevent duplicate error messages by relying solely on the Scrum Report section instead of additional popup toast notifications.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 20, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes popup-specific toast notifications from Scrum helper error handling so that errors are only surfaced via the existing Scrum Report UI, preventing duplicate error messages in the browser popup.

Sequence diagram for updated popup error handling without toast

sequenceDiagram
  actor User
  participant PopupUI
  participant ScrumHelper
  participant ScrumReport

  User->>PopupUI: Click_generate_scrum_report
  PopupUI->>ScrumHelper: allIncluded_outputTarget_popup
  ScrumHelper->>ScrumHelper: Validate_search_query_and_date_range
  ScrumHelper-->>ScrumHelper: Detect_invalid_query_or_date
  ScrumHelper->>ScrumHelper: logError_errorMsg
  ScrumHelper-->>PopupUI: Throw_Error_errorMsg
  PopupUI->>ScrumReport: Display_inline_error_errorMsg
  ScrumReport-->>User: Show_error_in_Scrum_Report_section_only
Loading

File-Level Changes

Change Details Files
Stop showing duplicate toast notifications for invalid search query errors in the popup UI.
  • Removed the conditional check for popup outputTarget when handling invalid search query errors.
  • Deleted the Materialize.toast invocation that displayed a floating toast with the error message.
  • Kept centralized error logging via logError and error propagation via throw so existing Scrum Report error display continues to work.
src/scripts/scrumHelper.js

Assessment against linked issues

Issue Objective Addressed Explanation
#584 Remove the redundant floating toast error notification in the popup UI that is caused by Materialize.toast() being triggered on errors.
#584 Ensure that error messages for invalid date ranges or queries are displayed only within the Scrum Report section, without altering core error-handling behavior beyond the duplicate UI notification.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added javascript Pull requests that update javascript code core labels Apr 20, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gurusatsangi
Copy link
Copy Markdown
Contributor Author

gurusatsangi commented Apr 21, 2026

I have added a video for reference. Go to Settings and enter an incorrect organization name, then generate the report—the error appears and shows a duplicate issue.

2026-04-21.18-35-54.-.Trim.mp4

Copy link
Copy Markdown
Contributor

@Salmaan-M Salmaan-M left a comment

Choose a reason for hiding this comment

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

Reviewed this PR locally by checking out the branch and testing different error scenarios.
The removal of the Materialize toast does not introduce any regressions. Error handling is still properly managed through existing UI mechanisms, and user feedback remains clear without duplicate notifications.

Looks good to me. Approving👍.

Copy link
Copy Markdown
Contributor

@Mateeb-Haider Mateeb-Haider left a comment

Choose a reason for hiding this comment

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

@vedansh-5 @hpdang
Reference PR #565 Already merged that solve this issue
I rechecked this issue on the main branch and it appears to already be resolved. This PR is no longer relevant, so kindly close it to help keep the PR tab clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Duplicate error message appears due to toast notification in popup UI

3 participants