Repository navigation
fix(desktop-gpui): keep the space above the recording bar clickable - #3509
Conversation
…space above it stays clickable
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| #[cfg(windows)] | ||
| { | ||
| let height = height * f64::from(scale); | ||
| platform::set_window_frame(native, x, y + current - height, width, height); |
There was a problem hiding this comment.
Expanding controls near the top clips the issue card
Medium Severity
On Windows at 100% scaling, a compact controls window at y=16 has its bottom at y=80. When a storage warning or recording error appears, this resize moves its top to -70, placing much of the issue card off-screen. This position is reachable by dragging the bar or by the initial work-area clamp for a short recording target near the screen's top. Previously the entire 150-point window was clamped into the work area. Clamp the expanded frame to the current display's work area, allowing the bar to move when necessary to keep the warning visible.
| _tick: gpui::Task<()>, | ||
| ticking_live: bool, | ||
| level_bar: Entity<ui::MicrophoneLevel>, | ||
| /// Whether the window is sized for the issue card. |
There was a problem hiding this comment.
The new comment on issue_room only restates what the field stores. AGENTS.md allows comments only when they explain non-obvious context and explicitly bans comments that narrate the code. Remove this comment before merging to meet that requirement. The platform-coordinate and re-entry comments explain non-obvious constraints and can stay.
| /// Whether the window is sized for the issue card. |
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/controls_window.rs
Line: 39
Comment:
**Comment repeats the field**
The new comment on `issue_room` only restates what the field stores. `AGENTS.md` allows comments only when they explain non-obvious context and explicitly bans comments that narrate the code. Remove this comment before merging to meet that requirement. The platform-coordinate and re-entry comments explain non-obvious constraints and can stay.
```suggestion
```
**Context Used:** AGENTS.md ([source](https://github.com/capsoftware/cap/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
@greptileai the narrating comment on issue_room was removed in 37ab805; please re-review. |
| /// Matches the Tauri `InProgressRecording` window and | ||
| /// `fake_window.rs` position math. | ||
| pub const CONTROLS_WIDTH: f32 = 320.; | ||
| /// The window's height with an issue card above the bar. |
There was a problem hiding this comment.
The new comments above CONTROLS_HEIGHT and CONTROLS_FIT_TO_ISSUE only describe their declarations. AGENTS.md bans comments that narrate code and allows only non-obvious context. Remove these two comments before merging to meet that requirement. Keep the explanations about clicks, platform coordinates, and re-entry.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/app_windows.rs
Line: 43
Comment:
**Comments repeat the code**
The new comments above `CONTROLS_HEIGHT` and `CONTROLS_FIT_TO_ISSUE` only describe their declarations. `AGENTS.md` bans comments that narrate code and allows only non-obvious context. Remove these two comments before merging to meet that requirement. Keep the explanations about clicks, platform coordinates, and re-entry.
**Context Used:** AGENTS.md ([source](https://github.com/capsoftware/cap/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
@greptileai removed both comments in 4adb866; please re-review. |
Summary
The recording controls window was a fixed 320 by 150 pt with the bar pinned to its bottom, leaving about 86 pt of transparent space above the bar. A transparent window still takes every click inside its frame, so whatever sat under that strip (a browser tab, a button) could not be clicked while recording.
The window is now only as tall as the bar (64 pt) on macOS and Windows. It grows upward to the old 150 pt only while the error or low-storage card is showing above the bar, and shrinks back when the card goes. The bar stays exactly where it was in both cases.
The resize runs from a task, because
setFramere-enters gpui.Test plan


Confidence Score: 5/5
The PR appears safe to merge; both previous findings are fixed.Summary
The PR keeps the space above the recording bar clickable by shrinking its window on macOS and Windows, then growing it when an issue card appears.
Reviews (3) · Last reviewed commit: "chore(desktop-gpui): drop two comments t..." · Reviewed by Greptile