Repository navigation
fix: keep variable tooltips above the New Request modal - #9196
lohit-bruno merged 2 commits into
Conversation
Place body-mounted variable information above modals while keeping autocomplete hints above it. Add isolated Electron regressions for popup occlusion and interactions under the URL and across the dialog edge. Co-authored-by: Copilot App <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. WalkthroughThe change raises the variable popup above the New Request modal while keeping it below autocomplete hints. New Playwright coverage checks popup visibility, copying, request creation, and reopening in two URL positions. ChangesNew Request variable popup
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Variable-information popups in the New Request dialog now remain visible and usable above the modal while autocomplete continues to take precedence. The change includes regression coverage for edge placement and popup interactions, with no active merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A popup rises above the frame Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The production change is minimal and targeted, and the added Playwright coverage meaningfully guards against regressions (with only a small locator-hardening suggestion).
Pull request overview
This PR fixes the variable-info hover popup being occluded by the New Request modal by adjusting its stacking order, and adds Playwright regression coverage to ensure the popup remains readable and interactive even when it extends beyond the dialog’s edge.
Changes:
- Raise
.CodeMirror-brunoVarInfoz-index so the body-mounted variable tooltip renders above modals. - Add a new Playwright spec covering tooltip usability inside the New Request dialog (including occlusion/hit-testing and clipboard copy).
- Add shared locators for the New Request URL variable token and CodeMirror autocomplete hint items.
File summaries
| File | Description |
|---|---|
| tests/variable-tooltip/new-request-tooltip.spec.ts | Adds regression tests verifying the tooltip is not occluded in the New Request modal and remains interactive. |
| tests/utils/page/locators.ts | Introduces shared locators used by the new tests (New Request variable token + CodeMirror hint item). |
| packages/bruno-app/src/globalStyles.js | Updates the variable tooltip z-index to render above modals while staying below autocomplete hints. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Scope hint lookup to visible CodeMirror hint lists and match option names exactly. Exercise apiKey alongside apiKeyBackup so substring ambiguity fails the existing New Request regression. Co-authored-by: Copilot App <[email protected]>
|
Could a maintainer approve the fork workflow runs for commit 547c2b9? Windows Tests, Linux Tests, and Lint Checks are all Snyk is separately blocked with |
|
Hi @y0geshpatil, thanks for the PR, and sorry for the long wait. We reviewed it and it fixes #7927, so we're moving it forward to the engineering team for review. I'll keep you posted here. |
REF - BRU-3302
Description
Keep URL-variable hover information readable and interactive in the New Request dialog, including where the popup extends beyond the dialog edge. The production change is limited to the variable popup's stacking layer; the other changes add behavioral regression coverage and two shared locators.
Outstanding contribution items: native screenshot upload is blocked, and the exact parallel review workflow has not been completed. The local review method and remaining checklist items are disclosed below.
Problem
Fixes #7927.
The variable information popup is appended directly to
document.bodywithposition: fixedandz-index: 10. The modal's stacking context is atz-index: 20, so both the dialog card and its backdrop cover the popup. A visibility-only assertion still passes despite the occlusion.Reproduced against upstream main
5afc5c78f7044711352724d5617b2290e37b0f24before changing production code:apiKey = example-api-key.{{apiKey}}, orhttps://example.com/?key={{apiKey}}to place the popup across the dialog's right edge.{{apiKey}}. The popup is behind the modal and its value/copy control are obscured.This is distinct from #5367 / #5459: that fix raised the autocomplete hints container, not the variable-information hover popup.
Fix
Raise
.CodeMirror-brunoVarInfotoz-index: 30: above the existing modal layer (20) and below autocomplete hints (50). Keep the body mount, viewport positioning, modal styles, and popup lifecycle unchanged. No dependencies or unrelated styling changes.The new Electron/Playwright cases exercise both URL positions using isolated user data and temporary collections. They select the exact
apiKeyautocomplete suggestion with overlappingapiKeyBackuppresent, check the popup's viewport bounds and center/corner hit targets withdocument.elementFromPoint, copy the value without closing the dialog, dismiss the popup, create the request, and open/edit its variable popup outside the dialog. Clipboard assertions use the existing isolated fake-clipboard fixture, not the system clipboard.Validation
Run locally on macOS 26.3.1 (Apple Silicon), Node 22.12.0, Electron 37.6.1. The original report is on Windows; Windows/Linux runtime validation was not performed locally.
547c2b95d): the old substring locator fails with a strict-mode error when bothapiKeyandapiKeyBackupare offered. Scoping to visible CodeMirror hint lists and matching the option name exactly fixes that ambiguity without using.first(). Both updated cases pass twice with two workers (4/4).tests/utils/page/locators.ts(unused import and two use-before-definition warnings) remain unchanged.Commands below show the actual test selectors; local reporter/output-directory flags and log redirections are omitted:
Local review and AI disclosure
GitHub Copilot significantly assisted with investigation, implementation, regression tests and this description. The repository's
.claude/skills/code-review/SKILL.mdwas invoked through Copilot. All eight applicable review lenses were applied in one consolidated local Copilot-hosted review using Claude Sonnet 5: correctness, architecture, conventions, React, cross-platform, security, DSL changes and E2E tests. No findings remained; the final screenshot fade-in wait was also reviewed.The Claude Code CLI was unavailable and was not executed. The prescribed parallel reviewer fan-out was not performed. The exact review-workflow checklist item remains unchecked rather than implying either of those steps ran.
Screenshots
Authentic before/after screenshots of the same isolated 1000 x 720 Electron scenario were captured after the popup's fade-in completed and retained locally. They contain only example data. They are not attached yet: the documented native
POST https://uploads.github.com/user-attachments/assetsflow returned HTTP 404 with the upstream repository ID and existing authorized GitHub credentials. No attachment URL was returned. No screenshots, traces or generated artifacts are committed.Contribution Checklist:
The existing issue #7927 is linked above; no duplicate issue was created. See the explicit local review-method disclosure and outstanding workflow step above.
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit