Repository navigation
feat(ui): add an opt-in GPUI frontend while keeping Qt/QML as default - #56
Conversation
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: 4cc0373b1e
ℹ️ 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".
| let percent = percent.clamp(MIN_VOLUME, MAX_VOLUME); | ||
| let value = percent as f32 / 100.0; | ||
| let bounds: Rc<Cell<Option<Bounds<Pixels>>>> = Rc::new(Cell::new(None)); | ||
| let pressed = Rc::new(Cell::new(false)); |
There was a problem hiding this comment.
Preserve the volume slider's drag state across renders
In the GPUI frontend, pressing the volume slider sets this cell to true, but the press also invokes the dispatch callback in CompanionView::volume_rail, which unconditionally calls cx.notify(). The resulting render rebuilds the slider with a new false cell, so subsequent mouse-move handlers reject the ongoing drag. Consequently, the slider jumps to the initial pressed position but cannot reliably be dragged. Store the pressed state in persistent view state or GPUI element state instead of allocating it on every render.
Useful? React with 👍 / 👎.
| let active = companion_mode == CompanionMode::Visible || popup.is_some(); | ||
| state.volume_wheel(event, active) |
There was a problem hiding this comment.
Allow viewport wheel input after the chrome auto-hides
During live playback, once the GPUI chrome auto-hides, hide_companion sets companion_mode to Unmapped and there is no popup. This makes active false, so volume_wheel ignores every viewport wheel event and the following chrome.wheel call never runs. Users therefore cannot adjust volume or reveal the chrome by scrolling until they first move the pointer, contrary to the intended hidden-chrome behavior described here. Derive eligibility from the active/viewable application-family facts rather than companion visibility.
Useful? React with 👍 / 👎.
Closes #54