diff --git a/cmd/engram/cloud.go b/cmd/engram/cloud.go index ad9e0ba35..97809688c 100644 --- a/cmd/engram/cloud.go +++ b/cmd/engram/cloud.go @@ -115,6 +115,7 @@ func cloudRuntimeServerOptions(cfg cloud.Config, cs *cloudstore.CloudStore, allo cloudserver.WithPrincipalStateStore(cs), cloudserver.WithDashboardAdminToken(cfg.AdminToken), cloudserver.WithMaxPushBodyBytes(cfg.MaxPushBodyBytes), + cloudserver.WithDashboardEnableDelete(cfg.DashboardEnableDelete), cloudserver.WithSyncStatusProvider(cloudDashboardStatusProvider{store: cs, projects: allowedProjects}), } if authenticator != nil { diff --git a/cmd/engram/main_test.go b/cmd/engram/main_test.go index 55b7fe735..25a296565 100644 --- a/cmd/engram/main_test.go +++ b/cmd/engram/main_test.go @@ -21,8 +21,26 @@ import ( mcpserver "github.com/mark3labs/mcp-go/server" ) +func clearTestEnvVars(t *testing.T) { + t.Helper() + for _, key := range []string{ + "ENGRAM_PROJECT", + "ENGRAM_CLOUD_SERVER", + "ENGRAM_CLOUD_TOKEN", + "ENGRAM_CLOUD_INSECURE_NO_AUTH", + "ENGRAM_CLOUD_ALLOWED_PROJECTS", + "ENGRAM_CLOUD_HOST", + "ENGRAM_CLOUD_PORT", + "ENGRAM_CLOUD_MAX_PUSH_BYTES", + "ENGRAM_JWT_SECRET", + } { + t.Setenv(key, "") + } +} + func testConfig(t *testing.T) store.Config { t.Helper() + clearTestEnvVars(t) cfg, err := store.DefaultConfig() if err != nil { t.Fatalf("DefaultConfig: %v", err) diff --git a/internal/cloud/cloudserver/cloudserver.go b/internal/cloud/cloudserver/cloudserver.go index 249029b91..d4976713a 100644 --- a/internal/cloud/cloudserver/cloudserver.go +++ b/internal/cloud/cloudserver/cloudserver.go @@ -80,6 +80,7 @@ type CloudServer struct { port int host string maxPushBodyBytes int64 + dashboardEnableDelete bool mux *http.ServeMux syncStatus dashboard.SyncStatusProvider listenAndServe func(addr string, handler http.Handler) error @@ -145,6 +146,10 @@ func WithMaxPushBodyBytes(limit int64) Option { } } +func WithDashboardEnableDelete(enabled bool) Option { + return func(s *CloudServer) { s.dashboardEnableDelete = enabled } +} + func New(store ChunkStore, authSvc Authenticator, port int, opts ...Option) *CloudServer { s := &CloudServer{ store: store, @@ -256,6 +261,7 @@ func (s *CloudServer) routes() { ManagedUsers: managedUsersStore, MaxLoginBodyBytes: maxDashboardLoginBodyBytes, StatusProvider: s.syncStatus, + EnableDelete: s.dashboardEnableDelete, }) s.mux.HandleFunc("GET /dashboard/bootstrap", s.handleDashboardBootstrapPage) s.mux.HandleFunc("POST /dashboard/bootstrap", s.handleDashboardBootstrapSubmit) @@ -413,6 +419,9 @@ func (s *CloudServer) handleHealth(w http.ResponseWriter, _ *http.Request) { } func (s *CloudServer) isDashboardAdmin(r *http.Request) bool { + if s.auth == nil && s.dashboardEnableDelete { + return true + } if principal, ok := s.dashboardPrincipalFromRequest(r); ok { return principal.Role == cloudauth.RoleAdmin && (principal.Source == cloudauth.PrincipalSourceManagedToken || principal.Source == cloudauth.PrincipalSourceLegacyEnvAdmin) } diff --git a/internal/cloud/cloudstore/audit_log.go b/internal/cloud/cloudstore/audit_log.go index e00d9d0dd..1987c0967 100644 --- a/internal/cloud/cloudstore/audit_log.go +++ b/internal/cloud/cloudstore/audit_log.go @@ -20,6 +20,8 @@ const AuditActionMutationPush = "mutation_push" // AuditActionChunkPush discriminates chunk push rejections. const AuditActionChunkPush = "chunk_push" +const AuditActionDashboardDelete = "dashboard_delete" + // ─── Types ──────────────────────────────────────────────────────────────────── // AuditEntry is the write-side struct for inserting an audit log row. diff --git a/internal/cloud/cloudstore/cloudstore.go b/internal/cloud/cloudstore/cloudstore.go index 29e665870..34187ac56 100644 --- a/internal/cloud/cloudstore/cloudstore.go +++ b/internal/cloud/cloudstore/cloudstore.go @@ -872,6 +872,33 @@ func (cs *CloudStore) InsertMutationBatch(ctx context.Context, batch []MutationE return seqs, nil } +func (cs *CloudStore) DeleteDashboardEntity(ctx context.Context, project, entity, entityKey, sessionID, actor string) error { + project = strings.TrimSpace(project) + entity = strings.TrimSpace(entity) + entityKey = strings.TrimSpace(entityKey) + sessionID = strings.TrimSpace(sessionID) + if project == "" || entityKey == "" || sessionID == "" { + return fmt.Errorf("cloudstore: delete target is incomplete") + } + if entity != store.SyncEntitySession && entity != store.SyncEntityObservation && entity != store.SyncEntityPrompt { + return fmt.Errorf("cloudstore: unsupported dashboard delete entity %q", entity) + } + payload := map[string]any{"deleted": true, "hard_delete": true, "session_id": sessionID} + if entity == store.SyncEntitySession { + payload["id"] = entityKey + } else { + payload["sync_id"] = entityKey + } + encoded, err := json.Marshal(payload) + if err != nil { + return fmt.Errorf("cloudstore: encode dashboard delete: %w", err) + } + if _, err := cs.InsertMutationBatch(ctx, []MutationEntry{{Project: project, Entity: entity, EntityKey: entityKey, Op: store.SyncOpDelete, Payload: encoded}}); err != nil { + return err + } + return cs.InsertAuditEntry(ctx, AuditEntry{Contributor: actor, Project: project, Action: AuditActionDashboardDelete, Outcome: "deleted", EntryCount: 1, ReasonCode: entity}) +} + const mutationBackfillChunkSize = 100 func (cs *CloudStore) BackfillMutationChunks(ctx context.Context, project string, apply bool) (MutationChunkBackfillReport, error) { diff --git a/internal/cloud/config.go b/internal/cloud/config.go index 97b93d013..a03cf3897 100644 --- a/internal/cloud/config.go +++ b/internal/cloud/config.go @@ -16,6 +16,7 @@ type Config struct { AdminToken string AllowedProjects []string MaxPushBodyBytes int64 + DashboardEnableDelete bool // TokenPepper is the dedicated secret used to hash managed cloud tokens // (see internal/cloud/auth.ManagedTokenHasher). It MUST be distinct from // JWTSecret so rotating the dashboard/session signing secret does not @@ -86,5 +87,8 @@ func ConfigFromEnv() Config { } cfg.AllowedProjects = projects } + if v := strings.TrimSpace(os.Getenv("ENGRAM_DASHBOARD_ENABLE_DELETE")); v != "" { + cfg.DashboardEnableDelete = v == "1" || strings.EqualFold(v, "true") + } return cfg } diff --git a/internal/cloud/dashboard/components.templ b/internal/cloud/dashboard/components.templ index 68f6fe0c4..f5c3c5450 100644 --- a/internal/cloud/dashboard/components.templ +++ b/internal/cloud/dashboard/components.templ @@ -420,7 +420,7 @@ templ PromptsPartial(prompts []cloudstore.DashboardPromptRow, pg Pagination) { // PromptDetailPage renders a prompt detail page. // ADAPTED: CloudPrompt -> DashboardPromptRow; CloudSession -> DashboardSessionRow. -templ PromptDetailPage(prompt *cloudstore.DashboardPromptRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardPromptRow) { +templ PromptDetailPage(prompt *cloudstore.DashboardPromptRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardPromptRow, showDelete bool) {
@@ -445,6 +445,9 @@ templ PromptDetailPage(prompt *cloudstore.DashboardPromptRow, session *cloudstor @templ.Raw(renderStructuredContent(prompt.Content))
+ if showDelete { + @DashboardDeleteForm("prompt", prompt.Project, prompt.SyncID, prompt.SessionID) + } if session != nil {

LINKED SESSION

@@ -1208,7 +1211,7 @@ templ AdminSyncToggleFormPartial(control cloudstore.ProjectSyncControl) { // SessionDetailPage renders a connected session detail surface. // ADAPTED: CloudSession -> DashboardSessionRow; CloudObservation -> DashboardObservationRow; CloudPrompt -> DashboardPromptRow. -templ SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []cloudstore.DashboardObservationRow, prompts []cloudstore.DashboardPromptRow) { +templ SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []cloudstore.DashboardObservationRow, prompts []cloudstore.DashboardPromptRow, showDelete bool) {
@@ -1267,6 +1270,9 @@ templ SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []
+ if showDelete { + @DashboardDeleteForm("session", session.Project, session.SessionID, session.SessionID) + }

Observations in this Session

@ObservationsPartial(observations, Pagination{})

Prompts in this Session

@@ -1277,7 +1283,7 @@ templ SessionDetailPage(session *cloudstore.DashboardSessionRow, observations [] // ObservationDetailPage renders the full observation payload with session context. // ADAPTED: CloudObservation -> DashboardObservationRow; CloudSession -> DashboardSessionRow. -templ ObservationDetailPage(observation *cloudstore.DashboardObservationRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardObservationRow) { +templ ObservationDetailPage(observation *cloudstore.DashboardObservationRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardObservationRow, showDelete bool) {
@@ -1329,6 +1335,9 @@ templ ObservationDetailPage(observation *cloudstore.DashboardObservationRow, ses @templ.Raw(renderStructuredContent(observation.Content))
+ if session != nil && showDelete { + @DashboardDeleteForm("observation", observation.Project, observation.SyncID, observation.SessionID) + } if session != nil {

LINKED SESSION

@@ -1347,6 +1356,16 @@ templ ObservationDetailPage(observation *cloudstore.DashboardObservationRow, ses
} +templ DashboardDeleteForm(entity, project, entityKey, sessionID string) { +
+ + + + + +
+} + // ─── Phase 9: Audit Log Admin Views ───────────────────────────────────────── // AdminAuditLogPage renders the admin audit log shell page. diff --git a/internal/cloud/dashboard/components_templ.go b/internal/cloud/dashboard/components_templ.go index 79cf86bfd..942b06c66 100644 --- a/internal/cloud/dashboard/components_templ.go +++ b/internal/cloud/dashboard/components_templ.go @@ -1737,7 +1737,7 @@ func PromptsPartial(prompts []cloudstore.DashboardPromptRow, pg Pagination) temp // PromptDetailPage renders a prompt detail page. // ADAPTED: CloudPrompt -> DashboardPromptRow; CloudSession -> DashboardSessionRow. -func PromptDetailPage(prompt *cloudstore.DashboardPromptRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardPromptRow) templ.Component { +func PromptDetailPage(prompt *cloudstore.DashboardPromptRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardPromptRow, showDelete bool) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -1845,57 +1845,67 @@ func PromptDetailPage(prompt *cloudstore.DashboardPromptRow, session *cloudstore if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + if showDelete { + templ_7745c5c3_Err = DashboardDeleteForm("prompt", prompt.Project, prompt.SyncID, prompt.SessionID).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, " ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } if session != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, "

LINKED SESSION

LINKED SESSION

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var97 string templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(session.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 451, Col: 152} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 454, Col: 152} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var97)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "

Started ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "

Started ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var98 string templ_7745c5c3_Var98, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(session.StartedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 452, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 455, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var98)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(related) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "

Other Prompts from this Session

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "

Other Prompts from this Session

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1905,7 +1915,7 @@ func PromptDetailPage(prompt *cloudstore.DashboardPromptRow, session *cloudstore } } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1937,20 +1947,20 @@ func ProjectsPage(search string) templ.Component { templ_7745c5c3_Var99 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "

PROJECT ATLAS

Projects

PROJECT ATLAS

Projects

Loading...

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "\" hx-get=\"/dashboard/projects/list\" hx-target=\"#projects-content\" hx-swap=\"innerHTML\" hx-trigger=\"keyup changed delay:300ms\">

Loading...

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1988,38 +1998,38 @@ func ProjectsListPartial(stats []cloudstore.DashboardProjectRow, controls map[st return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, s := range stats { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "\" class=\"card-link\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var103 string templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(s.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 509, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 512, Col: 22} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2029,74 +2039,74 @@ func ProjectsListPartial(stats []cloudstore.DashboardProjectRow, controls map[st return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var104 string templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(s.Sessions)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 516, Col: 57} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 519, Col: 57} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, " Sessions
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, " Sessions
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var105 string templ_7745c5c3_Var105, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(s.Observations)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 520, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 523, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var105)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, " Observations
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, " Observations
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var106 string templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(s.Prompts)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 524, Col: 56} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 527, Col: 56} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var106)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, " Prompts
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, " Prompts
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2132,20 +2142,20 @@ func ProjectDetailPage(project string, stats *cloudstore.DashboardProjectRow, co templ_7745c5c3_Var108 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "

PROJECT DETAIL

Projects / ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "

PROJECT DETAIL

Projects / ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var109 string templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 549, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 552, Col: 59} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var109)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2162,175 +2172,175 @@ func ProjectDetailPage(project string, stats *cloudstore.DashboardProjectRow, co } } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if control != nil && !control.SyncEnabled { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "

ORG POLICY

This project is paused by organization policy in the cloud control plane.

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "

ORG POLICY

This project is paused by organization policy in the cloud control plane.

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if control.PausedReason != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "

Reason: ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "

Reason: ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var110 string templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(*control.PausedReason) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 565, Col: 56} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 568, Col: 56} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if control.UpdatedBy != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "

Updated by: ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "

Updated by: ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var111 string templ_7745c5c3_Var111, templ_7745c5c3_Err = templ.JoinStringErrs(*control.UpdatedBy) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 568, Col: 57} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 571, Col: 57} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var111)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if control.UpdatedAt != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "

Updated: ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "

Updated: ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var112 string templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(control.UpdatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 571, Col: 70} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 574, Col: 70} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if stats != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var113 string templ_7745c5c3_Var113, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(stats.Sessions)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 578, Col: 58} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 581, Col: 58} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var113)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, " Sessions
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, " Sessions
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var114 string templ_7745c5c3_Var114, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(stats.Observations)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 582, Col: 62} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 585, Col: 62} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var114)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, " Observations
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, " Observations
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var115 string templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(stats.Prompts)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 586, Col: 57} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 589, Col: 57} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, " Prompts
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "
Prompts
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "
t.classList.remove('active'));this.classList.add('active')\">Observations t.classList.remove('active'));this.classList.add('active')\">Observations t.classList.remove('active'));this.classList.add('active')\">Sessions t.classList.remove('active'));this.classList.add('active')\">Sessions t.classList.remove('active'));this.classList.add('active')\">Prompts
t.classList.remove('active'));this.classList.add('active')\">Prompts

