Fix Linux titlebar tooltip overlap - #421
Conversation
|
|
||
| const defaultInset = "applicationMenu:Object.freeze({left:0,right:0})"; | ||
| if (currentSource.includes(defaultInset)) { | ||
| return currentSource.replace(defaultInset, currentInset); |
There was a problem hiding this comment.
This is an auto review done by revuto.
This new webview/ASAR patch uses String.prototype.replace, so it only updates the first matching safe-area literal. The repo's ASAR patching invariant (P1) requires patch helpers to process every eligible occurrence, or to explicitly assert that the needle is unique, because upstream minified bundles can contain duplicate literals/call sites. If applicationMenu:Object.freeze({left:0,right:0}) appears more than once in this chunk after upstream drift, the remaining maps will keep right:0 and titlebar chrome can still render under the Linux window controls. Please switch this to match-index/all-occurrence replacement or add a uniqueness assertion for this needle.
ilysenko
left a comment
There was a problem hiding this comment.
Reviewed current head. The earlier patching invariant issue is fixed by patching all matching occurrences and covering mixed already-patched/default cases in tests.
Summary
titleattribute from the thread side-panel toggle while keepingaria-labeland the Codex tooltip, preventing duplicate tooltips.Why
On Linux, the top-right thread side-panel toggle could show both the Codex tooltip and the browser/Electron native title tooltip. Tooltips near the native titlebar controls could also overlap the minimize/close buttons because Linux titlebar geometry was not reserved consistently.
Source Of Truth Files Edited
scripts/patches/main-process.jsscripts/patches/webview-assets.jsscripts/patches/core/all-linux/webview/theme-and-sunset/patch.jsscripts/patch-linux-window-ui.test.jsValidation
node --test scripts/patch-linux-window-ui.test.jspasses: 187/187.thread-app-shell-chromechunk and confirmed it removes the nativetitlewhile preservingaria-labelandtooltipContent.Environment / Limitations
Risks / Follow-up