Files
Toju/agents-docs/features/signal-server-tag.md
2026-07-14 00:41:05 +02:00

2.0 KiB

Signal Server Tag

Status: Active Last updated: 2026-07-05

Users registered on a signal server can show that server's display tag on their profile card (opened by clicking their name or avatar).

Responsibilities

  • Server: expose a human-readable tag per endpoint (not per user identity).
  • Client: resolve tag for a user's home signaling server (homeSignalServerUrl) and render on profile cards.

Server configuration

server/data/variables.json accepts an optional serverTag string. When omitted, the server falls back to its public URL built from serverProtocol, serverHost, and serverPort (server/src/config/variables.ts).

Health API

GET /api/health includes serverTag so clients can cache the display label per configured endpoint.

WebSocket presence

The client sends homeSignalServerUrl in identify messages. The signaling server echoes that value in server_users and user_joined payloads so other clients can resolve the correct tag. See signaling.md.

Client behavior

  • Login and registration store homeSignalServerUrl on the current user.
  • Profile cards show the resolved tag beside the username in muted text (profile-signal-server-tag.component).
  • Configured labels render as #tag; URL fallbacks render as a globe icon with the URL in a tooltip.
  • Tag resolution (signal-server-tag.rules.ts): match homeSignalServerUrl against configured endpoints and prefer cached health serverTag; otherwise show the raw URL fallback.

Testing

  • toju-app/src/app/domains/server-directory/domain/logic/signal-server-tag.rules.spec.ts
  • server/src/websocket/handler-status.spec.ts (presence payload includes homeSignalServerUrl)

Changelog

Date Change
2026-07-05 Clarified per-endpoint tag vs per-user home URL; added test references