Loading...

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "\" hx-trigger=\"load\" hx-swap=\"innerHTML\">

Loading...

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2372,82 +2382,82 @@ func ContributorsListPartial(contributors []cloudstore.DashboardContributorRow, return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "
ContributorChunksProjectsLast Chunk
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, c := range contributors { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "
ContributorChunksProjectsLast Chunk
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var122 string templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(c.CreatedBy) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 640, Col: 107} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 643, Col: 107} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var123 string templ_7745c5c3_Var123, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(c.Chunks)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 641, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 644, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var123)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var124 string templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(c.Projects)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 642, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 645, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var125 string templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestampStr(c.LastChunkAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 643, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 646, Col: 45} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2484,20 +2494,20 @@ func ContributorsPage(search string) templ.Component { templ_7745c5c3_Var126 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "

CONTRIBUTOR SIGNAL

Contributors

CONTRIBUTOR SIGNAL

Contributors

Loading...

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "\" hx-get=\"/dashboard/contributors/list\" hx-target=\"#contributors-content\" hx-swap=\"innerHTML\" hx-trigger=\"keyup changed delay:300ms\">

Loading...

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2529,35 +2539,35 @@ func ContributorDetailPage(contributor *cloudstore.DashboardContributorRow, sess templ_7745c5c3_Var128 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "

CONTRIBUTOR DETAIL

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "

CONTRIBUTOR DETAIL

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if contributor != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var129 string templ_7745c5c3_Var129, templ_7745c5c3_Err = templ.JoinStringErrs(contributor.CreatedBy) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 695, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 698, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var129)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 194, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 194, "

Contributor

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "

Contributor

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2567,72 +2577,72 @@ func ContributorDetailPage(contributor *cloudstore.DashboardContributorRow, sess return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 198, "\" class=\"stat-card stat-card-link\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var131 string templ_7745c5c3_Var131, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(contributor.Chunks)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 705, Col: 186} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 708, Col: 186} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var131)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 198, "Chunks Chunks ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 200, "\" class=\"stat-card stat-card-link\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var133 string templ_7745c5c3_Var133, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(contributor.Projects)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 706, Col: 189} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 709, Col: 189} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var133)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 200, "Projects
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 201, "Projects
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var134 string templ_7745c5c3_Var134, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestampStr(contributor.LastChunkAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 707, Col: 107} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 710, Col: 107} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var134)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 201, "Last Chunk

