Skip to content

Add requested-duration field and spend-limit timeframe to upgrade requests - #29600

Open
avervaet wants to merge 2 commits into
avervaet/overage-message-fieldfrom
avervaet/overage-timelimits-parked
Open

Add requested-duration field and spend-limit timeframe to upgrade requests#29600
avervaet wants to merge 2 commits into
avervaet/overage-message-fieldfrom
avervaet/overage-timelimits-parked

Conversation

@avervaet

@avervaet avervaet commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stacked on Require a reason message on member-initiated upgrade requests #29591. Adds the requested-duration field (requestedDurationDays) to the upgrade-request flow: members pick how long they need the limit increase (day/week/month presets), and it's stored, surfaced in the admin requests table, and included in the notification email and audit log.
  • Adds overrideLimitTimeframe (day/week/month/billing_cycle) on membership, letting an admin cap AWU credit spend over a rolling window instead of a flat all-time cap.
  • Note: requestedDurationDays is currently informational only (not wired to overrideLimitTimeframe, and the raised cap does not auto-expire). Automatic expiration/reversion of the override once the requested period elapses is tracked as a stacked follow-up PR.

Test plan

  • Manually open the "Request an upgrade" dialog, verify the duration radio group (day/week/month) appears and defaults to a week.
  • Submit a request and verify requestedDurationDays shows up in the admin's UpgradeRequestsTable, notification email, and audit log.

Deploy plan

  • Apply the pre-deploy migration (both regions)
  • Deploy front

🤖 Generated with Claude Code

Parks the two time-based additions that were previously bundled with the
reason-message feature: requestedDurationDays on upgrade requests, and
day/week/month rolling-window enforcement of per-user spend-limit
overrides (Membership.overrideLimitTimeframe). Stacked on top of
overage-message-field so it can be picked back up without re-deriving
the reason-field plumbing it builds on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@avervaet
avervaet requested a review from a team as a code owner July 28, 2026 12:17
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
playground Ignored Ignored Preview Jul 28, 2026 12:34pm
storybook Ignored Ignored Preview Jul 28, 2026 12:34pm

Request Review

@dust-agent dust-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding Rules LGTM \o/

react-doctor flagged the group label as unassociated. htmlFor targets a
single control, so use aria-labelledby on the RadioGroup root instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread front/components/credits/UsageUpgradeButton.tsx
@avervaet avervaet changed the title Park requested-duration and spend-limit-timeframe work for later Add requested-duration field and spend-limit timeframe to upgrade requests Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant