-
Notifications
You must be signed in to change notification settings - Fork 490
fix: add confirmation popover for closing active tabs and fix summary generation #3318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
devin-ai-integration
wants to merge
3
commits into
main
Choose a base branch
from
devin/1769162853-fix-summary-generation-on-tab-close
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: add confirmation popover for closing active tabs and fix summary generation #3318
devin-ai-integration
wants to merge
3
commits into
main
from
devin/1769162853-fix-summary-generation-on-tab-close
+193
−28
Conversation
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
When closing an active listening tab, the summary was incorrectly being generated for the next tab that became active instead of the closed tab. This fix tracks the previous liveSessionId and only triggers enhancement if the current tab's sessionId matches the session that was actually listening before it stopped. Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for howto-fix-macos-audio-selection canceled.
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for hyprnote canceled.
|
- Add pendingCloseConfirmationTab state to lifecycle store - Add confirmation popover UI in shared.tsx with Cmd+W keyboard support - Pass confirmation state through index.tsx to tab components - Handle close with stop in sessions/index.tsx using Zustand subscribe - Update useTabsShortcuts to show confirmation for active listening tabs - Remove global registerOnClose handler from _layout.tsx Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
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.
Summary
This PR implements two related fixes for closing active listening tabs:
1. Confirmation Popover UI
When attempting to close an active listening tab (via X button or Cmd+W), a confirmation popover now appears asking the user to confirm. The user can confirm by clicking "Close" or pressing Cmd+W again.
2. Summary Generation for Correct Session
Fixes the bug where closing an active listening tab would generate a summary for the wrong tab (the next tab that becomes active) instead of the closed tab. The fix tracks
prevLiveSessionIdso enhancement only triggers if the current tab'ssessionIdmatches the session that was actually listening.Key Implementation Details:
pendingCloseConfirmationTabstate to the tabs lifecycle storeshared.tsxwith keyboard support (Cmd+W to confirm)handleCloseWithStopuses Zustand'ssubscribeto wait for listener status to change before closing the tab (replacing a setTimeout hack)registerOnClosehandler from_layout.tsxthat was calling stop() unconditionallyReview & Testing Checklist for Human
Notes
This combines the confirmation modal UI from PR #3289 with a fix for the summary generation targeting the wrong session.
Potential concerns worth verifying:
pendingCloseConfirmationTab) - verify these stay in sync.Link to Devin run: https://app.devin.ai/sessions/d8cb0d758c1646a1a7f09bfb04509102
Requested by: @ComputelessComputer