internetarchive / internetarchive/openlibrary
Merging: Limit to one network error alert
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 126
Description
### Problem
On the merging page, a `window.alert()` message is displayed whenever the page fails to load the details of one of the works. Example:
`Network error; failed to load editions for /works/OL30200415W. Click OK to reload. `
Because network errors often result in multiple or all of the works failing to load, this can result in a high number of alerts being displayed, one after another. Only after I’ve dismissed all of the alerts does the page automatically reload.
### Reproducing the bug
_No response_
### Context
- Browser: Safari
- OS: iPadOS 18.1
- Logged in: Y
- Environment: prod
### Breakdown
#### Requirements Checklist
* [ ]
#### Related files
*
#### Stakeholders
*
#### Instructions for Contributors
- Please [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date **before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) to work on this issue and **each time after** pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
Contributor guide
Research direction
Start by locating the merging page and the code that calls window.alert when edition details fail to load; no related files or tests are named in the issue. Reproduce the network-error case in the merging page and verify that the page presents only one alert before reloading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100