Recent Sessions

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 202, "Last Chunk

Recent Sessions

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2640,7 +2650,7 @@ func ContributorDetailPage(contributor *cloudstore.DashboardContributorRow, sess if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 202, "

Recent Observations

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 203, "

Recent Observations

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2648,7 +2658,7 @@ func ContributorDetailPage(contributor *cloudstore.DashboardContributorRow, sess if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 203, "

Recent Prompts

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 204, "

Recent Prompts

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2657,7 +2667,7 @@ func ContributorDetailPage(contributor *cloudstore.DashboardContributorRow, sess return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 204, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 205, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2690,66 +2700,66 @@ func adminNav(active string) templ.Component { templ_7745c5c3_Var135 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 205, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 206, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if active == "overview" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 206, "Overview ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 207, "Overview ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 207, "Overview ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 208, "Overview ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if active == "projects" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 208, "Projects ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 209, "Projects ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 209, "Projects ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 210, "Projects ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if active == "users" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 210, "Managed Users ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 211, "Managed Users ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 211, "Managed Users ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 212, "Managed Users ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if active == "health" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 212, "System Health ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 213, "System Health ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 213, "System Health ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 214, "System Health ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } if active == "audit-log" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 214, "Audit Log") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 215, "Audit Log") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 215, "Audit Log") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 216, "Audit Log") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 216, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 217, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2780,7 +2790,7 @@ func AdminPage(health *cloudstore.DashboardSystemHealth, controls []cloudstore.P templ_7745c5c3_Var136 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 217, "

ADMIN SURFACE

Admin Overview

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 218, "

ADMIN SURFACE

Admin Overview

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2789,7 +2799,7 @@ func AdminPage(health *cloudstore.DashboardSystemHealth, controls []cloudstore.P return templ_7745c5c3_Err } if health != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 218, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 219, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2804,90 +2814,90 @@ func AdminPage(health *cloudstore.DashboardSystemHealth, controls []cloudstore.P return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 219, " Database
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 220, " Database
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var137 string templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Contributors)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 777, Col: 63} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 780, Col: 63} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var137)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 220, " Contributors
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 221, " Contributors
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var138 string templ_7745c5c3_Var138, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Sessions)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 781, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 784, Col: 59} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var138)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 221, " Sessions
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 222, " Sessions
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var139 string templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Observations)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 785, Col: 63} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 788, Col: 63} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var139)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 222, " Observations
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 223, " Observations
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var140 string templ_7745c5c3_Var140, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Prompts)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 789, Col: 58} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 792, Col: 58} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var140)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 223, " Prompts
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 224, " Prompts
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var141 string templ_7745c5c3_Var141, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Projects)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 793, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 796, Col: 59} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var141)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 224, " Projects
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 225, " Projects
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var142 string templ_7745c5c3_Var142, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(countPausedProjects(controls))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 797, Col: 73} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 800, Col: 73} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var142)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 225, " Paused Projects
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 226, "
Paused Projects
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 226, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 227, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2918,7 +2928,7 @@ func AdminProjectsPage(controls []cloudstore.ProjectSyncControl) templ.Component templ_7745c5c3_Var143 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 227, "

