ワンクリックで
dialogs-slice
Global dialogs Redux slice pattern for MVVM dialog state management
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Global dialogs Redux slice pattern for MVVM dialog state management
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Enforce import boundaries inside the devtools scope. Use for any work in "devtools/**".
Official Ledger wallet-cli - USB-based CLI for Ledger hardware wallet flows (account discover, receive, balances, operations, send, swap quote/execute/status, genuine-check, assets token / token-by-id). Use for any wallet-cli command execution and for mapping informal requests to the right command.
Handle batches of Jira tickets through shared analysis, per-ticket feature-dev, Lumen UI guardrails, changesets, and draft PRs. Use when the user provides multiple Jira tickets or asks to deliver tickets one by one with PRs.
Trigger the on-demand production build workflows on LedgerHQ/ledger-live-build (Desktop, Android APK, iOS) for a ledger-live branch, then post a PR comment. Use when asked to "run builds", "produce a build", "build the app(s)", or "make an APK/iOS/desktop build" for a PR/branch.
Guided feature development with codebase understanding and architecture focus
Rules and layout for coin module packages under libs/coin-modules/. Read when adding or modifying a coin module.
| name | dialogs-slice |
| description | Global dialogs Redux slice pattern for MVVM dialog state management |
Centralized Redux state for global dialog open/close, avoiding one slice per dialog.
Use this pattern for dialogs that are:
Default.tsx)Do NOT use this for dialogs that are local to a single component or screen -- prefer a simple useState instead.
renderer/reducers/dialogs.ts manages all global dialog states via a Record<DialogId, boolean>DIALOG_IDS runtime array defines all IDs; DialogId type is derived from it via (typeof DIALOG_IDS)[number]*Dialog.ts file that re-exports typed helpers bound to its IDmvvm/features/GlobalDialogs/index.tsx renders all global dialog components at the app rootAdd the new ID to the DIALOG_IDS array in renderer/reducers/dialogs.ts. The DialogId type updates automatically:
export const DIALOG_IDS = ["RELEASE_NOTES", "MY_NEW_DIALOG"] as const;
// DialogId is now "RELEASE_NOTES" | "MY_NEW_DIALOG"
Create myFeature/myNewDialog.ts in the feature folder:
import {
openDialog,
closeDialog,
selectIsDialogOpen,
type DialogId,
} from "~/renderer/reducers/dialogs";
import type { State } from "~/renderer/reducers";
const DIALOG_ID: DialogId = "MY_NEW_DIALOG";
export const openMyNewDialog = () => openDialog(DIALOG_ID);
export const closeMyNewDialog = () => closeDialog(DIALOG_ID);
export const selectIsMyNewDialogOpen = (state: State) => selectIsDialogOpen(state, DIALOG_ID);
import { selectIsMyNewDialogOpen, closeMyNewDialog } from "../myNewDialog";
const useMyNewDialogViewModel = () => {
const isOpen = useSelector(selectIsMyNewDialogOpen);
const dispatch = useDispatch();
const onClose = useCallback(() => dispatch(closeMyNewDialog()), [dispatch]);
return { isOpen, onClose };
};
Add the dialog component to mvvm/features/GlobalDialogs/index.tsx:
import MyNewDialog from "LLD/features/MyFeature";
const GlobalDialogs = () => (
<>
<ModularDialogRoot />
<SendFlowRoot />
<ReleaseNotes />
<MyNewDialog />
</>
);
import { openMyNewDialog } from "LLD/features/MyFeature/myNewDialog";
dispatch(openMyNewDialog());
useState insteadDIALOG_IDS array (the type is derived automatically)GlobalDialogs/index.tsx, not directly in Default.tsxreducers/index.ts or Default.tsx is needed when adding new dialogsapps/ledger-live-desktop/src/renderer/reducers/dialogs.tsapps/ledger-live-desktop/src/mvvm/features/GlobalDialogs/index.tsxapps/ledger-live-desktop/src/mvvm/features/ReleaseNotes/releaseNotesDialog.ts