ai-cfia / ai-cfia/nachet

Nachet mini export bug when exporting many images

オープン
#886 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug frontend help wanted nachet-mini
主要言語
Python
スター
2
フォーク
2
平均マージ
5日 6時間
マージ済み PR(30日)
5

説明

## Problem

> I have noticed one thing about the export function of the app itself: it doesn't seem to work reliably for more than about 5-6 pictures and their results. I have sometimes gotten it to export up to 11, but usually when I try more, the window to choose where to save it to doesn't open. I guess I haven't tested it with the browser set to save it automatically to the downloads location.
>
> It's probably not a big issue in normal use but in user testing when I was going through 20+ images and their results it was inconvenient. And if we ever want people to take training pictures through the app (so the metadata is automatically prepared) and then export them, this could be an issue there.

## Likely cause

Nachet Mini currently generates the ZIP before calling
`showSaveFilePicker()`. Larger exports take longer to prepare, so Chrome may no
longer associate the picker call with the original Export button click.

Chrome documents this exact failure mode and recommends obtaining the file
handle before processing the data:

https://developer.chrome.com/docs/capabilities/web-apis/file-system-access#create_a_new_file

This fits the reported behavior, but still needs to be confirmed by testing the
fix with the same multi-image exports.

## Proposed fix

Call `showSaveFilePicker()` as soon as the user clicks **Export**. Once the user
chooses a destination, generate the ZIP and write it using the returned file
handle.

This remains a single Export action. The browser already handles the filename
and destination, so no additional field or confirmation step is needed.

## Acceptance criteria

- [ ] On supported browsers, the Save As dialog opens before ZIP generation.
- [ ] The generated ZIP is written to the file selected by the user.
- [ ] Cancelling the Save As dialog stops the export without showing an error.
- [ ] The existing download fallback still works when
`showSaveFilePicker()` is unavailable.
- [ ] Existing export options and filename handling continue to work.
- [ ] Small and larger multi-image exports are tested repeatedly.
- [ ] Export failures remain visible instead of silently closing the dialog.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by locating the Nachet Mini Export handler and its current showSaveFilePicker() and download-fallback paths. Test the existing behavior with small and larger multi-image exports, then verify that the Save As dialog opens before ZIP generation, cancellation is harmless, the selected file is written, and failures remain visible.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。