ADMIN SURFACE

Project Controls

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 228, "

ADMIN SURFACE

Project Controls

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2932,38 +2942,38 @@ func AdminProjectsPage(controls []cloudstore.ProjectSyncControl) templ.Component return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 228, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 229, "
ProjectSyncReasonUpdated ByUpdatedAction
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, control := range controls { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 229, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 247, "
ProjectSyncReasonUpdated ByUpdatedAction
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 231, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var145 string templ_7745c5c3_Var145, templ_7745c5c3_Err = templ.JoinStringErrs(control.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 833, Col: 112} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 836, Col: 112} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var145)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 231, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 232, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2978,12 +2988,12 @@ func AdminProjectsPage(controls []cloudstore.ProjectSyncControl) templ.Component return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 232, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 233, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if control.SyncEnabled { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 233, "-") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 234, "-") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2991,19 +3001,19 @@ func AdminProjectsPage(controls []cloudstore.ProjectSyncControl) templ.Component var templ_7745c5c3_Var146 string templ_7745c5c3_Var146, templ_7745c5c3_Err = templ.JoinStringErrs(*control.PausedReason) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 845, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 848, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var146)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 234, "No reason provided") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 235, "No reason provided") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 235, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 236, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3011,19 +3021,19 @@ func AdminProjectsPage(controls []cloudstore.ProjectSyncControl) templ.Component var templ_7745c5c3_Var147 string templ_7745c5c3_Var147, templ_7745c5c3_Err = templ.JoinStringErrs(*control.UpdatedBy) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 852, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 855, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var147)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 236, "System") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 237, "System") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 237, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 238, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3031,96 +3041,96 @@ func AdminProjectsPage(controls []cloudstore.ProjectSyncControl) templ.Component var templ_7745c5c3_Var148 string templ_7745c5c3_Var148, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(control.UpdatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 859, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 862, Col: 45} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var148)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 238, "Default") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 239, "Default") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 239, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if control.SyncEnabled { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, "\" hx-include=\"closest form\">On") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, "\" hx-include=\"closest form\">Off") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 248, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 248, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3162,64 +3172,64 @@ func ManagedUsersListPartial(users []cloudstore.HumanUser) templ.Component { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 249, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, "
UsernameDisplay NameRoleStatusCreatedAction
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, u := range users { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 250, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 261, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 261, "
UsernameDisplay NameRoleStatusCreatedAction
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 252, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var155 string templ_7745c5c3_Var155, templ_7745c5c3_Err = templ.JoinStringErrs(u.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 909, Col: 107} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 912, Col: 107} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var155)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 252, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 253, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var156 string templ_7745c5c3_Var156, templ_7745c5c3_Err = templ.JoinStringErrs(u.DisplayName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 910, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 913, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var156)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 253, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var157 string templ_7745c5c3_Var157, templ_7745c5c3_Err = templ.JoinStringErrs(u.Role) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 911, Col: 18} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 914, Col: 18} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var157)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 254, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 255, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3234,53 +3244,53 @@ func ManagedUsersListPartial(users []cloudstore.HumanUser) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 255, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 256, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var158 string templ_7745c5c3_Var158, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimeValue(u.CreatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 919, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 922, Col: 40} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var158)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 256, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 258, "\" class=\"switch-form\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if u.Enabled { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 258, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 259, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 259, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 260, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 262, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3315,7 +3325,7 @@ func ManagedUsersPage() templ.Component { templ_7745c5c3_Var160 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 262, "

