Skip to content

Fix slot export for HF NTAG 216 tags#823

Open
vidonnus wants to merge 1 commit intoGameTec-live:mainfrom
vidonnus:fix/hf-ntag216-slot-export
Open

Fix slot export for HF NTAG 216 tags#823
vidonnus wants to merge 1 commit intoGameTec-live:mainfrom
vidonnus:fix/hf-ntag216-slot-export

Conversation

@vidonnus
Copy link
Copy Markdown

Current Behavior

Clicking the download button in slot settings for an HF NTAG 216 slot silently fails — neither "Save to file", "Export to new card", nor "Update saved card" produce any result. This is caused by an unhandled exception during the 231 sequential page reads required for NTAG 216, which Flutter silently swallows, leaving the UI unresponsive with no feedback.

Issue: N/A

Changes

  • Wrap NTAG/Ultralight page reads in try/catch; return null on failure so callers can handle the error gracefully
  • Add error dialog ("Failed to export slot data.") on all three export buttons when the read fails
  • Show a progress bar dialog (LinearProgressIndicator) during export, but only for Ultralight/NTAG tags where page reads are performed
  • Read pages in batches of 16 instead of one at a time (~15x fewer operations), with automatic fallback to single-page reads if a batch fails
  • Add localization strings: failed_to_export_slot, exporting

Breaking Changes

None

@github-actions github-actions bot added the translation changes When something in the translation changes label Feb 23, 2026
@GameTec-live
Copy link
Copy Markdown
Owner

Ok, so how much of this is AI and did you review the code?

Maybe just disclose this at the end of the PR or something as projects that dont take AI code will figure it out anyways and the ones that do or dont care will appreciate the transparency.

@vidonnus
Copy link
Copy Markdown
Author

Ok, so how much of this is AI and did you review the code?

Maybe just disclose this at the end of the PR or something as projects that dont take AI code will figure it out anyways and the ones that do or dont care will appreciate the transparency.

100%, yes, and will do.

@GameTec-live
Copy link
Copy Markdown
Owner

Hey, finally had time to test, but I cant reproduce the issue you are describing?
For me a ntag216 exports fine from a slot?
Can you maybe send the dump you used to test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

translation changes When something in the translation changes

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants