Skip to content

feat: replace send button with Send/Cancel buttons on request url - #7675

Merged
bijin-bruno merged 8 commits into
usebruno:mainfrom
gopu-bruno:feat/request-send-button
Apr 7, 2026
Merged

bijin-bruno merged 8 commits into
usebruno:mainfrom
gopu-bruno:feat/request-send-button

Conversation

@gopu-bruno

@gopu-bruno gopu-bruno commented Apr 3, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Replaces the arrow / cancel icons on the HTTP , GraphQL and WebSocket URL bars with labeled Send and Cancel buttons.

JIRA

Screenshots

image image image

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

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

  • New Features
    • Added a unified Send/Cancel button with clear loading and cancel behavior for request controls.
  • Style
    • Moved border/radius styling into input groups and improved alignment and spacing of URL/WebSocket input areas and action controls.
  • Tests
    • Updated UI tests to use more reliable test-id based selectors for triggering send.
  • Documentation
    • Updated testing guide examples to reflect the new send-action selector.

@coderabbitai

coderabbitai Bot commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Replaces inline send/cancel icons with a new SendButton component, moves border and border-radius from top-level wrappers into inner input containers (.url-input-group / .input-container), restructures URL/action markup, and updates Playwright tests to use data-testid="send-arrow-icon" for send actions.

Changes

Cohort / File(s) Summary
Query URL UI
packages/bruno-app/src/components/RequestPane/QueryUrl/index.js, packages/bruno-app/src/components/RequestPane/QueryUrl/StyledWrapper.js
Replaced inline send/cancel icons with SendButton; wrapped editor and action icons in .url-input-group and moved border/border-radius styling into that inner group.
WebSocket Query UI
packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js, packages/bruno-app/src/components/RequestPane/WsQueryUrl/StyledWrapper.js
Removed inline run icon, added SendButton outside input row; moved connection-status strip into the input container; relocated border/radius to .input-container and set position: relative.
SendButton Component
packages/bruno-app/src/components/RequestPane/SendButton/index.js, packages/bruno-app/src/components/RequestPane/SendButton/StyledWrapper.js
Added new SendButton default-export with isLoading toggle (Send/Cancel), onSend/onCancel, testId prop, and a styled wrapper enforcing flex/full-size button behavior.
Tests & Locators
tests/collection/create/create-collection.spec.ts, tests/environments/multiline-variables/read-multiline-environment.spec.ts, tests/response-examples/create-example.spec.ts, tests/utils/page/actions.ts, tests/utils/page/locators.ts
Replaced brittle image-index or #send-request selectors with stable targets: #request-actions for Save and data-testid='send-arrow-icon' for send; updated related locator helpers.
Docs
docs/playwright-testing-guide.md
Updated example test to use page.getByTestId('send-arrow-icon').click() instead of indexing image matches.

Sequence Diagram(s)

sequenceDiagram
  participant User as User
  participant UI as QueryUrl/WsQueryUrl Component
  participant Btn as SendButton
  participant API as Network/API

  User->>UI: click Send
  UI->>Btn: invoke onSend (or onCancel)
  Btn->>API: initiate request / send cancel
  API-->>Btn: response / cancel ack
  Btn-->>UI: update isLoading / status
  UI-->>User: render updated state and response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno

Poem

A button small that sends or stops the flow,
Borders tucked inward where the inputs grow.
Tests now click surely where the marker lies,
One component hums and the UI replies. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: replacing arrow/cancel icons with labeled Send/Cancel buttons on request URL bars across HTTP, GraphQL, and WebSocket components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@naman-bruno
naman-bruno marked this pull request as ready for review April 4, 2026 19:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js (1)

194-203: Test ID inconsistency between WebSocket and HTTP request buttons.

The WebSocket Send button uses data-testid="run-button" while the HTTP QueryUrl component uses data-testid="send-arrow-icon". Consider unifying these test IDs for consistency—tests targeting both request types will need different selectors otherwise.

♻️ Suggested unification
        <Button
          size="sm"
          variant="filled"
          color="primary"
-          data-testid="run-button"
+          data-testid="send-arrow-icon"
          onClick={handleRunClick}
          className="ml-2 send-btn"
        >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js` around
lines 194 - 203, The WebSocket Send Button in WsQueryUrl (the Button rendered
with onClick={handleRunClick}) uses data-testid="run-button" which is
inconsistent with the HTTP QueryUrl component; change that attribute to match
the HTTP test id (data-testid="send-arrow-icon") so both request types share the
same selector for tests; update the data-testid on the Button element in
WsQueryUrl/index.js (the Send button tied to handleRunClick) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js`:
- Around line 194-203: The WebSocket Send Button in WsQueryUrl (the Button
rendered with onClick={handleRunClick}) uses data-testid="run-button" which is
inconsistent with the HTTP QueryUrl component; change that attribute to match
the HTTP test id (data-testid="send-arrow-icon") so both request types share the
same selector for tests; update the data-testid on the Button element in
WsQueryUrl/index.js (the Send button tied to handleRunClick) accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dd035b39-b2bd-4334-9fbd-8f6a6cf17b57

