Skip to content

Conversation

dauglyon
Copy link
Collaborator

Description of PR purpose/changes

This PR introduces an override of the window.alert which suppress alerts and prints them to console.error with a stacktrace (it can be hard to trace what made the alert call otherwise, because it becomes non-blocking)

This should fix the issues with datatables throwing ui alerts instead of errors from the clustering app.

Jira Ticket / Issue

Related Jira ticket: https://kbase-jira.atlassian.net/browse/SCT-3097

Testing Instructions

  • Details for how to test the PR:
  • Tests pass locally and in GitHub Actions
  • Changes available by spinning up a local narrative and navigating to X to see Y

Dev Checklist:

  • My code follows the guidelines at https://sites.google.com/lbl.gov/trussresources/home?authuser=0
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • (JavaScript) I have run Prettier and ESLint on changed code manually or with a git precommit hook
  • (Python) I have run Ruff format and check on changed Python code manually or with a git precommit hook
  • Any dependent changes have been merged and published in downstream modules

Updating Version and Release Notes (if applicable)

@dauglyon dauglyon requested review from briehl and dakotablair August 15, 2025 20:19
@dauglyon
Copy link
Collaborator Author

There is probably a better file for this code... but its a POC

Copy link

Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.97%. Comparing base (fe5f7bc) to head (499d12e).

Files with missing lines Patch % Lines
kbase-extension/static/kbase/js/narrativeConfig.js 60.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3707   +/-   ##
========================================
  Coverage    25.96%   25.97%           
========================================
  Files          461      461           
  Lines        46691    46696    +5     
========================================
+ Hits         12122    12127    +5     
  Misses       34569    34569           
Files with missing lines Coverage Δ
kbase-extension/static/kbase/js/narrativeConfig.js 63.49% <60.00%> (-0.31%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe5f7bc...499d12e. Read the comment docs.

🚀 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.

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