feat(marketplace): destination tab picker and completion feedback#8487
Open
LWS49 wants to merge 3 commits into
Open
feat(marketplace): destination tab picker and completion feedback#8487LWS49 wants to merge 3 commits into
LWS49 wants to merge 3 commits into
Conversation
LWS49
force-pushed
the
lws49/feat-marketplace-pr5-preview
branch
2 times, most recently
from
July 17, 2026 07:14
a31b07a to
85ab1fc
Compare
LWS49
force-pushed
the
lws49/feat-marketplace-pr5b-misc
branch
from
July 17, 2026 07:27
2fce896 to
a3e493d
Compare
LWS49
force-pushed
the
lws49/feat-marketplace-pr5-preview
branch
from
July 17, 2026 08:11
85ab1fc to
a7086e3
Compare
LWS49
force-pushed
the
lws49/feat-marketplace-pr5b-misc
branch
from
July 17, 2026 08:12
a3e493d to
3bc206d
Compare
Replace the static destination summary with an in-dialog tab picker and report duplication results honestly: - Add DestinationTabPicker, a radio tree grouping the current course's tabs by category, so the duplicator chooses the destination tab inside the dialog instead of it being fixed by the launching `from_tab`. The selection seeds from `from_tab` (falling back to the first tab) and re-seeds on each reopen, but a parent re-render never resets a choice mid-decision. - Serve `destinationTabs` from the listing show endpoint too, so the picker is available when duplicating from the listing detail page, not just the marketplace index. - Restyle the dialog: vertically stacked tabs with larger category/tab text, a dense TypeBadge variant, an explicit "Duplicating" heading, the ⊘ "arrives unpublished" hint, and explicit cancel/primary colors. - Report a *completed* duplication (the toast fires from pollJob's completion callback, not on submit) and link to where the copy landed via the job's redirectUrl; reword the failure copy to plain language. Widen the shared toast Toaster type to ReactNode so the toast can carry that link (type-only change, no runtime effect).
`marketplace/listings` with no listing id matched no route and 404'd. Add a redirect so it lands on the same page as `marketplace/`.
Add a "Preview" chip beside the title on the read-only listing detail page, so it is never mistaken for the real assessment it mirrors.
LWS49
force-pushed
the
lws49/feat-marketplace-pr5b-misc
branch
from
July 17, 2026 08:14
3bc206d to
909976b
Compare
LWS49
marked this pull request as ready for review
July 17, 2026 08:14
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
This rounds out the preview/duplicate flow from the parent PR. The duplicate confirmation dialog now lets the user actively pick the destination category/tab via a new
DestinationTabPicker, instead of just displaying whichever tab they happened to arrive from. Completion feedback is upgraded to report once the duplication job actually finishes, with a link to where the assessment landed, instead of a fire-and-forget "started" toast. The listing preview page is badged so it's never mistaken for the real assessment it mirrors, and a bare/marketplace/listingsnow redirects to the marketplace index instead of 404ing.Design decisions
DuplicateConfirmationnow takes the fulldestinationTabslist and aninitialDestinationTabId, letting the user change the destination tab instead of being locked into the one they arrived from; the initial selection still defaults to thefrom_tabtab when it names a real tab, falling back to the course's first tab otherwise.pollJob's completion callback and links to the duplicated assessment (redirectUrl), since the previous "Duplicating assessment started." toast fired on job submission and gave no way to find the result afterward.[open]as the sole effect dependency), not on every parent re-render, so an in-progress tab choice isn't reset out from under the user while the dialog stays open.Regression prevention
Tests cover:
DestinationTabPicker's category grouping (including tabs arriving non-contiguously) and its selection wiring; the tab-selection reset-on-reopen vs. preserve-while-open behaviour; the completion and failure toast copy and the redirect link; the dialog locking/unlocking around an in-flight job so it can't be double-submitted or abandoned mid-job; thedestinationTabsnow returned from the listing show endpoint; the/marketplace/listingsredirect; and the listing preview page's "Preview" badge.Manual testing covered picking a different destination tab before confirming, the completion toast and its link after a duplication job finishes, a failed duplication leaving the dialog open for retry, and the bare
/marketplace/listingsredirect.