Skip to content

feat(woof): add WOOF easter egg - #8301

Merged
bijin-bruno merged 3 commits into
usebruno:mainfrom
sanish-bruno:feat/woof-woof
Jun 24, 2026
Merged

bijin-bruno merged 3 commits into
usebruno:mainfrom
sanish-bruno:feat/woof-woof

Conversation

@sanish-bruno

@sanish-bruno sanish-bruno commented Jun 18, 2026 •

Copy link
Copy Markdown
Collaborator
Woof! Woof!

       __
   (___()'`;
   /,    /`
   \\"--\\

Bruno fetched your request. Good human.


Description

Adds a small easter egg: setting the HTTP method to WOOF (any case) short-circuits the network call and returns a synthetic 200 Woof! response — Bruno's mascot answering on behalf of the request. No real traffic is sent.

Where it lives — a single early-return inside runRequest in packages/bruno-electron/src/ipc/network/index.js, immediately after prepareRequest returns and before any side-effectful work (pre-request scripts, axios config, network call). Pre-request scripts, tests, and post-response scripts are intentionally skipped — the response is synthetic, so running user assertions against it would be misleading.

Response shape

  • status: 200, statusText: "Woof!"
  • Headers: content-type: text/plain; charset=utf-8, x-good-boy: true, x-fetched-by: bruno
  • Body: a small dog ASCII + "Bruno fetched your request. Good human."
  • Matches the success-response shape returned by the normal axios path, so the renderer needs no changes.

Why no UI/schema changes are needed

  • The HTTP method dropdown already supports custom methods via the "+ Add Custom" option (HttpMethodSelector).
  • The schema accepts any non-empty string for method (packages/bruno-schema/src/collections/index.js).
  • The bru parser handles arbitrary methods via the httpcustom rule (packages/bruno-lang/v2/src/bruToJson.js).

How to try it

  1. Open any HTTP request.
  2. Method dropdown → + Add Custom → type WOOF → Send.
  3. Response pane shows 200 Woof! and the ASCII body. No traffic in DevTools Network.

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 support for a special request type that returns an instant “Woof!” response instead of running the usual request flow.
    • The response includes standard HTTP-style details like status, headers, body content, and timing information.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 667ca327-ae8a-4b8f-b1fd-6275739d6688

📥 Commits

Reviewing files that changed from the base of the PR and between f05aa5e and 1d622b9.

📒 Files selected for processing (2)
  • packages/bruno-electron/src/ipc/network/index.js
  • packages/bruno-electron/src/utils/woof.js

Walkthrough

runRequest now returns a synthetic response for WOOF requests using a new utility. The response includes fixed text content, headers, metadata, and bypasses the normal request execution flow.

Changes

WOOF Request Response Path

Layer / File(s) Summary
Synthetic response builder
packages/bruno-electron/src/utils/woof.js
Defines easterEggResponse(request) to construct the fixed body, buffer metadata, headers, timing, and captured request fields, and exports it from the utility module.
WOOF request interception
packages/bruno-electron/src/ipc/network/index.js
Imports easterEggResponse into runRequest and returns its result immediately when the request method matches WOOF, skipping the normal request lifecycle.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A WOOF arrives with a cheerful bark,
A fixed reply lights up the dark.
No scripts, no tests, no HTTP race—
Just dogged bytes in a friendly place.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the WOOF easter egg.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/bruno-electron/src/ipc/network/index.js`:
- Line 878: The condition at line 878 calls `.toUpperCase()` on `request.method`
without first verifying that it is a string, which can throw an error if the
method is null, undefined, or another non-string type. Since this check occurs
before the function's main try/catch block, any error will bypass normal error
handling. Add a guard condition to verify that `request.method` exists and is a
string (using typeof check or optional chaining) before calling `.toUpperCase()`
on it in the comparison with 'WOOF'.
🪄 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: c4826294-c886-4a71-adbc-e510c78cd2c5

📥 Commits

Reviewing files that changed from the base of the PR and between 36e59e9 and deaa876.

📒 Files selected for processing (1)
  • packages/bruno-electron/src/ipc/network/index.js

@helloanoop

Copy link
Copy Markdown
Contributor

Love this. Please have this merged @sid-bruno @bijin-bruno

@bijin-bruno
bijin-bruno merged commit 7765320 into usebruno:main Jun 24, 2026
17 of 19 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 14, 2026
2 of 4 tasks
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