Skip to content

Conversation

@is0692vs
Copy link
Owner

  • 新規追加: src/suppressionManager.ts(通知抑制ロジック、保存中フラグ、行数トラッキング、閾値判定を実装)
  • extension.ts に抑制マネージャを初期化して統合
    • onCreate/onSave/onLargeDelete/onFileSizeExceeded の処理で shouldSuppress/recordNotification 等を利用
    • ファイル保存時のマークとクリーンアップを追加
    • ファイル行数トラッキングの初期化と更新を追加
  • triggerManager.ts を抑制機構に対応させ、トリガー毎のファイル単位スロットリングを導入
  • README.md に通知優先度・抑制ルール、デフォルト閾値、技術的詳細を追記

これにより、複数トリガー同時発火やフォーマッタによる保存時の誤通知を抑制します。

- 新規追加: src/suppressionManager.ts(通知抑制ロジック、保存中フラグ、行数トラッキング、閾値判定を実装)
- extension.ts に抑制マネージャを初期化して統合
  - onCreate/onSave/onLargeDelete/onFileSizeExceeded の処理で shouldSuppress/recordNotification 等を利用
  - ファイル保存時のマークとクリーンアップを追加
  - ファイル行数トラッキングの初期化と更新を追加
- triggerManager.ts を抑制機構に対応させ、トリガー毎のファイル単位スロットリングを導入
- README.md に通知優先度・抑制ルール、デフォルト閾値、技術的詳細を追記

これにより、複数トリガー同時発火やフォーマッタによる保存時の誤通知を抑制します。
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an intelligent notification suppression system to prevent duplicate or overlapping notifications when multiple triggers fire simultaneously. The key improvement is tracking notifications per-file and per-trigger-type, rather than globally, with configurable suppression rules.

Key changes:

  • Added SuppressionManager class to handle notification suppression logic with configurable rules
  • Updated TriggerManager to use per-file, per-trigger throttling instead of global throttling
  • Integrated suppression checks throughout trigger handlers (onCreate, onLargeDelete, onFileSizeExceeded)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/suppressionManager.ts New file implementing notification suppression logic with per-file tracking, suppression rules, and threshold crossing detection
src/triggerManager.ts Refactored to use per-file per-trigger throttling and integrate with SuppressionManager
src/extension.ts Integrated SuppressionManager throughout trigger handlers, added line count tracking, and replaced global save flag with per-file tracking
README.md Added comprehensive documentation explaining suppression rules, trigger types, and timing behavior
Comments suppressed due to low confidence (1)

src/extension.ts:168

  • The TriggerManager is being recreated without passing the suppressionManager parameter. This will cause the trigger manager to lose suppression functionality when configuration changes. Change to: triggerManager = new TriggerManager(context, handleTrigger, suppressionManager);
				triggerManager = new TriggerManager(context, handleTrigger);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,190 @@
import * as vscode from 'vscode';
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

Unused import vscode.

Suggested change
import * as vscode from 'vscode';

Copilot uses AI. Check for mistakes.
is0692vs and others added 2 commits October 31, 2025 22:54
@is0692vs is0692vs merged commit d0a0322 into main Oct 31, 2025
1 check passed
@is0692vs is0692vs deleted the 34-fix-複数トリガー同時発火による二重or意図しない通知の防止 branch October 31, 2025 13:58
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.

[fix] 複数トリガー同時発火による二重or意図しない通知の防止

2 participants