ADMIN SURFACE

Managed Users

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 263, "

ADMIN SURFACE

Managed Users

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3323,7 +3333,7 @@ func ManagedUsersPage() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 263, "

CREATE MANAGED USER

New managed users are deny-by-default: they cannot sync any project until an admin grants one explicitly on the user's detail page.

Managed Users

Loading...

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 264, "

CREATE MANAGED USER

New managed users are deny-by-default: they cannot sync any project until an admin grants one explicitly on the user's detail page.

Managed Users

Loading...

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3358,20 +3368,20 @@ func ManagedUserDetailPage(user cloudstore.HumanUser, tokens []cloudstore.Princi templ_7745c5c3_Var161 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 264, "

MANAGED USER

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, "

MANAGED USER

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var162 string templ_7745c5c3_Var162, templ_7745c5c3_Err = templ.JoinStringErrs(user.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 985, Col: 23} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 988, Col: 23} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var162)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 265, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3386,7 +3396,7 @@ func ManagedUserDetailPage(user cloudstore.HumanUser, tokens []cloudstore.Princi return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 266, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 267, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3394,110 +3404,110 @@ func ManagedUserDetailPage(user cloudstore.HumanUser, tokens []cloudstore.Princi if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 267, "
Display Name") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 268, "
Display Name") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var163 string templ_7745c5c3_Var163, templ_7745c5c3_Err = templ.JoinStringErrs(user.DisplayName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 997, Col: 52} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1000, Col: 52} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var163)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 268, "
Email") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "
Email") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var164 string templ_7745c5c3_Var164, templ_7745c5c3_Err = templ.JoinStringErrs(emptyDash(user.Email)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 998, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1001, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var164)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 269, "
Role") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "
Role") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var165 string templ_7745c5c3_Var165, templ_7745c5c3_Err = templ.JoinStringErrs(user.Role) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 999, Col: 37} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1002, Col: 37} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var165)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 270, "
Created") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "
Created") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var166 string templ_7745c5c3_Var166, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimeValue(user.CreatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1000, Col: 62} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1003, Col: 62} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var166)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 271, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 273, "\" class=\"switch-form\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if user.Enabled { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 273, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 274, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 275, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 275, "

Tokens

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "

Tokens

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if user.Enabled { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 276, "

Tokens are shown only once, immediately after creation. Engram Cloud cannot redisplay a raw token afterward — revoke it and create a new one if it is lost.

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "\" class=\"managed-user-form\">

Tokens are shown only once, immediately after creation. Engram Cloud cannot redisplay a raw token afterward — revoke it and create a new one if it is lost.

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 278, "

Token creation unavailable. Enable this managed user before creating a managed token.

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "

Token creation unavailable. Enable this managed user before creating a managed token.

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3515,64 +3525,64 @@ func ManagedUserDetailPage(user cloudstore.HumanUser, tokens []cloudstore.Princi } } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 279, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "
PrefixNameCreatedLast UsedStatusAction
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, tok := range tokens { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 280, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 290, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 290, "
PrefixNameCreatedLast UsedStatusAction
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var169 string templ_7745c5c3_Var169, templ_7745c5c3_Err = templ.JoinStringErrs(tok.TokenPrefix) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1045, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1048, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var169)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 281, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var170 string templ_7745c5c3_Var170, templ_7745c5c3_Err = templ.JoinStringErrs(emptyDash(tok.Name)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1046, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1049, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var170)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 282, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var171 string templ_7745c5c3_Var171, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimeValue(tok.CreatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1047, Col: 44} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1050, Col: 44} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var171)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 283, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var172 string templ_7745c5c3_Var172, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimePtr(tok.LastUsedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1048, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1051, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var172)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 284, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 285, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3587,58 +3597,58 @@ func ManagedUserDetailPage(user cloudstore.HumanUser, tokens []cloudstore.Princi return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 285, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 286, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if tok.RevokedAt == nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 286, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 288, "\" class=\"switch-form\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 288, "-") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 289, "-") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 289, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 291, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 291, "

Project Grants

Project Grants

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 293, "\" class=\"managed-user-form\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3648,61 +3658,61 @@ func ManagedUserDetailPage(user cloudstore.HumanUser, tokens []cloudstore.Princi return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 293, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 294, "
ProjectGrantedAction
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, g := range grants { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 294, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "\" class=\"switch-form\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 298, "
ProjectGrantedAction
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 295, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var175 string templ_7745c5c3_Var175, templ_7745c5c3_Err = templ.JoinStringErrs(g.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1091, Col: 23} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1094, Col: 23} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var175)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 295, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 296, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var176 string templ_7745c5c3_Var176, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimeValue(g.CreatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1092, Col: 42} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1095, Col: 42} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var176)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 296, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 299, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3738,85 +3748,85 @@ func ManagedUserTokenCreatedPage(user cloudstore.HumanUser, rawToken string, tok templ_7745c5c3_Var178 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 300, "

TOKEN CREATED

Save this token now

This raw token is shown only once. Engram Cloud never stores or displays it again — copy it now and store it securely.

")
+		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "

TOKEN CREATED

Save this token now

This raw token is shown only once. Engram Cloud never stores or displays it again — copy it now and store it securely.

")
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
 		var templ_7745c5c3_Var179 string
 		templ_7745c5c3_Var179, templ_7745c5c3_Err = templ.JoinStringErrs(rawToken)
 		if templ_7745c5c3_Err != nil {
-			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1124, Col: 39}
+			return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1127, Col: 39}
 		}
 		_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var179))
 		if templ_7745c5c3_Err != nil {
 			return templ_7745c5c3_Err
 		}
-		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 301, "

Prefix ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, "

