Draft
Conversation
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add configurable delay time for auto-closing popups
Add configurable delay for popup auto-close
Feb 8, 2026
ujiro99
requested changes
Feb 12, 2026
Comment on lines
370
to
383
| // If there are no windows to close, cancel any pending auto-close timer | ||
| if (windowsToClose.length === 0) { | ||
| if (popupAutoCloseTimer !== null) { | ||
| clearTimeout(popupAutoCloseTimer) | ||
| popupAutoCloseTimer = null | ||
| } | ||
| return | ||
| } | ||
|
|
||
| // Cancel any existing timer | ||
| if (popupAutoCloseTimer !== null) { | ||
| clearTimeout(popupAutoCloseTimer) | ||
| popupAutoCloseTimer = null | ||
| } |
Contributor
Author
There was a problem hiding this comment.
リファクタリングしました。タイマーのクリア処理を最初に一度だけ実行するように変更し、重複を削除しました。(commit: b3fb920)
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
ujiro99
reviewed
Feb 20, 2026
Comment on lines
+367
to
+400
| // Cancel any existing timer | ||
| if (popupAutoCloseTimer !== null) { | ||
| clearTimeout(popupAutoCloseTimer) | ||
| popupAutoCloseTimer = null | ||
| } | ||
|
|
||
| // Get windows to close based on focus change | ||
| const windowsToClose = await WindowStackManager.getWindowsToClose(windowId) | ||
|
|
||
| // Execute close for all windows that need to be closed | ||
| for (const window of windowsToClose) { | ||
| await closeWindow(window.id, "onFocusChanged") | ||
| await WindowStackManager.removeWindow(window.id) | ||
| // If there are no windows to close, nothing to do | ||
| if (windowsToClose.length === 0) { | ||
| return | ||
| } | ||
|
|
||
| // Get the auto-close delay setting | ||
| const settings = await Settings.get() | ||
| const autoCloseDelay = settings.popupAutoCloseDelay | ||
|
|
||
| // Define the close function | ||
| const closeWindows = async () => { | ||
| for (const window of windowsToClose) { | ||
| await closeWindow(window.id, "onFocusChanged") | ||
| await WindowStackManager.removeWindow(window.id) | ||
| } | ||
| popupAutoCloseTimer = null | ||
| } | ||
|
|
||
| // Execute close based on delay setting | ||
| if (autoCloseDelay !== undefined && autoCloseDelay > 0) { | ||
| // Delayed close: Set timeout | ||
| popupAutoCloseTimer = setTimeout(closeWindows, autoCloseDelay) | ||
| } else { | ||
| // Immediate close: No delay configured | ||
| await closeWindows() |
Owner
There was a problem hiding this comment.
sevice-workerにさまざまな処理がある状態です。リファクタリングにより、処理の意図が見えやすい設計、実装にしてください。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Plan for Popup Auto-Close Delay
popupAutoCloseDelaysetting to UserSettings typeOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.