📥 Commits

Reviewing files that changed from the base of the PR and between c273c10 and b1227d4.

📒 Files selected for processing (7)
  • packages/bruno-app/src/components/RequestPane/QueryUrl/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
  • packages/bruno-app/src/components/RequestPane/WsQueryUrl/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js
  • tests/collection/create/create-collection.spec.ts
  • tests/environments/multiline-variables/read-multiline-environment.spec.ts
  • tests/response-examples/create-example.spec.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/bruno-app/src/components/RequestPane/QueryUrl/index.js`:
- Around line 410-448: Rename or remove the misleading id "send-request" that
wraps the Generate Code / Save Request icons and add explicit data-testid
attributes to the actionable icons so tests target them directly; specifically,
update the wrapper around IconCode and IconDeviceFloppy (where
handleGenerateCode and onSave are invoked, and saveShortcut/hasChanges are used)
to remove or rename id="send-request" and add data-testid="generate-code-button"
to the IconCode container and data-testid="save-request-button" to the
IconDeviceFloppy container; leave the SendButton component (which already has
testId="send-arrow-icon") as the send control.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 70a550ca-f89d-4a87-b854-8f1e9ce19379

📥 Commits

Reviewing files that changed from the base of the PR and between 44d0497 and 4fcb528.

📒 Files selected for processing (3)
  • packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
  • packages/bruno-app/src/components/RequestPane/SendButton/index.js
  • packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js
✅ Files skipped from review due to trivial changes (1)
  • packages/bruno-app/src/components/RequestPane/SendButton/index.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/bruno-app/src/components/RequestPane/QueryUrl/index.js (1)

410-429: ⚠️ Potential issue | 🟡 Minor

Add explicit test IDs for Generate Code and Save Request actions.

These controls are still only discoverable via .infotip + positional selectors, which is brittle for Playwright and already causing downstream selector coupling.

♻️ Proposed fix
           <div className="flex items-center h-full mx-2 gap-3" id="request-actions">
             <div
               title="Generate Code"
               className="infotip"
+              data-testid="generate-code-button"
               onClick={(e) => {
                 handleGenerateCode(e);
               }}
             >
@@
             <div
               title="Save Request"
               className="infotip"
+              data-testid="save-request-button"
               onClick={(e) => {
                 e.stopPropagation();
                 if (!hasChanges) return;
                 onSave();
               }}
             >

As per coding guidelines: "Add data-testid to testable elements for Playwright."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bruno-app/src/components/RequestPane/QueryUrl/index.js` around lines
410 - 429, Add explicit data-testid attributes to the two action controls so
Playwright can reliably target them: add data-testid="generate-code-button" to
the Generate Code element that calls handleGenerateCode and
data-testid="save-request-button" to the Save Request element that calls onSave
(both are inside the div with id="request-actions" and have className
"infotip"); ensure the attributes are placed on the same clickable container
elements that contain IconCode and the save UI so tests don't need positional
selectors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/bruno-app/src/components/RequestPane/QueryUrl/index.js`:
- Around line 410-429: Add explicit data-testid attributes to the two action
controls so Playwright can reliably target them: add
data-testid="generate-code-button" to the Generate Code element that calls
handleGenerateCode and data-testid="save-request-button" to the Save Request
element that calls onSave (both are inside the div with id="request-actions" and
have className "infotip"); ensure the attributes are placed on the same
clickable container elements that contain IconCode and the save UI so tests
don't need positional selectors.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 951e5c13-6e38-4e36-ae59-6bfffb8ec368

📥 Commits

Reviewing files that changed from the base of the PR and between 4fcb528 and 9b09693.

📒 Files selected for processing (5)
  • docs/playwright-testing-guide.md
  • packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
  • tests/collection/create/create-collection.spec.ts
  • tests/utils/page/actions.ts
  • tests/utils/page/locators.ts
✅ Files skipped from review due to trivial changes (1)
  • tests/utils/page/actions.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/collection/create/create-collection.spec.ts

@bijin-bruno
bijin-bruno merged commit 476d30a into usebruno:main Apr 7, 2026
11 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 20, 2026
6 tasks
maxenceleblanc pushed a commit to maxenceleblanc/curly_cats2 that referenced this pull request Jul 20, 2026
…ebruno#7675)

* feat: replace request send icon with Send/Cancel buttons

---------

Co-authored-by: naman-bruno <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants