elsa-workflows / elsa-workflows/elsa-studio
[Epic] Unified User Preference & UI State Persistence Framework for Elsa Studio
- Dominant language
- C#
- Stars
- 301
- Forks
- 181
- Avg merge
- 17h 12m
- Merged PRs (30d)
- 42
Description
## Overview
This epic covers the implementation of a unified, extensible **user preference and UI state persistence framework** for Elsa Studio. The goal is to address longstanding usability issues and enhance the user experience by remembering user customizations and interests, from dark mode to table configuration to workflow studio layout.
### Why do this?
Multiple issues and user feedback reflect friction caused by lost preferences, table resets, and UI state not being persisted across sessions. By implementing a robust framework for managing user state, Elsa Studio will:
- Offer a more professional, "sticky" user experience
- Save time for repeat users and teams
- Make customization and accessibility features more discoverable and sticky
- Prepare the system for eventual server-synced profile persistence
---
## Scope
This epic covers all aspects of **persisting and restoring end-user preferences and UI state** where there is a clear benefit to users. Example settings:
- **Theme** (dark/light/system)
- **Workflow Studio shell layout** (splitter positions, active/collapsed panels)
- **Active tabs and visibility toggles** (per session, e.g. panel expanded/collapsed)
- **Workflow list/table view state** (columns, sorting, filters, page size, etc.)
**Durability:**
- Persist to `localStorage` for durable settings (theme, layout, tables)
- Persist to `sessionStorage` for transient UI toggles (collapsed/expanded per tab session)
- Designed to be extensible to server-profile storage later
---
## Design Principles
- **Scoping:** Use clear key scoping (`user`, `user:route`, etc.) for storage keys
- **Global, local, and session options:** Easy control over storage lifetime and _where_ it is kept
- **Versioning:** version all settings, provide for migrations
- **Debounced updates:** Avoid excessive writes, debounce mutations
- **Validation:** settings should validate before restoring
- **Reset options:** Always "reset preferences/layout" affordance for users
---
## Out of Scope
- Any server-API components (but ready by design for future server profile persistence)
---
## Related Issues
- [Persist user layout preferences in Workflow Studio (panels resizing/collapsing)](https://github.com/elsa-workflows/elsa-studio/issues/582)
- [Dark mode gone after reload](https://github.com/elsa-workflows/elsa-studio/issues/602)
- [Persist settings for workflow table and add "last modified" field.](https://github.com/elsa-workflows/elsa-studio/issues/216)
- [Manually created layouts are completely destroyed when switching views or reloading the page.](https://github.com/elsa-workflows/elsa-studio/issues/679)
---
## Sub-issues / Tasks
1. **Design and Spec**: Document setting definition API, supported scopes, and storage mechanics
2. **Core Persistence Service**: Implement the Blazor service, pluggable with `LocalStorage` & `SessionStorage`
3. **Setting Definitions & Hook/Composable**: Provide ergonomic component APIs for using persisted state in Blazor
4. **Persist Theme**
5. **Persist Workflow Studio Shell Layout**
6. **Persist Table/Grid State**
7. **Reset Mechanisms** (per-area and global)
8. **Docs & Dev Guidance**: How to add new settings, extend to profile sync
---
**Example UI/UX Workflow**:
- User edits studio layout → splitter/side panel state is saved automatically (debounced)
- User opens dark mode → preference persists
- User sorts table, sets page size → setting persists for user until reset
---
Contributor guide
Assessment
This issue has not been assessed yet.