Skip to content

Conversation

Copy link

Copilot AI commented Jan 15, 2026

Notifications for files not accessed in 24+ hours were delayed up to 60 seconds because checks only ran on a 1-minute interval timer.

Changes

  • Trigger notification check immediately on editor change instead of waiting for interval timer
    • Made checkForReturningContext() public to call from updateUI()
    • Periodic check retained as fallback
  • Add session-based deduplication to prevent showing the same notification multiple times
    • Track notified files in Set<string> cleared only on extension restart
  • Ensure file access recorded exactly once per check using try-finally pattern
  • Fix memory leak by disposing interval timer on deactivation
// Before: notification delayed until next interval tick
setInterval(() => {
  this.checkForReturningContext();
}, 60000);

// After: immediate check on editor change + interval fallback
const updateUI = () => {
  if (editor) {
    resurfacer.checkForReturningContext(); // Immediate
  }
};

The notification now appears instantly when opening a file after 24+ hours away, rather than after an unpredictable delay.

Original prompt

This section details on the original issue you should resolve

<issue_title>Notification Get Late</issue_title>
<issue_description>When i add this Extension So Notification Problem Are Face </issue_description>

<agent_instructions>disscuse with the issues</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@Yashrajsalunkhe can you give the details of it

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits January 15, 2026 06:50
…e opened

Co-authored-by: Yashrajsalunkhe <165492738+Yashrajsalunkhe@users.noreply.github.com>
…y leak

Co-authored-by: Yashrajsalunkhe <165492738+Yashrajsalunkhe@users.noreply.github.com>
…cumentation

Co-authored-by: Yashrajsalunkhe <165492738+Yashrajsalunkhe@users.noreply.github.com>
Co-authored-by: Yashrajsalunkhe <165492738+Yashrajsalunkhe@users.noreply.github.com>
Co-authored-by: Yashrajsalunkhe <165492738+Yashrajsalunkhe@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix notification delay issue with extension Fix notification delay by checking on editor change instead of only on interval Jan 15, 2026
Copilot AI requested a review from Yashrajsalunkhe January 15, 2026 07:01
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.

Notification Get Late

2 participants