Repository navigation
Studio: toggle desktop fullscreen with F11 - #17213
Conversation
|
The PR's new test fails in CI on both Linux ( So after the first F11, nothing reached the window stub within one The |
|
Following up on the current head (
The |
|
Thanks, I checked the suggested path against head
I have not reproduced the restyle verdict locally. The area fixture waits for all message rows, but only 16 of the expected 80 rows mounted on both Linux builds in my check. I stopped the full local measurement without changing its assertions, so this is not a passing performance-gate result. Could you rerun the collapse and long-thread jobs on this head? The evidence so far does not identify a fullscreen code change that would fix these failures. If the restyle verdict repeats, the mutation/trace around |
… a fixed sleep (#17234) ## Summary `tests/studio/playwright_tool_activity.py` scene 3 clicks the controlled and uncontrolled tool cards back to back, sleeps a fixed 600 ms, then reads `aria-expanded`. On a loaded runner the second click is sometimes lost: the first card's 200 ms Radix expansion is still moving the second trigger, so the gate reports ``` PROBLEMS (chromium): - 3: uncontrolled did not open on click ``` while the controlled card opened fine. It has turned `Chat UI Tests (extra)` red on unrelated PRs three times since yesterday: - #17118 (staging run, Nov 8) - #17213 (Nov 9) - #17178 (staging run, Nov 9, a backend-only int8 change) No frontend file changed on `main` between the last green run of that job and those failures. The fix opens each card in turn and waits, bounded at 5 s, until its trigger reports `aria-expanded="true"` before clicking the next one. The scene still reads `aria-expanded` afterwards and records the same problem, so a card that really does not open on click still fails the gate. ## Changes - `tests/studio/playwright_tool_activity.py`: new `click_open(page, name)` helper, used for the two scene 3 clicks. Every other scene is unchanged. ## Testing - Three local runs of the gate on Chromium: `problems == []` each time. - Sabotage: with a capture-phase listener that swallows clicks on the uncontrolled trigger, the gate still fails with `3: uncontrolled did not open on click`. - The 22 test files that read the Playwright drivers or `_playwright_robust` pass (714 passed), and ruff and the exec-literal lint are clean.
The fullscreen watcher only runs inside the desktop app, so the browser build the gate measures is unchanged (identical CSS, only the entry chunk gains the isTauri-gated listener). The harness change belongs in its own PR if the gate needs it. [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfce012aa6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) | ||
| return; | ||
|
|
||
| event.preventDefault(); |
There was a problem hiding this comment.
Honor existing F11 bindings before preventing the event
For Windows/Linux desktop users who bind an action such as New Chat to F11 in Settings, this listener silently disables that shortcut. main.tsx installs it before React mounts, whereas useShortcut adds its window listeners later and returns immediately when event.defaultPrevented is true (features/settings/hooks/use-shortcut.ts:255-256). Consequently F11 now toggles fullscreen rather than invoking the saved action, even though the editor still accepts F11 as a valid binding. Consult the shortcut ownership registry before consuming F11, or register fullscreen through the shared shortcut-dispatch path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 85d076b: the watcher now steps aside when a Settings shortcut owns bare F11 (same ownership rule useShortcut uses), with a test.
Bare function keys are bindable in Settings > Keyboard shortcuts. The fullscreen watcher registers before React mounts, so it consumed F11 and useShortcut skipped the defaultPrevented event, silently disabling a user's F11 binding. Defer to the shortcut registry's owner of F11.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85d076b8ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| keyTaken: () => boolean = () => false, | ||
| ): void { | ||
| let changing = false; | ||
| target.addEventListener("keydown", (event) => { |
There was a problem hiding this comment.
Handle F11 while an embedded browser view has focus
On Windows/Linux desktop, the built-in browser focuses a separate child webview (studio/src-tauri/src/browser_webview.rs:1499-1500), and the main document loses keyboard focus to it (studio/frontend/src/features/browser/native-view.ts:849-851). Keydown events in that webview do not reach this main-renderer listener, and a search of the native and frame shortcut handlers found no F11 relay or accelerator. Consequently, entering fullscreen and then clicking a browser page makes F11-to-exit stop working until focus is moved back to Studio. Handle F11 at the native window level or relay it from the child views.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this here: on Windows and Linux no Studio shortcut reaches the app while a browser page view has focus (page views are untrusted content with no key relay, and the native menus are macOS-only), so F11 matches every other app shortcut. Clicking anywhere in Studio's own UI brings it back. A relay out of page views would be its own change.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
In fullscreen the custom Windows/Linux titlebar no longer takes a band: content fills the screen and the bar slides back in over it when the pointer touches the top edge (or focus moves into it), hiding again once the pointer leaves. While fullscreen the bar cannot drag or maximize the window, resize edges are dropped, and the maximize button becomes Restore, leaving fullscreen.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9f8517744
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const reveal = useCallback(() => { | ||
| cancelHide(); | ||
| setRevealed(true); | ||
| }, [cancelHide]); |
There was a problem hiding this comment.
Hide the titlebar after an edge-only reveal
In desktop fullscreen, if the pointer grazes the 3px reveal edge and moves away before entering the sliding header—for example, onto a monitor above—this callback sets revealed to true without scheduling a hide. Neither hide trigger, the header's onPointerLeave or onBlur, runs in that sequence. The titlebar therefore stays open indefinitely over the top row of content until the user enters and leaves it again. Give edge-triggered reveals an initial hide timer, cancelling it when the header is actually hovered or focused.
Useful? React with 👍 / 👎.
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a0726b1d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| hideTimer.current = window.setTimeout(() => { | ||
| hideTimer.current = null; | ||
| setRevealed(false); |
There was a problem hiding this comment.
Keep the fullscreen titlebar visible while it retains focus
On Windows/Linux fullscreen, moving the pointer out of the titlebar while one of its buttons retains keyboard focus calls scheduleHide() and unconditionally hides the bar after 400 ms. No blur or subsequent focus event occurs to cancel that timer, so the focused restore/close controls disappear offscreen despite the focus-triggered reveal behavior. Only hide the titlebar when neither hover nor focus remains inside it, checking those conditions again when the timer fires.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a710716ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…#17592) ## Summary `Repo tests (CPU, studio)` fails on main since #17213, and on every PR based on it (seen in staging runs for #17496 and #17557): ``` tests/studio/test_desktop_reliability_frontend_contract.py::test_fixed_sheets_start_below_the_custom_titlebar E assert 'set("--studio-custom-titlebar-height", usesCustomTitlebar ? "34px" : null)' in '...' ``` #17213 (F11 fullscreen) hides the custom titlebar in fullscreen, so the `<html>` mirror in `provider.tsx` now reads: ```ts const customTop = customTitlebarHidden ? "0px" : "34px"; set("--studio-custom-titlebar-height", usesCustomTitlebar ? customTop : null); ``` That is correct: in fullscreen the titlebar band is gone, and portalled sheets should start at the top edge. The test pinned the old line character for character, so it failed on a change that keeps everything it was written to protect. The mirror is still there, and it still gives 34px whenever the titlebar shows. ## Change `tests/studio/test_desktop_reliability_frontend_contract.py`: - `_mirrored_titlebar_heights()` finds the `set("--studio-custom-titlebar-height", usesCustomTitlebar ? <value> : null)` call and resolves `<value>`. A string literal is read directly; a local such as `customTop` is read from its `const` declaration. - `test_fixed_sheets_start_below_the_custom_titlebar` now asserts that the mirror exists, that it yields `34px`, and that it yields nothing other than `34px` or the fullscreen `0px`. The rest of the test is unchanged. - `test_the_titlebar_mirror_reader_follows_a_local` covers the reader: the old literal form, the new local form, and a different property that must not match. No app code changes. ## Testing - `tests/studio/test_desktop_reliability_frontend_contract.py`: 46 passed (1 failed on main). - With the mirror line removed from `provider.tsx`, the test fails. With the shown height changed from `34px` to `30px`, it also fails.
Summary
Closes #17016
Verification
cargo check --locked --manifest-path studio/src-tauri/Cargo.tomlpassed on Windows with 19 warnings.