Skip to content

fix(path-param) - Edit path param value in popup#86

Open
rajashreehj-bruno wants to merge 3 commits into
usebruno:mainfrom
rajashreehj-bruno:VSCODE-32-Path-param-pop-is-not-allowing-to-edit-the-value
Open

fix(path-param) - Edit path param value in popup#86
rajashreehj-bruno wants to merge 3 commits into
usebruno:mainfrom
rajashreehj-bruno:VSCODE-32-Path-param-pop-is-not-allowing-to-edit-the-value

Conversation

@rajashreehj-bruno

Copy link
Copy Markdown
Contributor

Summary

Path parameter values could not be edited from the variable-info popover that appears when hovering a :param token in the URL editor — the popover rendered the value as read-only. This makes path params editable inline (consistent with other editable variable scopes) and persists the change back to the request.

Root cause

Two gaps:

In brunoVarInfo.tsx, 'path'was included in the isReadOnly list, so the popover rendered the read-only .var-value-display instead of an editable field.
Even if made editable, updateVariableInScope had no 'path'case, so an edit had nowhere to go.

Changes

brunoVarInfo.tsx: removed 'path' from the read-only scope check so the popover shows the editable value field for path params (process.env, runtime, dynamic, oauth2, and undefined remain read-only).
collections/actions.tsx: added a 'path' case to updateVariableInScope that locates the path param in the request's draft/request params by name, dispatches the existing updatePathParam reducer, and saves the request — so the edited value persists and propagates to the Params → Path table.

Testing

Added e2e spec path-params.spec.ts: creates a request with a :userId path param, edits the value via the URL hover popover, and asserts it propagates to the Params → Path table.
Added openRequestPaneTab helper in actions.ts and centralized the path-param/popover selectors in locators.ts.

Jira ticket: VSCODE-32

@rajashreehj-bruno
rajashreehj-bruno force-pushed the VSCODE-32-Path-param-pop-is-not-allowing-to-edit-the-value branch from e85b71e to f691f9c Compare July 20, 2026 06:41

@princek-bruno princek-bruno 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.

Added few small review comments, Please check

Comment thread src/webview/utils/codemirror/brunoVarInfo.tsx Outdated
Comment thread tests/e2e/specs/path-params.spec.ts Outdated
Comment thread tests/e2e/specs/path-params.spec.ts Outdated
Comment thread tests/e2e/utils/locators.ts Outdated

@princek-bruno princek-bruno 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.

LGTM

await expect(async () => {
const value = await getPathParamTableValue(editor);
expect(value).toBe(paramValue);
}).toPass({ timeout: 5_000 });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This asserts in the memory store. Add a persistence test as well.

Close request tab-> openRequest -> await openRequestPaneTab(reopened, 'Params'); -> then expect the paramValue to still be there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants