Repository navigation
fix: retry the new-folder move without re-reading the folder list - #31617
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the retry moves into the folder the dialog remembers, and a deleted folder is still recovered through the move's own 400 answer instead of a second read of the folder list. Notes
[DESIGN-REVIEWED] b3d3506 Description read[DESCRIPTION-READ] 38d5492c3aa49790d83563fdfea2eb36e6cd991896d5d11a4f08571ef4f09b83 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the state where a "folder not found" move failure resets the dialog. This diff adds that state: the button switches back to "Create and move" and the name field becomes editable again. No screenshot shows it, and the blind read was not performed. Evidence gaps
Notes
[UX-REVIEWED] b3d3506 Description read[DESCRIPTION-READ] 5eb4647e493174210ca2d3a922e19dcdbb7a1d11c3a8fd22c7be1f9250c45453 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The change only removes code: Retry drops the folder-list re-read. The one branch it adds is a smaller stand-in for the deleted re-create path. All three removed tests are named in the description and trace to #24179 and #23436. What this change shipsInventory (5 items) — 5 justifiedIntent: when a move into a just-created folder fails, Retry moves the session into that same folder without fetching the folder list again. This is a FIX (a subtraction).
[FIRST-PRINCIPLES-REVIEWED] b3d3506 Description read[DESCRIPTION-READ] 0de9ba7d0f2bcfba035df62960620b2396ed85b7698d04cb694b78c3fa7cf9f9 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
bc00ebf to
58617e3
Compare
[operator: bolichen97] |
When the move into a just-created folder fails, Retry in the session menus' New folder dialog re-read the whole folder list first, to re-create a folder deleted in the meantime and refresh the names the failure notice shows. That covers a gap nobody has reported and is larger than the dialog needs. Retry now moves straight into the folder the first try created. When the move answers that the folder no longer exists, the dialog forgets it, so the next submit creates the folder again instead of retrying a move that can never succeed. Any other move error keeps the folder and the names from the create. The create branch loses its retry-only values, and the three tests that pinned the re-read go; one test pins the deleted-folder retry. Closes #24179
58617e3 to
b3d3506
Compare
|
self-added: yes
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on b3d3506, no conflict, no open change request.
…1617) When the move into a just-created folder fails, Retry in the session menus' New folder dialog re-read the whole folder list first, to re-create a folder deleted in the meantime and refresh the names the failure notice shows. That covers a gap nobody has reported and is larger than the dialog needs. Retry now moves straight into the folder the first try created. When the move answers that the folder no longer exists, the dialog forgets it, so the next submit creates the folder again instead of retrying a move that can never succeed. Any other move error keeps the folder and the names from the create. The create branch loses its retry-only values, and the three tests that pinned the re-read go; one test pins the deleted-folder retry. Closes #24179 (cherry picked from commit 6cbe425)
Problem / Motivation
Goal: Retry in the session menus' New folder dialog moves the session straight into the folder the first try created, without re-reading the folder list.
When the move into a just-created folder fails, the dialog turns its button into Retry move. Before moving, Retry re-read the whole folder list: it created the folder again if the list no longer had it, and took the folder and parent names for the failure notice from that read. That covers a folder being deleted or renamed in the short gap between a failed move and its retry, which nobody has reported, and it is more than the dialog needs.
Why it matters
The re-read is an extra request and a second create path on every retry, kept alive by three tests, for a case no user has hit. It was flagged as beyond the goal on #23436 and deferred so that PR could land unchanged.
Not a goal
What changed (motivation → approach → change)
Retry did a folder-list read before the move, to handle a race nobody reported. The dialog already remembers the folder it created (id, stored name, parent and parent name), which is all the move needs.
submit()inNewFolderMoveDialog.tsxdrops the re-read: on a retry it moves into the remembered folder. When the move answers 400folder not found(the folder was deleted in between), the dialog forgets the folder, so the next submit creates it again instead of retrying a move that cannot succeed. Any other move error keeps the folder, and the existing notice reports it with the names from the create. The create branch now runs only on the first try, so its retry-only values (created.parentId,created.parentName,created.name) are gone and it reads the typed name and the parent offer directly.Backwards compatibility
Compatible: no API, stored data, setting or string changes; Retry sends one request fewer and the move it sends is the same.
Reader: website/src/components/NewFolderMoveDialog.tsx:NewFolderMoveForm -- chat -- reports a failed move after the create, keeps the folder, and retries the move only
Tests
In
website/src/test/NewFolderMoveDialog.test.tsx:reports a failed move after the create, keeps the folder, and retries the move onlyandopens the subfolder's path after a retried move, and names the folder as the server stored itserve the default folder list, which lacks the new folder, and expect Retry to create nothing and move into the folder the first try made. Both fail on main (the re-read creates the folder a second time) and pass here.creates the folder again when the retried move finds it deleted: the first move answers 400folder not found; the name becomes editable again, the next submit creates a second folder and moves into it. It fails without thesetCreated(null)line and passes with it.names the parent as it is now when it was renamed before a retried move fails again,follows a parent deleted between retries: no parent named, and a re-create at the top level, andcreates the folder again on Retry when the first one was deleted in the meantime.Determinism: the file passed five runs in a row, each with
--sequence.shuffleand a fresh seed.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
N/A — unit coverage sufficient: the change is which requests
submit()sends on a retry, and the test drives that path through the real dialog with the API mocked.Screenshots / video
Why no screenshot: the dialog renders the same in every state; only the requests Retry sends change, and a folder deleted between tries shows the existing move-failed notice.
Related Issues
Closes #24179
Sibling sweep
Swept: git grep -n "api.chatFolders()" -- website/src
Siblings: none -- the only re-read before a retried move was in this dialog; the other reads are queries or a single get-or-create read in the command bar.
Pattern harvest
Not generalizable: this removes one dialog's guard for an unreported race, not a defect shape that recurs elsewhere.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)