Skip to content

[bug] v2 dashboard layout read returns null members its schema marks non-nullable #2908

Closed

Description

@Quick104

What happened

GET /api/v2/admin/dashboard/layout answers {"layout":null,"updated_at":null} for an administrator who has never saved a layout. The operation's own description says "Null means retain the local/default arrangement", but the AdminDashboardLayout schema declares layout as a non-nullable object and updated_at as a non-nullable string, and both are required. The response therefore fails its own schema, and a client generated from the v2 document fails to decode it (or types the members as never null).

Steps to reproduce

  1. On a Silo dev deployment, sign in as an administrator who has not saved a dashboard layout.
  2. GET /api/v2/admin/dashboard/layout. The body is {"layout":null,"updated_at":null}.
  3. Validate the body against components.schemas.AdminDashboardLayout in GET /api/v2/openapi.json. It fails: at '/layout': got null, want object and at '/updated_at': got null, want string.

Expected behavior

The schema marks both members nullable, matching the documented "null means default" behavior, so the response validates and generated clients type them as optional.

Silo version / commit

main at d00462089.

Deployment

A Silo dev deployment (disposable sandbox).

Area

API

Clients affected

  • Web UI
  • Android
  • iOS/tvOS/macOS
  • Jellyfin-compat client (Infuse, Findroid, ...)
  • Other/not client-specific

The web admin dashboard passes both values through and shows the default arrangement today. A client generated from the schema treats both members as never null.

Relevant logs

no logs available

Technical notes

  • internal/apiv2/admin_dashboard_layout.go: AdminDashboardLayout.Layout *DashboardLayoutDocument and UpdatedAt *Instant have no nullable:"true", and DashboardLayoutDocument.Schema returns an object schema without Nullable.
  • Making a response member nullable is a breaking change for make verify-apiv2-contract (oasdiff), so it needs a contracts/api/v2/breaking-approvals.json entry while v2 is unlocked.

AI harness

Claude Code (running in T3 Code)

AI tool(s)

Claude Code, GitHub CLI

AI model(s)

claude-opus-5-5

AI involvement

AI-assisted

Independent or adversarial review

n/a

Confirmations

  • I searched open and recently closed issues and pull requests, and this is not already reported
  • I reproduced this myself on a real deployment
  • Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above

Source: found while verifying the fix for #2903

Activity

  1. added
    bug
    on Oct 22, 2026
  2. added
    api-v2
    impact: compat
    priority: P2
    on Oct 22, 2026
  3. added 3 commits that reference this issue on Nov 9, 2026
    8701691
    d551a40
    191dbc5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-v2bugimpact: compatpriority: P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions