La radio no se dibuja para un invitado ni contra un servidor viejo
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Las emisoras las busca el servidor, así que dos situaciones que no son bugs se veían como uno: sin sesión (el modo invitado nunca habla con la api) y una api más vieja que la app —se despliegan por separado, y un deploy que reconstruyó `web` y no el contenedor de la api es una pantalla cuyos pedidos fallan todos. Ahora la sección lo dice y no pide nada en ninguno de los dos casos. Para poder distinguirlos, `radio` entra en `features` (`GET /api/config`), que es exactamente para lo que existe esa lista, y queda documentado en la especificación junto con `features` entero —que hasta ahora no estaba. De paso: la fila y la barra caen al marcador de posición cuando el logo o la portada no cargan, que es el caso de una parte del directorio.
This commit is contained in:
1 parent
8f26b536fd
commit
a3e13df279
7 files changed
+108
-25
No files matched your search
+25
-1
@@ -130,6 +130,12 @@ paths:
|
||||
description: |
|
||||
The flags the login screen needs before anyone is signed in. Both reflect
|
||||
environment variables on the server (`INVITE_ONLY`, `ALLOW_GUEST`).
|
||||
|
||||
`features` is the one that exists because the app and the api are deployed separately: the
|
||||
frontend is rebuilt from source on every deploy while the api's code lives inside its
|
||||
container, so a deploy can leave a new screen on top of an older api. Naming what this
|
||||
server can do lets a screen say "this server is older than the app" instead of showing a
|
||||
request that quietly fails — or, worse, a number that never moves.
|
||||
security: []
|
||||
responses:
|
||||
'200':
|
||||
@@ -147,7 +153,25 @@ paths:
|
||||
description: >-
|
||||
When false, the client hides "continue without account".
|
||||
Guest mode is purely client-side and never calls this API.
|
||||
example: { invite_only: true, allow_guest: false }
|
||||
features:
|
||||
type: array
|
||||
description: >-
|
||||
What this build of the api supports, so a client can tell an older server from
|
||||
a broken one. Clients must treat a missing or non-array `features` as "old
|
||||
server", never as "supports everything".
|
||||
items:
|
||||
type: string
|
||||
enum: [vitals, vitals.hours, vitals.receipt, music.lookup, radio, insights]
|
||||
coach:
|
||||
type: object
|
||||
description: Present only when the AI Coach is configured on this instance.
|
||||
properties:
|
||||
enabled: { type: boolean }
|
||||
provider: { type: string }
|
||||
providerLabel: { type: string }
|
||||
authMode: { type: string, enum: [instance, byok] }
|
||||
community: { type: boolean }
|
||||
example: { invite_only: true, allow_guest: false, features: [vitals, radio, insights] }
|
||||
|
||||
/api/me:
|
||||
get:
|
||||
|
||||
Reference in new issue
Block a user