ReviewOS

stacks/ts-cloud

dashboard: confirm tokens use generic verbs instead of the resource name

#124
Closed glennmichael123 opened this 2 months ago ·
2 months ago

Where a typed confirmation does exist, several pages use a generic verb as the token — the same word already printed on the button. Retyping purge to confirm a "Purge" button doesn't establish intent, it just adds a keystroke.

Affected:

  • packages/ui/pages/serverless.stx:125,126,247 — rollback, redeploy
  • packages/ui/pages/serverless/deployments.stx:51,52
  • packages/ui/pages/serverless/queues.stx:121 — purge (irreversible DLQ purge)
  • packages/ui/pages/serverless/scheduler.stx:55 — disable
  • packages/ui/pages/serverless/assets.stx:53 — invalidate
  • packages/ui/pages/serverless/data.stx:88 — scale
  • packages/ui/pages/server/backups.stx:59,60

The correct pattern is already used elsewhere and should be applied uniformly — the token is the resource name: server/sites.stx:40, server/services.stx:67, server/workers.stx:63, server/deployments.stx:104.

Related: server/services.stx:64-69 shares one token (s.name) across all six operations, so the typed text can't distinguish "restart nginx" from "stop nginx" — only the prose verb differs. The verb should be part of the token or made prominent in the confirm bar.

Also unconfirmed, high blast radius

  • serverless/secrets.stx:126 — setSecret() overwrites a production secret with no confirmation and no read-back (while delete, the less destructive op, is guarded at :104).
  • server/sites.stx:179 — saveEdit() with ssl='false' disables TLS on a live domain in one click.
  • server/database.stx:112 — per-database backup has no in-flight lock, so N clicks start N concurrent dumps.
8 days ago

Roadmap relationship: tracked by #133 under master roadmap #132.

8 days ago

Implemented and pushed to main in 28fccc7 (fix(ui): identify resources in operation confirms).

The confirmation prompt now names the actual application, scheduler, asset bucket, Aurora cluster, queue/DLQ, backup target, database/server, secret, site, or service action+unit instead of asking the operator to retype the button verb. The backend protocol token remains separate from the operator-facing resource token.

Also closed the high-blast-radius gaps listed here:

  • existing secret values require the exact secret id before overwrite
  • disabling TLS requires the exact site name
  • database create/user/backup mutations share an in-flight lock and recover from non-JSON/network failures

@ts-cloud/ui builds all 46 routes successfully.

Sign in to comment on this issue.