원클릭으로
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 직업 분류 기준
| 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.tsEnforce 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.