Commit graph

8 commits

Author SHA1 Message Date
DJP
a9c514d5b1 Add history tracking and user history view
- All balance changes (top-ups, sets, bulk ops, request approvals)
  are now logged to data/history.json
- New "History" tab in admin sidebar
- Search by email to see all changes for a user with totals
- Partial name search shows matching users with summary stats
- Each entry shows action type, amount, source, OMG job #,
  resulting balance, and timestamp

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 13:33:08 -04:00
DJP
0d552d2ed2 Add custom amount option for approving credit requests
Adds a Custom button alongside the preset 5M/10M/20M approve buttons.
Opens a modal with preset quick-picks and a free-form input for any amount.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:52:11 -04:00
DJP
a941003057 Fix request page API path when accessed without .html extension
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:49:01 -04:00
DJP
2cc8178a18 Add credit request system with public form and admin dashboard
- Public page at /request for users to submit top-up requests
  (email + OMG job number, no auth required)
- Admin "Requests" view with pending/processed/all filters
- Approve with preset amounts (5M/10M/20M) or reject
- Pending count badge in sidebar nav
- Request data stored in JSON file (data/requests.json)
- Data volume mounted for persistence across rebuilds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:43:42 -04:00
DJP
83eed505e9 Fix special characters breaking action buttons
Apostrophes in names (e.g. O'Hagan) broke inline onclick handlers.
Switched to data attributes with event delegation for safe handling
of all special characters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:47:20 -04:00
DJP
e94cf8f503 Add low balance users view with threshold filters
Shows users below 1M/2M/3M/4M/5M tokens with filter buttons.
Sorted lowest first so admins can quickly find and top up users
running low.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:11:02 -04:00
DJP
4c4f7d5408 Fix asset and API paths for reverse proxy support
Paths were absolute (/css/, /js/, /api) which broke when served
behind NGINX at /balance-manager/. Now uses relative paths with
base href.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:04:14 -04:00
DJP
bbefb03c4b Initial commit - LibreChat Balance Manager
Admin dashboard for managing user token balances. View, search, top up, and bulk-manage credits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 22:51:25 -04:00