SIGN IN SIGN UP

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

0 0 79 Python

feat(frontend/marketplace): polish creator dashboard + redesign edit modal (#13083)

## Why

While reviewing /settings/creator-dashboard live, a few rough edges
showed up: approved agents had no easy way to jump to the marketplace
listing, pagination had only Prev/Next so navigating large submission
sets was slow, sort changes felt instant-but-silent, the first thumbnail
was hard to remove, image upload had no loading state, and the
edit-submission modal still used the old flat-form layout (the publish
flow already moved to the cleaner accordion design).

## What

- **Approved → marketplace links**: the agent name is now a `<Link>` to
`/marketplace/agent/{username}/{slug}` for approved submissions, and the
row dropdown gains a "View on marketplace" item.
- **Pagination**: sliding 5-page window of numeric buttons (centered on
`current_page`, clamped at the ends), keeping Prev/Next.
- **Sort feedback**: short transition flag + React-Query `isFetching`
drive an "Updating" spinner next to the section title.
- **Thumbnail fixes**: first-image remove button is bigger, has `z-30`,
`stopPropagation`; Add image button shows a spinner + "Uploading" while
the upload is in flight.
- **Edit submission modal**: rebuilt to match the publish step-2 design
— amber "Update note" card + Listing basics / Thumbnails / Experience
details accordion sections with per-section error/complete indicators.

## How

- New `creatorUsername` from `useGetV2GetUserProfile` flows through
`useCreatorDashboardPage → SubmissionsList/MobileSubmissionsList →
SubmissionItem/MobileSubmissionItem`, and `useSubmissionItem` derives
`marketplaceUrl` only when status is APPROVED + username + slug are
present.
- `Pagination` gains a `getVisiblePages(current, total)` helper that
returns up to 5 consecutive page numbers, anchored around the current
page.
- `useCreatorDashboardPage` keeps an `isSortingTransition` flag flipped
on for 400ms on every filter/sort change; the existing `isFetching` is
OR'd with it so the spinner also fires on pure client-side sort.
- `ThumbnailImages` accepts the new `isUploading` flag from
`useThumbnailImages`; the remove button is hoisted above its sibling
select button.
- `EditAgentForm` is rewritten to use `Accordion`,
`CharCountedTextarea`, and `ThumbnailImages` from the publish flow —
same hooks and schema as before, just the new layout.

## Test plan

- [ ] `/settings/creator-dashboard` shows the agent name as a link for
approved submissions (opens marketplace in a new tab); pending/rejected
rows stay plain text.
- [ ] Row dropdown shows "View on marketplace" only for approved
submissions.
- [ ] Pagination renders up to 5 numeric buttons; clicking page 4 of 10
shows 2–6; clicking last page clamps to last-5; numbers receive
`aria-current=page` on the active button.
- [ ] Changing sort or filter briefly shows "Updating" with a spinner in
the submissions header.
- [ ] In the publish modal Thumbnails accordion, the first image can be
removed; clicking "Add image" during upload shows the "Uploading" loader
and the button is disabled.
- [ ] Edit submission modal renders the Update note card + 3 accordion
sections (Listing basics, Thumbnails, Experience details), and Cancel /
Update buttons work.

Unit tests added/updated:
- `Pagination.test.tsx` — sliding window, aria-current, numeric click.
- `ThumbnailImages.test.tsx` (new) — empty state, remove first/last,
upload, generate, generate without agentId, select, file change.
- `EditAgentModal.test.tsx` (new) — accordion sections render, Cancel
triggers `onClose`, null-submission guard.
A
Abhimanyu Yadav committed
f4191856e8408a166ffe624c62f3d7475786f705
Parent: 02ff908
Committed by GitHub <noreply@github.com> on 5/13/2026, 2:48:09 AM