Skip to content

SF-3835 Do not allow uploading training data when offline#3985

Open
pmachapman wants to merge 1 commit into
masterfrom
fix/SF-3835
Open

SF-3835 Do not allow uploading training data when offline#3985
pmachapman wants to merge 1 commit into
masterfrom
fix/SF-3835

Conversation

@pmachapman

@pmachapman pmachapman commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Rather than changing the error message, I took the same approach as the chapter audio dialog and disabled uploading when offline


This change is Reviewable

@pmachapman pmachapman added the will require testing PR should not be merged until testers confirm testing is complete label Jul 7, 2026
@pmachapman
pmachapman temporarily deployed to screenshot_diff July 7, 2026 03:06 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📸 Screenshot diff deployed! (1 change)

View the visual diff at: https://pr-3985--sf-screenshot-diffs.netlify.app

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.03%. Comparing base (4e33291) to head (2db96bc).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3985   +/-   ##
=======================================
  Coverage   81.02%   81.03%           
=======================================
  Files         644      644           
  Lines       41445    41450    +5     
  Branches     6726     6751   +25     
=======================================
+ Hits        33580    33587    +7     
+ Misses       6770     6768    -2     
  Partials     1095     1095           

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

@Nateowami Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Rather than changing the error message, I took the same approach as the chapter audio dialog and disabled uploading when offline

The problem is: All errors when uploading a file (regardless of cause; they could be network related, bad file, or something else) are attributed to a malformed file, and the user is shown this message:

Your file needs to have two columns, and every row must have a value in both columns. Please fill in any empty cells and try again.

The error message should be shown only when a specific error code (could be HTTP status code, or something returned via JSONRPC) indicates a problem with the file, and the error message should contemplate the same breadth of potential problem as the code that triggers it (for example, I don't know what happens when you upload an unsupported file type, but if it can trigger the message, then the message should specify to check that the file type is one of the supported types). Disabling upload when we know we're offline doesn't stop network errors from occurring; it only reduces their frequency.

Also, we generally avoid disabling buttons, except when a feature is unavailable due to the user being offline, and then only disabling them in the context where we would show a message saying the user is offline. So in general it would be better to let the user open the upload dialog, but show a message about the user being offline inside the dialog.

@Nateowami made 1 comment.
Reviewable status: 0 of 7 files reviewed, all discussions resolved.

@Nateowami Nateowami self-assigned this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

will require testing PR should not be merged until testers confirm testing is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants