Skip to content

feat(ui): add quota fields to grant creation form#49

Merged
fclairamb merged 3 commits intomainfrom
feat/grant-quota-ui
Jan 23, 2026
Merged

feat(ui): add quota fields to grant creation form#49
fclairamb merged 3 commits intomainfrom
feat/grant-quota-ui

Conversation

@fclairamb
Copy link
Copy Markdown
Owner

@fclairamb fclairamb commented Jan 23, 2026

Summary

  • Add Max Queries and Max Data Transfer input fields to the Create Grant dialog
  • Display both query count and bytes transferred in the grant list Usage column
  • Add human-readable byte formatting (B, KB, MB, GB, TB)
  • Add MB/GB unit selector for data transfer quota input
  • Default expiration time changed from 30 days to 2 hours
  • Display duration between effective start time and expiration
  • Validate that expiration is after start time

Test plan

  • Verify quota fields appear in Create Grant dialog
  • Verify quota values are accepted and submitted
  • Verify Usage column shows queries and bytes transferred
  • Verify unit selector works for MB/GB conversion
  • Verify default expiration is 2 hours from now
  • Verify duration display updates when dates change
  • Verify validation error when expiration is before start

Screenshots

Create Grant Dialog

Shows quota fields (Max Queries, Max Data Transfer with MB/GB selector) and duration display:

Create Grant Dialog

Grant List with Usage

Shows the Usage column with queries count and bytes transferred:

Grant List

🤖 Generated with Claude Code

Add Max Queries and Max Data Transfer fields to the Create Grant dialog,
allowing administrators to set usage limits when granting database access.
The grant list now displays both query count and bytes transferred usage.

Changes:
- Add formatBytes helper for human-readable byte formatting
- Add Max Queries input field with "Unlimited" placeholder
- Add Max Data Transfer input with MB/GB unit selector
- Update Usage column to show queries and bytes transferred
- Add 5 Playwright E2E tests for quota functionality
- Fix E2E test port conflict (5432 → 5434)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fclairamb fclairamb force-pushed the feat/grant-quota-ui branch from a017b4a to f579da1 Compare January 23, 2026 21:56
fclairamb and others added 2 commits January 23, 2026 23:02
- Change default expiration from 30 days to 2 hours
- Display duration between effective start (max of now, start_time) and expiration
- Add validation that expiration must be after start time
- Show error message and disable submit when validation fails

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fclairamb fclairamb merged commit 626fa90 into main Jan 23, 2026
6 checks passed
@fclairamb fclairamb deleted the feat/grant-quota-ui branch January 23, 2026 22:18
@fclairamb fclairamb mentioned this pull request Jan 23, 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