-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix: improve save request handling and optimize history mapping #5606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 2 files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request optimizes the user experience when saving requests and displaying recent endpoint history. The changes address UI responsiveness issues and correct the ordering logic for displaying recent endpoints.
Key Changes:
- Deferred save request execution using
setTimeout(0)to prevent UI blocking during the save operation - Fixed recent endpoints display to show the correct 10 most recent entries in proper order
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/hoppscotch-common/src/components/http/Request.vue |
Fixed the order of operations in userHistories computed property to slice history before mapping to endpoints, ensuring the 10 most recent entries are displayed correctly |
packages/hoppscotch-common/src/components/collections/SaveRequest.vue |
Refactored save logic by extracting core functionality to handleSaveRequestAs and wrapping it with setTimeout(0) in saveRequestAs to defer execution and prevent UI jank |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| setTimeout(() => { | ||
| handleSaveRequestAs() | ||
| }, 0) | ||
| return |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The explicit return statement is unnecessary here. Since the function doesn't return a value, you can simply remove line 598.
| return |
|
@vyquocvu We couldn’t reproduce the issue. Could you please provide more details about the fix you’re trying to implement? |
Screen.Recording.2025-12-01.at.12.01.05.PM.movAfter click on save button, can't do anything |
We’re not able to reproduce this issue in the latest release. Could you please check if it’s reproducible on your end in the latest version? If it is, kindly create an issue for the bug so it’s easier to track. |
This pull request focuses on improving the user experience and code clarity in the request saving workflow, as well as optimizing how recent endpoints are displayed. The main changes include refactoring the save request logic to prevent UI freezing and adjusting the order of operations when displaying recent request endpoints.
Request Saving Workflow Improvements:
SaveRequest.vueby introducing a newhandleSaveRequestAsfunction and updatingsaveRequestAsto usesetTimeout, which helps avoid UI jank and freezing when saving requests. [1] [2]Recent Endpoints Display Optimization:
Request.vueto first slice the history and then map to endpoints, ensuring the correct order and limiting to the 10 most recent requests.Summary by cubic
Improved save request handling to avoid UI freezing. Optimized recent endpoints mapping so the list shows the latest 10 in the right order.
Written for commit 00a7be7. Summary will update automatically on new commits.