Skip to content

fix(queue-store): clear phase hints on auto-dismiss#42

Merged
fathiraz merged 1 commit into
feat/bulk-actions-flyoutsfrom
cursor/fix-phase-hints-leak-d81d
Jun 1, 2026
Merged

fix(queue-store): clear phase hints on auto-dismiss#42
fathiraz merged 1 commit into
feat/bulk-actions-flyoutsfrom
cursor/fix-phase-hints-leak-d81d

Conversation

@fathiraz
Copy link
Copy Markdown
Owner

@fathiraz fathiraz commented Jun 1, 2026

Fixes review feedback on #38 (discussion_r3332138647).

Problem

scheduleDismiss removed entries from processes but not phaseHintsMap. Manual queueStore.dismiss() already cleared hints; auto-dismiss did not. Reusing the same processId could surface stale Undo/Retry from a prior run.

Fix

  • Add removeProcess() to clear dismiss timer (when applicable), phaseHintsMap, and the process entry.
  • Call it from queueStore.dismiss() and from the auto-dismiss timer callback.
  • Regression test: after undo window auto-dismiss, hints are gone and a new in-flight run for the same id has no stale undo phase.

Verification

pnpm test
pnpm typecheck
pnpm build:chrome && pnpm build:firefox && pnpm build:edge

All passed (378 tests).

Open in Web Open in Cursor 

Summary by cubic

Fixes a leak where auto-dismiss left phase hints behind, causing stale Undo/Retry when reusing a processId. Centralizes process removal to clear timers, hints, and entries for consistent behavior.

  • Bug Fixes
    • Add removeProcess() to clear dismiss timer, phaseHintsMap, and the process entry.
    • Use it in queueStore.dismiss() and the auto-dismiss path in scheduleDismiss().
    • Add regression test to ensure hints are cleared after the undo window and new runs start clean.

Written for commit 8eed2ac. Summary will update on new commits.

Review in cubic

Auto-dismiss timer removed processes but left phaseHintsMap entries,
so reusing the same processId could show stale Undo/Retry. Centralize
removal in removeProcess() and call it from scheduleDismiss.
@fathiraz fathiraz marked this pull request as ready for review June 1, 2026 13:04
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor auto review

No actionable issues found on changed lines.

No actionable issues found. The removeProcess helper correctly centralizes timer, phaseHintsMap, and process cleanup for both manual and auto-dismiss paths, and the regression test covers the stale-hint scenario described in the PR.

Generated automatically when this PR was submitted using Cursor CLI with --model auto.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@fathiraz fathiraz merged commit 6c2d08b into feat/bulk-actions-flyouts Jun 1, 2026
5 checks passed
@fathiraz fathiraz deleted the cursor/fix-phase-hints-leak-d81d branch June 1, 2026 13:08
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.

2 participants