feat: add transient in-memory requests with grace-period resurrection#12
Open
chirag-bruno wants to merge 5 commits intousebruno:mainfrom
Open
feat: add transient in-memory requests with grace-period resurrection#12chirag-bruno wants to merge 5 commits intousebruno:mainfrom
chirag-bruno wants to merge 5 commits intousebruno:mainfrom
Conversation
Adds a "+" action on each collection row to create HTTP/GraphQL/gRPC/WS
requests that live only in Redux + a standalone WebviewPanel — no file
is written until the user explicitly saves.
- transient-manager creates typed items with virtual pathnames under
{collection}/.bruno/transient/ so scripts resolve relative paths
- dedicated transient-request-panel with protocol-colored icons that
reflect dirty state
- custom folder-picker (QuickPick) constrained to the collection root
with a request-name input step
- Cmd+S keybinding + beforeunload guard so dirty transient requests
cannot silently disappear
- draft middleware debounces and syncs transient item state to the
extension host so the latest edits survive panel disposal
- onDidDispose shows a progress-bar notification; cancelling resurrects
the panel with the synced state, otherwise the item is cleaned up
- autosave and saveRequest skip transient items (explicit save only)
Broadcasting main:trigger-save to all webviews caused the transient save flow to fire even when the user was focused on a regular editor. Track the last-active editor webview via onDidChangeViewState and send the save trigger only to that webview.
27 tests covering item creation for all request types (HTTP, GraphQL, gRPC, WebSocket), auto-incrementing names, file extension selection, pathname generation for Unix/Windows, and counter reset.
naman-bruno
requested changes
Apr 14, 2026
| panel.onDidDispose(() => { | ||
| // stateManager.removeWebview(panel.webview); | ||
| // transientPanels.delete(itemUid); | ||
| // transientItems.delete(itemU`id); |
| { | ||
| location: vscode.ProgressLocation.Notification, | ||
| title: `"${itemName}" closed — discarding…`, | ||
| cancellable: true |
Collaborator
There was a problem hiding this comment.
change button text to undo
Replace nested setTimeout hacks in transient-request-panel with an event-driven handshake: the webview retries until the collection exists in Redux, dispatches addTransientRequest, then sends transient:item-ready back so the extension host can safely send main:set-view. Switch the resurrection notification from withProgress (hardcoded "Cancel" label) to showInformationMessage with an "Undo" button. Fix gRPC/WS URL changes being silently dropped in requestUrlChanged reducer — the URL was only set inside a 'params' in draft.request guard which gRPC requests don't satisfy. Now set draft.request.url unconditionally for all request types.
Transient items were included in getTotalRequestCountInCollection and getRequestItemsForCollectionRun, causing them to appear in runner counts and execution lists. Filter them out with isTransient checks.
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.
Adds a "+" action on each collection row to create HTTP/GraphQL/gRPC/WS requests that live only in Redux + a standalone WebviewPanel — no file is written until the user explicitly saves.