Prefix ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var180 string templ_7745c5c3_Var180, templ_7745c5c3_Err = templ.JoinStringErrs(token.TokenPrefix) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1125, Col: 46} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1128, Col: 46} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var180)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 302, " — ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 303, " — ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var181 string templ_7745c5c3_Var181, templ_7745c5c3_Err = templ.JoinStringErrs(emptyDash(token.Name)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1125, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1128, Col: 76} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var181)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 303, " — created ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 304, " — created ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var182 string templ_7745c5c3_Var182, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimeValue(token.CreatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1125, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1128, Col: 125} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var182)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 304, "

Back to ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "\">Back to ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var184 string templ_7745c5c3_Var184, templ_7745c5c3_Err = templ.JoinStringErrs(user.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1127, Col: 113} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1130, Col: 113} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var184)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 306, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 307, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3847,7 +3857,7 @@ func AdminHealthPage(health *cloudstore.DashboardSystemHealth) templ.Component { templ_7745c5c3_Var185 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 307, "

ADMIN SURFACE

Admin Health

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "

ADMIN SURFACE

Admin Health

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3855,12 +3865,12 @@ func AdminHealthPage(health *cloudstore.DashboardSystemHealth) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 308, "

System Health

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, "

System Health

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if health != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 309, "
Database") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 310, "
Database") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3875,85 +3885,85 @@ func AdminHealthPage(health *cloudstore.DashboardSystemHealth) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 310, "
Projects") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 311, "
Projects") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var186 string templ_7745c5c3_Var186, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Projects)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1158, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1161, Col: 39} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var186)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 311, "
Contributors") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "
Contributors") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var187 string templ_7745c5c3_Var187, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Contributors)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1162, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1165, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var187)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 312, "
Sessions") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, "
Sessions") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var188 string templ_7745c5c3_Var188, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Sessions)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1166, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1169, Col: 39} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var188)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 313, "
Observations") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 314, "
Observations") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var189 string templ_7745c5c3_Var189, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Observations)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1170, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1173, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var189)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 314, "
Prompts") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 315, "
Prompts") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var190 string templ_7745c5c3_Var190, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Prompts)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1174, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1177, Col: 38} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var190)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 315, "
Total Chunks") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 316, "
Total Chunks") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var191 string templ_7745c5c3_Var191, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(health.Chunks)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1178, Col: 37} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1181, Col: 37} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var191)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 316, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3963,7 +3973,7 @@ func AdminHealthPage(health *cloudstore.DashboardSystemHealth) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 317, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -3993,7 +4003,7 @@ func AdminForbidden() templ.Component { templ_7745c5c3_Var192 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 318, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4001,7 +4011,7 @@ func AdminForbidden() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 319, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 320, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4031,74 +4041,74 @@ func AdminSyncToggleFormPartial(control cloudstore.ProjectSyncControl) templ.Com templ_7745c5c3_Var193 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 320, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if control.SyncEnabled { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 323, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 325, "\" hx-include=\"closest form\">On") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 325, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 327, "\" hx-include=\"closest form\">Off") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 327, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 328, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4108,7 +4118,7 @@ func AdminSyncToggleFormPartial(control cloudstore.ProjectSyncControl) templ.Com // SessionDetailPage renders a connected session detail surface. // ADAPTED: CloudSession -> DashboardSessionRow; CloudObservation -> DashboardObservationRow; CloudPrompt -> DashboardPromptRow. -func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []cloudstore.DashboardObservationRow, prompts []cloudstore.DashboardPromptRow) templ.Component { +func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []cloudstore.DashboardObservationRow, prompts []cloudstore.DashboardPromptRow, showDelete bool) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -4129,35 +4139,35 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c templ_7745c5c3_Var198 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 328, "

SESSION TRACE

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 329, "

SESSION TRACE

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if session != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 329, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 330, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var199 string templ_7745c5c3_Var199, templ_7745c5c3_Err = templ.JoinStringErrs(session.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1217, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1220, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var199)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 330, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 331, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 331, "

Session

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, "

Session

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 332, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4167,111 +4177,111 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 333, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var200 string templ_7745c5c3_Var200, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(len(observations))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1228, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1231, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var200)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 334, " Observations
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, " Observations
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var201 string templ_7745c5c3_Var201, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(len(prompts))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1232, Col: 56} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1235, Col: 56} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var201)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 335, " Prompts
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, " Prompts
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var202 string templ_7745c5c3_Var202, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(session.StartedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1236, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1239, Col: 76} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var202)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 336, " Started
Session ID") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, " Started
Session ID") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var203 string templ_7745c5c3_Var203, templ_7745c5c3_Err = templ.JoinStringErrs(session.SessionID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1243, Col: 52} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1246, Col: 52} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var203)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 337, "
Project
Project") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var205 string templ_7745c5c3_Var205, templ_7745c5c3_Err = templ.JoinStringErrs(session.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1244, Col: 131} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1247, Col: 131} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var205)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 339, "
Directory") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 340, "
Directory") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var206 string templ_7745c5c3_Var206, templ_7745c5c3_Err = templ.JoinStringErrs(session.Directory) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1245, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1248, Col: 51} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var206)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 340, "
Started") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 341, "
Started") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var207 string templ_7745c5c3_Var207, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(session.StartedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1246, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1249, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var207)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 341, "
Ended") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 342, "
Ended") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4279,7 +4289,7 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c var templ_7745c5c3_Var208 string templ_7745c5c3_Var208, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(session.EndedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1251, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1254, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var208)) if templ_7745c5c3_Err != nil { @@ -4291,7 +4301,7 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 342, "
Summary") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 343, "
Summary") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4299,19 +4309,29 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c var templ_7745c5c3_Var209 string templ_7745c5c3_Var209, templ_7745c5c3_Err = templ.JoinStringErrs(session.Summary) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1261, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1264, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var209)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 343, "No session summary captured.") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, "No session summary captured.") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 344, "

