fix(bookmarks): resolve previous folder name on move-undo toast#6119
Merged
idoshamun merged 2 commits intoMay 31, 2026
Merged
Conversation
The undo action in the Move Bookmark modal re-issued a move back to the
previous folder but only passed `{ id: listId }` to the handler, so the
toast rendered "Moved to undefined". Look up the previous folder name
from the bookmark folder list at undo time (falling back to "Quick
saves" when there is no `listId`), and use a generic copy if the folder
has since been deleted. Also widens `MoveBookmarkToFolderProps.listId`
to optional to match the GraphQL schema and clears the related strict
type errors surfaced by touching this file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rkModal De-duplicates the "Quick saves" literal across the toast undo lookup and the Quick saves button, and inlines the previous-folder-name resolver into the undo call to drop the intermediate variable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The Undo action on the Move Bookmark toast was passing only
{ id: listId }to the move handler, so the follow-up toast renderedMoved to undefined. This PR resolves the previous folder's name at undo time:listId), fall back to theQuick saveslabel.Bookmark movedrather than showing the literalundefined.Key decisions
MoveBookmarkToFolderProps.listIdto optional to match the GraphQL schema ($listId: ID), aligneduseMoveBookmarkToFolder's param type with that interface, broadenedonMoveBookmarkto accepttargetId?: string, and added a null guard on thecreateFolderresult. All callers were checked — backwards-compatible.QUICK_SAVES_LABELto de-duplicate the literal across the toast resolver and the Quick saves button.Test plan
MoveBookmarkModal.spec.tsx(4 cases): folder→Quick saves move, Quick saves→folder→undo, folder A→folder B→undo, deleted-folder fallback.node ./scripts/typecheck-strict-changed.jspnpm --filter shared linton impacted filespnpm --filter shared test— 4/4 passCloses ENG-1599
Created by Huginn 🐦⬛
Preview domain
https://eng-1599-feedback-bug-report-boo.preview.app.daily.dev