You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The settings store (`src/renderer/features/settings/stores/settingsStore.ts`) provides a reusable "learned hints" system for progressive feature discovery. Hints are shown a limited number of times until the user demonstrates they've learned the behavior.
287
+
288
+
```typescript
289
+
// In the store: hints is Record<string, { count: number; learned: boolean }>
290
+
const store =useFeatureSettingsStore.getState();
291
+
292
+
// Check if a hint should still be shown (max N times, not yet learned)
293
+
if (store.shouldShowHint("my-hint-key", 3)) {
294
+
store.recordHintShown("my-hint-key");
295
+
toast.info("Did you know?", "You can do X with Y.");
296
+
}
297
+
298
+
// When the user demonstrates the behavior, mark it learned (stops showing)
299
+
store.markHintLearned("my-hint-key");
300
+
```
301
+
302
+
Hint state is persisted via `electronStorage`. Use this pattern instead of ad-hoc boolean flags when introducing new discoverable features.
303
+
284
304
## Services
285
305
286
306
Services encapsulate business logic and exist in both processes:
0 commit comments