Skip to content

Save user layout preferences to account, not just local cache #816

@deferredreward

Description

@deferredreward

Problem

Window/card layout preferences are currently saved only in localStorage under {username}_resourceLayout.
This means:

  • Incognito windows — localStorage is cleared on window close, forcing users to rearrange all cards on every
    session.
  • Cache clears — any browser cache wipe loses the layout.
  • Multiple devices/browsers — layout doesn't sync across them.

This is a significant daily friction point for users who rely on incognito mode to avoid unrelated caching issues.

Proposed Solution

Use the DCS Gitea User Settings API (GET/PATCH /api/v1/user/settings) to persist layout preferences
server-side, tied to the authenticated user account.

Behaviour

  1. On login — fetch layout from server and apply it; falls back to localStorage if no server value exists yet.
  2. On layout change — debounced (1.5 s) save to server alongside the existing localStorage save.
  3. Server unavailable — fails silently, localStorage continues to work as before.

Acceptance Criteria

  • Arrange cards in one incognito session, close it, reopen incognito and log in — layout is restored
    automatically.
  • Layout changes are saved to GET {server}/api/v1/user/settings within ~2 seconds of last drag/resize.
  • No regression when server is offline (graceful localStorage fallback).
  • Works on both production (git.door43.org) and QA (qa.door43.org) servers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions