Skip to content

Checker improvements and fixes#60

Open
eumalin wants to merge 1 commit into
mainfrom
ETT-1477-checker-feedback
Open

Checker improvements and fixes#60
eumalin wants to merge 1 commit into
mainfrom
ETT-1477-checker-feedback

Conversation

@eumalin

@eumalin eumalin commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Available to test in dev: https://dev-3.www.hathitrust.org/print-holdings-checker/

I added more detailed instructions, history, and some improvements and fixes.

image
# What Example Fix
1 No history of checked files - Added a history list, saved to localStorage so it survives a reload
2 Dropzone highlight was inconsistent dragging a file in Turned out to be event bubbling from nested elements, not the file type. Fixed by checking relatedTarget instead of counting
3 "COLUMNS" label was confusing - Renamed to "Columns Detected"
4 "No Errors" badge should be green - Was always grey, now it's green
5 Filename errors didn't say they were about the filename umich_monographs_Full_122122023.tsv Prefixed those errors with "Filename:", renamed "Type" to "Holdings Type"
6 Bad extension hid the actual filename problems umich_..._Copy.txt .txt/.csv files now get checked fully instead of just rejected
7 Same thing, double extension umich_spm_full_20230711.tsv.txt Same fix as 6
8 Encoding + column detection was messy - Normalized column matching, encoding errors now show a snippet, reworded the column-count message
9 Column checks skipped when type's unknown umich Hathi 2023.1-DS.tsv Now checks for oclc/local_id even without a known type
10 Filename parsing didn't say what was wrong umich_multi-part_20230531.tsv Added a type-alias list and a per-part breakdown
11 Type/capitalization issues slipped through umich_mon_Full_12122023.tsv.tsv Merged the two parsing paths so type and case always get checked
12 Valid date still flagged, type got missed umich_mpm_full_20230316 (1).tsv Same fix as 11
13 Spec audit (ISSN, local_id length, partial, ocl7) - Added ISSN/local_id checks
- Review follow-up - Fixed a column normalization mismatch, merged duplicate filename logic, caught tab only blank rows, replaced a flaky drag counter

@eumalin eumalin marked this pull request as ready for review July 7, 2026 15:00
@eumalin eumalin force-pushed the ETT-1477-checker-feedback branch from a17d36f to 456e8ca Compare July 7, 2026 16:57
@eumalin eumalin requested a review from carylwyatt July 8, 2026 12:46

@carylwyatt carylwyatt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall, these are some excellent updates! I'm glad Natalie tested it out with some more robust examples of submissions, she caught a lot more things that could go sideways.

Thanks for all your work on this, it's going to be an amazing addition to our toolset!

const historySection = document.getElementById('history-section');
const historyList = document.getElementById('history-list');

// Persisted via localStorage so history survives a page reload/revisit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm very curious about the backstory on this history section. I'm assuming Natalie asked for it, can you explain a little about why we're storing this info about the file submissions?

Since localStorage doesn't have an expiration date, can we add a "clear history" button for folks who don't want their history stored? Librarians are generally conscious of privacy concerns, and while this data is only stored in their browser, let's give them a way to opt out.

// Blocks obviously wrong drops up front, but lets text-like extensions
// through so their filename/column/row problems are reported too.
// validateFilename() still flags the extension as an error.
function isTextLikeFile(fileName) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice improvement! It has happened in the past where we get the wrong file type but more-or-less correct data.

</section>

<section class="checker-instructions" aria-label="File format requirements">
<h2>File format requirements</h2>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I love the addition of this requirements list! 💯

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