Let users pin a note window above other apps from the overflow menu - #7961
Merged
Merged
Conversation
Co-Authored-By: John <john@fastrepl.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Co-Authored-By: John <john@fastrepl.com>
Contributor
Author
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.
Summary
Intent: Users taking notes during a meeting want the note window to stay visible over the meeting app. This adds an "Always on Top" toggle to the note "..." menu, right after "Open in New Window". It pins the current window, whether that's the main window or a standalone note window, and shows a check mark while it's on.
AlwaysOnTopremembers the last requested state in a module-levelrequestedAlwaysOnTop. Each Tauri window has its own webview, so this value is per-window and resets when the window is recreated. It only falls back togetCurrentWindow().isAlwaysOnTop()before the first toggle. On Linux,isAlwaysOnTop()returnedfalsewhile_NET_WM_STATE_ABOVEwas still set, so trusting it would reopen the menu unchecked and make the next click re-pin the window instead of unpinning it.setAlwaysOnTop(next)optimistically, and both the check mark and the remembered value are reverted if that call fails.core:window:allow-set-always-on-topandcore:window:allow-is-always-on-top.window_set_frame_animated/ restore) still turns always-on-top on and then off on restore, and the check mark isn't updated to match. This only overrides the toggle while that flow runs.Demo
Tested in a real Linux (KDE/X11) Tauri desktop build. After every change I checked
_NET_WM_STATE_ABOVEwith xprop, in both the main window and a standalone note window.Not tested on macOS or Windows.
Verification
pnpm -F desktop typecheckpnpm -F desktop exec vitest run src/session/components/outer-header/overflow(35 passed;always-on-top.test.tsxcovers enable → remount whileisAlwaysOnTopreadsfalse→ still checked → one click callssetAlwaysOnTop(false))pnpm -F desktop i18n:checkLink to Devin session: https://app.devin.ai/sessions/d4f38fe85b7a4ff8b23b51fcb6749d88
Open in Devin Desktop: https://app.devin.ai/desktop/session/d4f38fe85b7a4ff8b23b51fcb6749d88?variant=devin
Requested by: @ComputelessComputer