Skip to content

fix(todo): make sticky-dismissed suggestions immune to feedback-log truncation - #831

Open
Gagancreates wants to merge 1 commit into
mainfrom
fix/830-home-suggestion-repeat
Open

fix(todo): make sticky-dismissed suggestions immune to feedback-log truncation#831
Gagancreates wants to merge 1 commit into
mainfrom
fix/830-home-suggestion-repeat

Conversation

@Gagancreates

Copy link
Copy Markdown
Collaborator

Summary

Fixes a bug where the Home suggestion tray could re-show a suggestion the user had already declined. The sticky-dismissed verdict was previously derived from the bounded 200-entry planner feedback ledger, so enough unrelated signals could truncate the original dismissal and allow the suggestion to be proposed again.

This change adds a new uncapped todo/sticky_dismissed.json store separate from the bounded feedback ledger. Dismissed and taught signals upsert into that sticky store, while later ran or kept signals remove the key to preserve the existing override semantics. The bounded ledger remains in place for recent outcome examples.

It also awaits planner signal persistence at the accept, decline, dismiss, teach, and run call sites while still swallowing signal-recording failures, closing the race where a planner run could read sticky dismissals before a just-recorded user action had reached disk.

Fixes #830

Testing

  • Added unit tests in apps/x/packages/core/src/todo/planner-memory.test.ts covering sticky dismissal persistence past feedback-log truncation, taught signals, and ran/kept overrides.
  • npm test -- src/todo/fileops.test.ts src/todo/planner-memory.test.ts: 2 files passed, 11 tests passed.
  • npm test in apps/x/packages/core: 54 files passed, 583 tests passed.
  • npm run typecheck in apps/x/packages/core: passed.
  • npm run build in apps/x/packages/core: passed.
  • npm run build in apps/x/apps/main: passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Home suggestion tray re-shows the same (declined/dismissed) suggestion

1 participant