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
{{ message }}
Repository navigation
Convert remaining $effect misuse to derived values and event handlers #1511
A localized cluster of $effect blocks is used where a $derived value or a plain event handler is the correct primitive — the plausible source of the state-cascade races. These are separate from the store-subscription anti-pattern tracked elsewhere.
Problem Statement
The worst cases: a title-sync effect deferred via tick().then(...) to dodge state_unsafe_mutation (a mis-modeled derivation); an effect that both reads and writes reloginDismissed; effects that fire a parent onTitleChange callback from a state-tracking effect; and prop→state mirrors. Ordering between these effects is the race smell.
Proposed Solution
Convert each to the correct primitive per ADR-049: $derived for computed values, event handlers for imperative actions on a discrete event. Start with the deferred title-sync and the read-and-write effects.
Acceptance Criteria
The title-sync deferred-write effect is replaced by a derived title
Read-and-write effects (e.g. reloginDismissed) are converted
onTitleChange-from-effect sites become derived/events
Activity
malibio commentedon Jul 6, 2026
Baseline (worktree issue-1511-effect-to-derived): Frontend: 3947 passed, 1 failed (pre-existing flaky perf timing test: architecture-benchmarks.test.ts bulk structural ops 25.19ms vs 25ms threshold, unrelated to this issue).
Address review: add authRequiredEpisode test coverage + guard comment
Convert remaining $effect misuse to derived values and event handlers (…