Observations in this Session

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 345, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if showDelete { + templ_7745c5c3_Err = DashboardDeleteForm("session", session.Project, session.SessionID, session.SessionID).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, "

Observations in this Session

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4319,7 +4339,7 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 345, "

Prompts in this Session

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 347, "

Prompts in this Session

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4328,7 +4348,7 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 346, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 348, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4338,7 +4358,7 @@ func SessionDetailPage(session *cloudstore.DashboardSessionRow, observations []c // ObservationDetailPage renders the full observation payload with session context. // ADAPTED: CloudObservation -> DashboardObservationRow; CloudSession -> DashboardSessionRow. -func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardObservationRow) templ.Component { +func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, session *cloudstore.DashboardSessionRow, related []cloudstore.DashboardObservationRow, showDelete bool) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -4359,35 +4379,35 @@ func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, sess templ_7745c5c3_Var210 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 347, "

OBSERVATION DETAIL

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, "

OBSERVATION DETAIL

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if observation != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 348, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 350, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var211 string templ_7745c5c3_Var211, templ_7745c5c3_Err = templ.JoinStringErrs(observation.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1286, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1292, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var211)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 349, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 351, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 350, "

Observation

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 352, "

Observation

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 351, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4397,7 +4417,7 @@ func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, sess return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 352, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 354, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4409,59 +4429,59 @@ func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, sess if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 353, "
Chunk ID") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 355, "
Chunk ID") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var212 string templ_7745c5c3_Var212, templ_7745c5c3_Err = templ.JoinStringErrs(observation.ChunkID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1302, Col: 52} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1308, Col: 52} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var212)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 354, "
Session
Session") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 357, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var214 string templ_7745c5c3_Var214, templ_7745c5c3_Err = templ.JoinStringErrs(observation.SessionID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1303, Col: 187} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1309, Col: 187} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var214)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 356, "
Created") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 358, "
Created") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var215 string templ_7745c5c3_Var215, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(observation.CreatedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1304, Col: 70} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1310, Col: 70} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var215)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 357, "
Tool") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 359, "
Tool") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4469,19 +4489,19 @@ func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, sess var templ_7745c5c3_Var216 string templ_7745c5c3_Var216, templ_7745c5c3_Err = templ.JoinStringErrs(observation.ToolName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1309, Col: 31} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1315, Col: 31} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var216)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 358, "Unknown") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 360, "Unknown") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 359, "
Topic Key") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 361, "
Topic Key") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4489,19 +4509,19 @@ func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, sess var templ_7745c5c3_Var217 string templ_7745c5c3_Var217, templ_7745c5c3_Err = templ.JoinStringErrs(observation.TopicKey) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1319, Col: 31} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1325, Col: 31} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var217)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 360, "None") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 362, "None") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 361, "

CONTENT

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 363, "

CONTENT

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4509,84 +4529,94 @@ func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, sess if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 362, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 364, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if session != nil && showDelete { + templ_7745c5c3_Err = DashboardDeleteForm("observation", observation.Project, observation.SyncID, observation.SessionID).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 365, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if session != nil { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 363, "

LINKED SESSION

LINKED SESSION

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 367, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var219 string templ_7745c5c3_Var219, templ_7745c5c3_Err = templ.JoinStringErrs(session.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1335, Col: 152} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1344, Col: 152} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var219)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 365, "

Started ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 368, "

Started ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var220 string templ_7745c5c3_Var220, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestamp(session.StartedAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1336, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1345, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var220)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 366, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 369, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if session.Summary != "" { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 367, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 370, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var221 string templ_7745c5c3_Var221, templ_7745c5c3_Err = templ.JoinStringErrs(session.Summary) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1338, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1347, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var221)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 368, "

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 371, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 369, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 372, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 370, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 373, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(related) > 0 { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 371, "

More from this Session

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 374, "

More from this Session

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4596,7 +4626,88 @@ func ObservationDetailPage(observation *cloudstore.DashboardObservationRow, sess } } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 372, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 375, "") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +func DashboardDeleteForm(entity, project, entityKey, sessionID string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var222 := templ.GetChildren(ctx) + if templ_7745c5c3_Var222 == nil { + templ_7745c5c3_Var222 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 376, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4626,12 +4737,12 @@ func AdminAuditLogPage(displayName string, filter cloudstore.AuditFilter) templ. }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var222 := templ.GetChildren(ctx) - if templ_7745c5c3_Var222 == nil { - templ_7745c5c3_Var222 = templ.NopComponent + templ_7745c5c3_Var227 := templ.GetChildren(ctx) + if templ_7745c5c3_Var227 == nil { + templ_7745c5c3_Var227 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 373, "

ADMIN SURFACE

Audit Log

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 381, "

ADMIN SURFACE

Audit Log

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4639,20 +4750,20 @@ func AdminAuditLogPage(displayName string, filter cloudstore.AuditFilter) templ. if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 374, "

Loading audit log...

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 383, "\" hx-trigger=\"load\" hx-swap=\"innerHTML\">

Loading audit log...

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4677,105 +4788,105 @@ func AdminAuditLogListPartial(entries []cloudstore.DashboardAuditRow, pg Paginat }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var224 := templ.GetChildren(ctx) - if templ_7745c5c3_Var224 == nil { - templ_7745c5c3_Var224 = templ.NopComponent + templ_7745c5c3_Var229 := templ.GetChildren(ctx) + if templ_7745c5c3_Var229 == nil { + templ_7745c5c3_Var229 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 376, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if filter.Outcome == cloudstore.AuditOutcomeRejectedProjectPaused { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 379, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 388, "\" selected>Rejected (Paused)") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 381, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 390, "\">Rejected (Paused)") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 383, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 393, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4785,108 +4896,108 @@ func AdminAuditLogListPartial(entries []cloudstore.DashboardAuditRow, pg Paginat return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 386, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 394, "
TimeContributorProjectActionOutcomeEntriesReason
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, entry := range entries { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 387, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 402, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 395, "
TimeContributorProjectActionOutcomeEntriesReason
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 395, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var231 string - templ_7745c5c3_Var231, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestampStr(entry.OccurredAt)) + var templ_7745c5c3_Var236 string + templ_7745c5c3_Var236, templ_7745c5c3_Err = templ.JoinStringErrs(formatTimestampStr(entry.OccurredAt)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1414, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1433, Col: 49} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var231)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var236)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 388, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 396, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var232 string - templ_7745c5c3_Var232, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Contributor) + var templ_7745c5c3_Var237 string + templ_7745c5c3_Var237, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Contributor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1415, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1434, Col: 30} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var232)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var237)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 389, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 397, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var233 string - templ_7745c5c3_Var233, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Project) + var templ_7745c5c3_Var238 string + templ_7745c5c3_Var238, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Project) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1416, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1435, Col: 26} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var233)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var238)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 390, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 398, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var234 string - templ_7745c5c3_Var234, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Action) + var templ_7745c5c3_Var239 string + templ_7745c5c3_Var239, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Action) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1417, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1436, Col: 25} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var234)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var239)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 391, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 399, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var235 string - templ_7745c5c3_Var235, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Outcome) + var templ_7745c5c3_Var240 string + templ_7745c5c3_Var240, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Outcome) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1418, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1437, Col: 26} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var235)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var240)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 392, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 400, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var236 string - templ_7745c5c3_Var236, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(entry.EntryCount)) + var templ_7745c5c3_Var241 string + templ_7745c5c3_Var241, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(entry.EntryCount)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1419, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1438, Col: 41} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var236)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var241)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 393, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 401, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var237 string - templ_7745c5c3_Var237, templ_7745c5c3_Err = templ.JoinStringErrs(entry.ReasonCode) + var templ_7745c5c3_Var242 string + templ_7745c5c3_Var242, templ_7745c5c3_Err = templ.JoinStringErrs(entry.ReasonCode) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1420, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/cloud/dashboard/components.templ`, Line: 1439, Col: 29} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var237)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var242)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 394, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 403, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4895,7 +5006,7 @@ func AdminAuditLogListPartial(entries []cloudstore.DashboardAuditRow, pg Paginat return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 396, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 404, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/cloud/dashboard/dashboard.go b/internal/cloud/dashboard/dashboard.go index 72b5752f0..ca9e2adeb 100644 --- a/internal/cloud/dashboard/dashboard.go +++ b/internal/cloud/dashboard/dashboard.go @@ -49,6 +49,11 @@ type MountConfig struct { ManagedUsers ManagedUsersStore MaxLoginBodyBytes int64 StatusProvider SyncStatusProvider + EnableDelete bool +} + +type DashboardDeleteStore interface { + DeleteDashboardEntity(ctx context.Context, project, entity, entityKey, sessionID, actor string) error } type DashboardStore interface { @@ -152,12 +157,49 @@ func Mount(mux *http.ServeMux, cfg MountConfig) { mux.HandleFunc("GET /dashboard/sessions/{project}/{sessionID}", h.requireSession(h.handleSessionDetail)) mux.HandleFunc("GET /dashboard/observations/{project}/{sessionID}/{syncID}", h.requireSession(h.handleObservationDetail)) mux.HandleFunc("GET /dashboard/prompts/{project}/{sessionID}/{syncID}", h.requireSession(h.handlePromptDetail)) + mux.HandleFunc("POST /dashboard/delete", h.requireSession(h.handleDelete)) // Audit log routes — admin-gated (REQ-408, REQ-409). mux.HandleFunc("GET /dashboard/admin/audit-log", h.requireSession(h.handleAdminAuditLog)) mux.HandleFunc("GET /dashboard/admin/audit-log/list", h.requireSession(h.handleAdminAuditLogList)) } +func (h *handlers) handleDelete(w http.ResponseWriter, r *http.Request) { + p := h.principalFromRequest(r) + if !h.cfg.EnableDelete || !p.IsAdmin() { + http.Error(w, "forbidden", http.StatusForbidden) + return + } + if err := r.ParseForm(); err != nil { + http.Error(w, "invalid form", http.StatusBadRequest) + return + } + project := strings.TrimSpace(r.FormValue("project")) + entity := strings.TrimSpace(r.FormValue("entity")) + entityKey := strings.TrimSpace(r.FormValue("entity_key")) + sessionID := strings.TrimSpace(r.FormValue("session_id")) + if project == "" || entityKey == "" || sessionID == "" || (entity != "session" && entity != "observation" && entity != "prompt") { + http.Error(w, "invalid delete target", http.StatusBadRequest) + return + } + store, ok := h.cfg.Store.(DashboardDeleteStore) + if !ok { + http.Error(w, "delete is unavailable", http.StatusNotImplemented) + return + } + if err := store.DeleteDashboardEntity(r.Context(), project, entity, entityKey, sessionID, p.DisplayName()); err != nil { + h.renderStoreError(w, r, "browser", "Delete", err) + return + } + redirectURL := "/dashboard/browser" + if isHTMXRequest(r) { + w.Header().Set("HX-Redirect", redirectURL) + w.WriteHeader(http.StatusOK) + return + } + http.Redirect(w, r, redirectURL, http.StatusSeeOther) +} + func Handler() http.Handler { return HandlerWithStatus(staticSyncStatusProvider{status: SyncStatus{Phase: "idle"}}) } @@ -929,7 +971,7 @@ func (h *handlers) handleSessionDetail(w http.ResponseWriter, r *http.Request) { obs = o prompts = pr } - component := SessionDetailPage(sess, obs, prompts) + component := SessionDetailPage(sess, obs, prompts, h.cfg.EnableDelete && p.IsAdmin()) renderComponent(w, r, Layout("Session Detail", p.DisplayName(), "browser", p.IsAdmin(), component)) } @@ -956,7 +998,7 @@ func (h *handlers) handleObservationDetail(w http.ResponseWriter, r *http.Reques sess = &s related = rel } - component := ObservationDetailPage(obs, sess, related) + component := ObservationDetailPage(obs, sess, related, h.cfg.EnableDelete && p.IsAdmin()) renderComponent(w, r, Layout("Observation Detail", p.DisplayName(), "browser", p.IsAdmin(), component)) } @@ -983,7 +1025,7 @@ func (h *handlers) handlePromptDetail(w http.ResponseWriter, r *http.Request) { sess = &s related = rel } - component := PromptDetailPage(prompt, sess, related) + component := PromptDetailPage(prompt, sess, related, h.cfg.EnableDelete && p.IsAdmin()) renderComponent(w, r, Layout("Prompt Detail", p.DisplayName(), "browser", p.IsAdmin(), component)) }