robius-state-management

Manage and persist Makepad application state with serde-based serialization.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/RoooyHe/betula --skill robius-state-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: robius-state-management
Source: https://github.com/RoooyHe/betula/tree/main/.claude/skills/robius-state-management
Command: npx skills add https://github.com/RoooyHe/betula --skill robius-state-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides best practices for managing and persisting application state in Makepad-based apps, using Robrix and Moly patterns to keep UI state coherent across sessions and components.

Core Features & Use Cases

  • State architecture design for Makepad apps (AppState, SelectedRoom, per-item state)
  • Persistent state handling with serde-based serialization
  • Scope-based data propagation to share UI state across widgets
  • Central Store pattern inspiration for large apps
  • Real-world use: maintain selected room, layout state, and preferences across restarts.

Quick Start

To start, implement an AppState struct with fields for selected_room, saved_layout_state, and saved_state_per_item, then attach AppState to the UI via Scope::with_data, and use provided patterns from _base directory to implement persistence and theming.

Frequently Asked Questions about robius-state-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage application state in Makepad apps to keep UI coherent across restarts?

To manage application state in Makepad, implement an AppState struct with fields for UI selections and use serde-based serialization to persist data across sessions. This ensures your layout and preferences remain coherent after restarts.

How does Scope::with_data propagate shared UI state across Makepad widgets?

Scope::with_data propagates shared UI state across Makepad widgets by attaching your AppState struct to the UI scope. This allows downstream components to access centralized data like selected items and layout configurations directly.

Can I use serde for local persistence and central store patterns in Makepad?

Yes, you can use serde for local persistence and central store patterns in Makepad. The framework enforces serde-based serialization to safely handle state upgrades and maintain persistent data across different storage patterns.

What is the best way to structure AppState for Makepad applications using Robius patterns?

The best way to structure AppState for Makepad is defining fields for selected_room, saved_layout_state, and saved_state_per_item. This architecture separates individual widget data from global preferences for robust state management.

Does the central store pattern work for large Makepad applications?

The central store pattern works for large Makepad applications by providing a centralized registry for state management. It scales state propagation across numerous components while maintaining coherent data synchronization through Scope-based sharing.