بنقرة واحدة
kea-atomic-selectors
TypeScript Kea framework - adding atomic signal selectors and logic.selectorHealth
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
TypeScript Kea framework - adding atomic signal selectors and logic.selectorHealth
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Frontend design and UI component implementation patterns.
Go agent patterns for exploring, editing, and validating Go codebases.
TypeScript library framework-wiring patterns for adding features to existing codebases.
| name | kea-atomic-selectors |
| description | TypeScript Kea framework - adding atomic signal selectors and logic.selectorHealth |
| args | [] |
When a task asks you to add atomic/signal selectors to Kea, the implementation is not complete until you modify the existing Kea source files to wire the feature in. Do not leave the code in standalone files.
src/kea/build.ts
BuiltLogic object is constructed in getBuiltLogic() around lines 88-119.mount, unmount, isMounted) are attached, attach selectorHealth.selectorHealth must be a method on the logic instance that returns health metadata for every selector in this logic.src/core/selectors.ts
src/kea/build.ts.src/kea/context.ts
atomicSelectors option from resetContext({ atomicSelectors: true }).src/kea/build.ts and src/core/selectors.ts can decide whether to enable atomic tracking.src/index.ts
AtomicSelectorHealth, AtomicSelectorEngine).logic.selectorHealth() exists on mounted BuiltLogic instances.logic.selectorHealth() returns { selectors: Record<name, { dependencies, dependents, evaluations, dirtyCause }>, topologicalOrder: string[] }.user.name, not just user.resetContext({ atomicSelectors: true }) was used.rollup.config.js, tsconfig.json, or build tooling unless the task explicitly requires it. If npm test fails inside the test:tsd or build step, run the focused jest test file instead: npx jest test/jest/atomic.js (or the relevant test file). Only run the full npm test after the focused atomic tests pass.const { kea } = require('./src/index.ts') // or built output
const logic = kea({ selectors: { userName: [(s) => s.user, (u) => u.name]] } })
logic.mount()
console.log(typeof logic.selectorHealth) // must be 'function'
If logic.selectorHealth is undefined, you have not wired it into src/kea/build.ts. Fix that before finishing.