Show who acted when it was a service account, and who assigned/archived #2

Open
opened 2026-10-08 07:32:20 +00:00 by niklas · 0 comments
Owner

The server now sends actor information the TUI does not display. Everything below is additive/omitempty, so the TUI's parsing is unaffected and nothing breaks; it just shows no actor.

Server fields to mirror (internal/api/types.go, internal/api/client.go)

From terdut-server#25 (v0.37.2):

  • Incident: acknowledged_by_service_account_id, acknowledged_by_service_account
  • IncidentEvent: service_account_id, service_account_name

From terdut-server#35 (v0.39.0):

  • IncidentEvent on assigned events (where user_id is the assignee): actor_user_id, actor_username, actor_service_account_id, actor_service_account_name. Absent for assignments made before v0.39.0.
  • New event types archived and unarchived (actor in user_id/service_account_id as for the other events).

Rendering

  • Incident view: "acknowledged by" falls back to the service-account name when acknowledged_by is empty.
  • Timeline: an event's actor is the user, else the service account, else nobody (the server acted). assigned reads "Assigned to X by Y" when an actor is present; add archived / unarchived lines.
  • The web UI's actorLabel / assignerLabel / eventText in terdut-server internal/web/static/js/incident.js is the reference.

No server version bump needed to detect this: the fields are simply absent against an older server.

The server now sends actor information the TUI does not display. Everything below is additive/omitempty, so the TUI's parsing is unaffected and nothing breaks; it just shows no actor. ## Server fields to mirror (`internal/api/types.go`, `internal/api/client.go`) From terdut-server#25 (v0.37.2): - `Incident`: `acknowledged_by_service_account_id`, `acknowledged_by_service_account` - `IncidentEvent`: `service_account_id`, `service_account_name` From terdut-server#35 (v0.39.0): - `IncidentEvent` on `assigned` events (where `user_id` is the **assignee**): `actor_user_id`, `actor_username`, `actor_service_account_id`, `actor_service_account_name`. Absent for assignments made before v0.39.0. - New event types `archived` and `unarchived` (actor in `user_id`/`service_account_id` as for the other events). ## Rendering - Incident view: "acknowledged by" falls back to the service-account name when `acknowledged_by` is empty. - Timeline: an event's actor is the user, else the service account, else nobody (the server acted). `assigned` reads "Assigned to X by Y" when an actor is present; add `archived` / `unarchived` lines. - The web UI's `actorLabel` / `assignerLabel` / `eventText` in terdut-server `internal/web/static/js/incident.js` is the reference. No server version bump needed to detect this: the fields are simply absent against an older server.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: niklas/terdut-tui#2