[Review] behaviorPatternInsights slice(0, 20) is applied AFTER dismissed-state propagation — dismissed ghosts consume slice budget #182
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#182
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
src/lib/store.ts:1025-1027(analyzeBehaviorPatterns):The slice is applied after dismissed-state propagation. So if a user has dismissed 15 insights over time, and only 10 active insights remain,
mergedhas 25 entries (10 active + 15 dismissed), andslice(0, 20)holds the first 10 active + 10 dismissed. The user's view shows 10 dismissed insights crowding out active ones.Suggested fix
Separate the visible bucket from the dismissed-bucket before slicing:
Or, if a "show dismissed" toggle is needed in the UI, store both arrays:
The UI change in PersonDetail.tsx should follow the data model decision.
Severity
Medium. UX-visible bug — users see fewer actionable insights as they dismiss more.
Discovered by
Manual code review pass over #168, 2026-09-14.
Closing as already-fixed.
Commit
04720d8(#182: split active vs dismissed before slice(0, 20) in analyzeBehaviorPatterns) landed onmainat 2026-09-14 (today, before this triage session reviewed the file).The chat-agent code review read against a stale HEAD and reported this issue as open. The fix was already in place when the review started — the agent failed to re-check HEAD between reads.
No work to do.