Repository navigation
feat: block every tab's input while a dialog's scrim covers the window - #7
Merged
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
Author
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Page recovery stops after first transition — The crashed and loading flags were only replaced while true, so they never reset. Both are now replaced on every change.
- Dialogs crash the standalone interface preview — lockTabInput now returns a no-op release when there is no app (hasApp false), as the rest of the renderer's state does.
Each tab keeps its own list of input locks, each with an ID, and ignores input while any lock is on it, so letting one lock go never lifts another. A window's dialog holds its lock on all the window's tabs, tabs that come to the window take it, and a tab moved away drops it. The locks go with the interface page if it crashes or loads again, so a dialog that never closed can't leave the tabs stuck. Co-Authored-By: Evan <47493765+iamEvanYT@users.noreply.github.com>
…irst The flags that tell a new crash or load from one already seen were only updated while true, so they stayed set, and a later crash went without a reload and a later load kept the page's locks. Co-Authored-By: Evan <47493765+iamEvanYT@users.noreply.github.com>
Opening a dialog with no app behind the page called the app's missing `wren` and failed, as other state does not. Co-Authored-By: Evan <47493765+iamEvanYT@users.noreply.github.com>
Every change to a tab's locks now goes through one function that sets whether it ignores input, so a window's locks replace the last window's in one step. Co-Authored-By: Evan <47493765+iamEvanYT@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
devin/1795167368-tab-input-locks
branch
from
November 20, 2026 19:37
b8ca657 to
70d46ef
Compare
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.
What this changes
While one of Wren's dialogs is up, its scrim now blocks input to every tab in the window, including both panes of a split and tabs in other spaces of that window.
src/main/tabs/input.rs): each tab has its own set ofInputLockIDs, and callsBrowserTab::set_ignores_inputonly when that set goes from empty to non-empty or back. Since each lock has its own ID, letting one go never lifts another.InputLock::Dialogon all of its tabs. Tabs that come to the window while it's held get the lock, and a tab moved to another window takes that window's locks instead.InputLock::is_window_wideis an exhaustive match, so each new lock has to say which kind it is. A closed tab's list is deleted.PageWindow::watch_page_gonefires when the page crashes or a new load starts (a reload from DevTools or the dev server). The window then lets go of every lock its page held, so tabs can't stay blocked.DialogcallsuseTabInputLockWhile("dialog", present), so the lock is held from when its card shows until its exit animation ends. Dialogs waiting their turn hold nothing.TabInputLockContextis provided only by theuipage; other pages get a lock function that does nothing.state/tab-input-lock.tscounts the holders of each lock and callswindow.lockTabInputonly on the first take and the last release.How you checked it
tscand the React Compiler check pass.cargo clippy --all-targetsreports no errors in the changed files. This was on Linux, where only the macOS-onlyplatform::currentcode fails.bun run check, and opening the Quit dialog over a tab to confirm that clicks, scrolling and typing don't reach it, and that they work again once the dialog closes or the interface page reloads.Contributor Licence Agreement
Link to Devin session: https://app.devin.ai/sessions/d11ad27aac4b4a039850e7ddf305a767
Open in Devin Desktop: https://app.devin.ai/desktop/session/d11ad27aac4b4a039850e7ddf305a767?variant=devin
Requested by: @iamEvanYT
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work