Skip to content

Conversation

@vyquocvu
Copy link

@vyquocvu vyquocvu commented Nov 23, 2025

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:

  • Refactored the save request logic in SaveRequest.vue by introducing a new handleSaveRequestAs function and updating saveRequestAs to use setTimeout, which helps avoid UI jank and freezing when saving requests. [1] [2]

Recent Endpoints Display Optimization:

  • Modified the computation of recent endpoints in Request.vue to 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.

  • Bug Fixes
    • Deferred save action with setTimeout(0) and moved logic to handleSaveRequestAs in SaveRequest.vue to prevent UI jank.
    • In Request.vue, slice history before mapping endpoints to keep correct order and limit to 10.

Written for commit 00a7be7. Summary will update automatically on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a 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

Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Nov 23, 2025

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.

Suggested change
return

Copilot uses AI. Check for mistakes.
@nivedin
Copy link
Member

nivedin commented Nov 23, 2025

@vyquocvu We couldn’t reproduce the issue. Could you please provide more details about the fix you’re trying to implement?

@vyquocvu
Copy link
Author

vyquocvu commented Dec 1, 2025

Screen.Recording.2025-12-01.at.12.01.05.PM.mov

After click on save button, can't do anything

@nivedin
Copy link
Member

nivedin commented Dec 5, 2025

Screen.Recording.2025-12-01.at.12.01.05.PM.mov
After 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.

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.

2 participants