Skip to content

Conversation

@takaokouji
Copy link

Summary

This PR fixes an issue where the "ルビーを保存中..." (Saving Ruby...) progress indicator remained visible indefinitely if the user cancelled the file save dialog in the Smalruby Koshien menu.

Implementation Details

  • RubyDownloader: Added an onSaveError prop that is called when window.showSaveFilePicker rejects (e.g., AbortError on cancellation).
  • MenuBar & RubyTab: Implemented handleAISaveError to clear the AI save status and passed it to RubyDownloader.

Test Coverage

  • Added unit test test/unit/containers/ruby-downloader.test.jsx to verify onSaveError is called when the save dialog is cancelled.
  • Verified all unit tests pass with npm run test:unit.
  • Verified code style with npm run test:lint.

Fixes #440

- Added onSaveError callback to RubyDownloader to handle save operation
  failures and cancellations.
- Implemented handleAISaveError in MenuBar and RubyTab to reset the
  aiSaveStatus when triggered.
- Added unit tests for RubyDownloader to ensure onSaveError is called
  correctly when the File System Access API rejects.

Fixes #440

🤖 Generated with [Gemini Code](https://gemini.google.com/code)

Co-Authored-By: Gemini <noreply@google.com>
@takaokouji takaokouji merged commit ad6957f into develop Dec 23, 2025
2 checks passed
@takaokouji takaokouji deleted the fix/issue-440-clear-koshien-save-status branch December 23, 2025 14:30
github-actions bot pushed a commit that referenced this pull request Dec 23, 2025
…-clear-koshien-save-status

fix: clear AI save status when file save is cancelled or fails
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.

File save cancellation does not clear progress indicator in Koshien menu

2 participants