Add staff password reset, raise code upload limit, and guard restore sizing.

Admins and technical staff can reset passwords via PATCH /users/:id/password with scoped permissions for technical users; deploy/source uploads allow up to 10GiB and block deploy when allocated storage is smaller than uploaded archive or DB dump, with an inline error modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
keyhan
2026-05-16 01:03:07 +03:30
parent 67b41ae311
commit a7293973d5
6 changed files with 332 additions and 40 deletions
@@ -11,6 +11,9 @@ import { Hexagon, Rocket, Play, Square, RotateCw, Globe, Package, Server, Scale,
import { useConfirm } from '@/components/confirm-modal';
import { BuildProgressModal } from '@/components/build-progress-modal';
/** Matches backend multipart limit for POST /applications/:id/upload */
const MAX_SOURCE_ARCHIVE_BYTES = 10 * 1024 ** 3;
const statusColors: Record<string, string> = {
running: 'badge-green',
pending: 'badge-yellow',
@@ -778,8 +781,8 @@ export default function AppDetailPage() {
toast.error('Please upload a .zip or .tar.gz file');
return;
}
if (file.size > 100 * 1024 * 1024) {
toast.error('File size must be less than 100MB');
if (file.size > MAX_SOURCE_ARCHIVE_BYTES) {
toast.error('File size must be at most 10 GB');
return;
}
uploadMutation.mutate(file);
@@ -1428,7 +1431,7 @@ export default function AppDetailPage() {
<p className="text-xs text-gray-500">
Drag & drop a <strong>.zip</strong> file here, or click to browse
</p>
<p className="text-xs text-gray-400">Max size: 100MB</p>
<p className="text-xs text-gray-400">Max size: 10 GB</p>
</div>
)}
</div>