GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: 折りたたみ中に外部変更を取りこぼしたフォルダを再展開時に取り直す by ymnao · Pull Request #610 · ymnao/scripta Conversation
Owner
概要FileTree で、一度展開してから閉じたフォルダが、閉じている間に外部で作成・削除されたファイルを開き直しても反映しない不具合を直す。あわせて、レビューで見つかった「再取得中に閉じると古い一覧が残る」経路も塞ぐ。 関連 Issueなし(HANDOFF の候補「Fable レビュー Medium #6: FileTree の listDirectory 再発行」を調べる中で見つけた不具合。#6 の性能面は、modify だけのバッチでも refresh が要る(dir↔file の置き換えが modify に畳まれる)ことと、コストが自動保存 2 秒に 1 回程度であることから、user 判断で見送った) 移行 Stage
変更内容
動作確認
検証エビデンスリスク分類tier: medium — reasons なし(classify-risk.sh の出力 実行した検証
レビュー指摘と対応
追跡先backlog delta: 起票 0 件 / 本 PR で close 0 件 / 現在 open 5 件 なし Draft 判定
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions- FileTreeItem の refresh effect は展開中のフォルダしか再取得せず、再展開時も loaded なら取り直さなかった - そのため、一度開いて閉じたフォルダは、閉じている間の外部 create / delete が開き直しても反映されなかった - 閉じている間に refreshKey が進んだら stale を立て、クリック / 作成時の自動展開 / ドラッグ時の自動展開で取り直す - 取り直し後は stale を下ろし、変化の無い再展開では listDirectory を再発行しない(呼び出し回数で pin) Co-Authored-By: Claude Opus 5.5 <[email protected]> - /simplify の Reuse / Simplification 観点が同じ簡約に収束したため適用 - 閉じている間の refresh で loaded を false に戻せば、クリック / 作成時 / ドラッグ時の 3 経路は既存の !loaded 分岐でそのまま取り直す - loaded を描画で読むのは expanded && loaded だけなので、閉じている間に false にしても表示は変わらない - stale state・3 経路の条件追加・deps 追加が不要になる。追加した 2 本の test は無変更で pass し、setLoaded(false) を外す mutant で両方 fail する Co-Authored-By: Claude Opus 5.5 <[email protected]> - code-reviewer の Warning: 展開中フォルダの refresh 用 listDirectory が in-flight の間に折りたたむと、effect cleanup の ignore で結果が捨てられ loaded=true のまま古い children が残った。次の再展開は取り直さない - 本 PR が直した「折りたたみ中の取りこぼし」と同じ症状なので、cleanup ではなく id で最新の取得だけを採用する形にした (FileTree の loadIdRef と同じ) - 折りたたみ中に着地した結果は非表示の children に入るだけで無害。unmount は既存の isMountedRef で弾く - 回帰 test を追加。cleanup で id を進める mutant で fail する Co-Authored-By: Claude Opus 5.5 <[email protected]> - code-reviewer round 2 の Warning: 前コミットで cleanup の破棄を外したため、展開中に始まった refresh fetch が「折りたたみ → 再 bump → 再展開」で走った loadChildren の結果を後から上書きできるようになっていた (完了順は withRetry の backoff 等で逆転しうる) - 前コミット本文の「折りたたみ中に着地した結果は無害」はこの経路では成り立たなかった - loadChildren でも id を進め、2 つの fetch 入口のどちらでも「最後に発行した取得だけが勝つ」ようにする (ref 名を fetchIdRef に変更) - 回帰 test を追加。loadChildren の id 更新を外す mutant で fail する Co-Authored-By: Claude Opus 5.5 <[email protected]> Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |