Add global recent-deployments feed for the projects dashboard

The RECENT DEPLOYMENTS section queried the builds table, so
image-sourced services — which deploy without building — never
appeared and the dashboard reported "no deployments yet" while
containers were running.

- GET /api/v1/deployments lists latest deployments across the
  caller's services, joined with service + project names, ordered
  newest-first with a bounded limit
- ProjectsPage consumes it via listRecentDeployments; the DEPLOYS
  stat card now counts real deployments
- is_admin is now projected in register/upsert user responses, and
  the Better Auth mirror grants admin to the first mirrored account
  (previously only the legacy register path did)

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-21 21:07:01 +02:00
1 parent b7e2e93261
commit 3bf44dbcd5
8 files changed
+258 -21

No files matched your search

+53
View File
@@ -886,6 +886,59 @@ export interface paths {
patch?: never;
trace?: never;
};
"/deployments": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List recent deployments
* @description Latest deployments across all services owned by the caller — feeds the dashboard deploy feed
*/
get: {
parameters: {
query?: {
limit?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Recent deployments */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
deployments?: {
id?: string;
service_id?: string;
service_name?: string;
project_name?: string;
status?: string;
image_name?: string;
started_at?: string | null;
completed_at?: string | null;
created_at?: string;
}[];
};
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/deployments/{id}": {
parameters: {
query?: never;