Bid Status Panel + Brief Review Workflow + SA Cross-Tenant View + Sub-Account Edit

A cluster of UX upgrades and feature parity work:

2nd release that day

A cluster of UX upgrades and feature parity work:

Bid status awareness on marketplace listings (Behaviour A)

The marketplace listing detail page (/marketplace/listings/[id]) used to show a single "Place Bid" button regardless of whether the user had already bid. After bidding, the same button reappeared, encouraging accidental duplicate bids.

Now the hero panel renders one of five states based on the user's existing bid:

  • No bid → "Place Bid" (original)
  • Pending → "Bid placed: ₹X" with Increase bid + Withdraw buttons
  • Outbid → "You were outbid: ₹X" with same actions
  • Accepted → green "✓ Bid accepted" + "View deal" link
  • Rejected → red "Previous bid rejected" + "Place new bid"

After successful bid creation, the page no longer redirects to /marketplace/bids — it stays in place and refreshes the panel.

GET /marketplace/bids accepts ?listing_id=<uuid> filter for the panel's lookup. Backend change tiny; frontend rewrite of the action buttons.

Bid status badges + filter on marketplace browse (Option A+B)

Listing cards on /marketplace now show per-card bid status alongside the existing active/paused pill — for advertisers/agencies who can bid. Badges match the detail-page states (Available to bid, You bid ₹X, Outbid, Bid accepted, Bid rejected).

A filter chip strip ("All / Available to bid / My active bids / Won deals / Rejected") lets users narrow the view client-side. Backend endpoint GET /marketplace/my-bid-summary?listing_ids=<uuid,uuid,...> returns the most-relevant bid per listing in a single call (max 200 IDs).

Hidden for SA / sellers / non-bidders.

Brief deliverable review parity (Options B + C from marketplace deals)

The brief deliverable review previously had a single "Approve" button. No way to request revision or reject inline. Now matches the marketplace-deal workflow:

  • 3 buttons: ✓ Approve · ⟲ Request revision · ✗ Reject
  • Round counter ("Round 1 of 3") with a default max_revisions = 3. Request-revision button hides at round 3, leaving Approve/Reject only.
  • ≥20-char validation on revision and reject notes.
  • Resubmit flow for influencers when status is revision_requested — orange feedback banner with brand's notes + URL input. Terminal "Rejected" panel for closed deliverables.
  • 7-day auto-release sweep (_auto_release_stale_brief_deliverables) runs at the top of GET /briefs and GET /briefs/{id}. Submitted deliverables past their review_deadline_at auto-flip to approved with a system history entry.
  • Brief auto-completes when all deliverables on a brief are approved.
  • Revision history JSONB records every event — round number, action, notes, actor, timestamp. Visible per deliverable as a collapsible panel.

Existing DeliverableCard component rewritten to host the new buttons inline. Old separate ContentReviewModal removed; briefs/[id]/deliverables page refactored to use the inline pattern.

SA cross-tenant view of agency clients

New /admin/agency-clients page (SA only) with three tabs:

1. Platform Overview — totals across the whole platform (agencies, active clients, bids, deals, margin, margin %) plus top-10 agencies by margin. 2. All Clients — flat searchable table of every client_brand across all agencies, with linked agency name, paginated 20/page. 3. By Agency — list of all agencies sorted by margin, each with a "Drill in" link → /agency/clients?view=insights&agency_id=<uuid>.

Backend: 3 SA-only endpoints under /admin/agency-clients/*overview, all, by-agency. All read-only (per CLAUDE.md "SA cannot create workspace-scoped things" rule).

/agency/clients and the Insights tab now accept ?agency_id= for SA drill-in. Cleared the dead-end "Clients" main-nav entry from SA's sidebar — SA reaches client data only through the Admin → Agency Clients path.

Sub-account edit (workspace owner action)

The /team page's Sub-Accounts tab previously supported only create + view + deactivate. Owners had no way to edit a sub-account's name, phone, job title, department, or reset their password.

New PATCH /workspaces/{workspace_id}/sub-accounts/{member_user_id} endpoint. Owner-only. Edit modal in SubAccountsPanel with first/last name, phone, job title, department, and optional password reset (≥10 chars). Pencil icon button on every sub-account row in both card and list views.

Misc

  • Auto-pre-fill bid amount when "Increase bid" is clicked.
  • Deal page (/marketplace/deals/[id]) margin tracking continues to surface for AGENCY_ADMIN buyers on agency-tagged deals.
  • Date-range filter added to campaigns and analytics report views (linter / parallel work; bundled here).

Known limits (intentional, deferred)

  • Multi-recipient brief deliverables still use the JSONB array model. Migration to per-recipient rows is designed but deferred — only single-recipient briefs work cleanly today.
  • Marketplace deal `paid_at` SQL workaround still required while Razorpay is parked. Each accepted deal needs UPDATE marketplace_deals SET paid_at=NOW() before the source can submit delivery.

---

Want to see it in your own workspace?

Bring planning, discovery, delivery, and measurement into one platform.