{{ message }}
Repository navigation
fix(save-transient-request): allow filename-invalid characters in request display name - #9555
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
…uest display name Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rudycelekli
requested review from
bijin-bruno,
helloanoop,
lohit-bruno and
sid-bruno
as code owners
October 16, 2026 01:03
Contributor
rahul05ranjan
left a comment
There was a problem hiding this comment.
This matches how create/rename already work, which is the right call. Verified against naming.ts in bruno-common: previously validateName(trimmedName) rejected any display name containing " (or other filename-invalid chars) before sanitizeName ever got a chance, even though the sanitized filename would have been perfectly usable on disk.
Also checked the edges:
- A display name consisting only of invalid characters (e.g.
") sanitizes to an empty string, andvalidateName('')still returns false, so the empty-name toast still fires. Good. - The IPC handler re-validates the filename (
filenameWithoutExt) andwriteFileUniqueresolves collisions with a numeric suffix, so the display-name/filename divergence can't silently overwrite an existing request.
The Playwright test covering the sidebar display name (including the cleanup so later tests see the same collection state) is a nice touch. Nothing else to flag.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Saving a transient (untitled) request validated the display name against filename rules, so a name such as
Get "quoted" userwas rejected with a toast, while creating or renaming a request accepts it (only the derived filename is sanitized). It also overwrote the saved request'snamewith the sanitized filename.Problem
Fixes #7686 — inconsistent request naming between the "Save Request" modal and the New Request / Rename flows.
Fix
In
SaveTransientRequest: derive the filename withsanitizeName, validate that filename (so an unusable name such as only"is still rejected), and keep the user-entered name as the request's displayname, matching the other flows. The electron handler already re-validates the filename.Added a Playwright test that saves a transient request named
Get "quoted" userand checks it appears with that name in the sidebar. It fails without the change and passes with it. Ran the wholetransient-requests.spec.tsfile (8 passed) andnpm run lint(0 errors).Screenshots
N/A (no visual change beyond the error toast no longer appearing).
Contribution Checklist:
Summary by CodeRabbit