Skip to content
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

Request history not visible #10

Open
CC007 opened this issue Sep 15, 2023 · 6 comments
Open

Request history not visible #10

CC007 opened this issue Sep 15, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@CC007
Copy link

CC007 commented Sep 15, 2023

Steps to reproduce

  1. Create a new request in any collection
  2. Use a batch variable
  3. Create a CSV file using that variable
  4. Run Batch Requests with the CSV file
  5. Press Ctrl+Shift+H or (attempt to) click the history on the top right of the right panel (the panel that shows responses)

Expected behavior
The history menu drops down with all responses from the batch

Actual behavior
Nothing happens when using the keyboard shortcut and the history button in the responses panel isn't there to click

Additional context

  • When running the request as a normal request at least once AFTER running the request batch, the other requests DO show up
  • When running the request as a normal request at least once BEFORE running the request batch, the other requests DON'T show up

Therefore I expect that the history items do get added to the list, but the GUI doesn't get refreshed after doing so.

Possible solution
Refresh the request history part of the GUI after running a request batch.

@jreyesr jreyesr self-assigned this Sep 15, 2023
@jreyesr jreyesr added the bug Something isn't working label Sep 15, 2023
@jreyesr
Copy link
Owner

jreyesr commented Sep 15, 2023

Hello @CC007, and thanks for the incredibly detailed issue report! That definitely looks like a bug, I'll check it out

@jreyesr
Copy link
Owner

jreyesr commented Sep 16, 2023

The problem appears to be further upstream (i.e. not limited to this plugin, but it looks to me like it affects any plugin that programmatically makes requests, without the user clicking the Send button). I've opened an issue on Insomnia. You may want to keep an eye on it: Kong/insomnia#6512

@CC007
Copy link
Author

CC007 commented Sep 16, 2023

Yea, I also took a look at it and the network object from the context doesn't seem to trigger an update on the response history component. I'm not very familiar with React though, so I couldn't find how normal requests trigger this update. Maybe looking for the component with the send button could help show how to trigger the update.

@CC007
Copy link
Author

CC007 commented Sep 19, 2023

Would it be possible to manually trigger a page redraw after a batch request, as a workaround for now?

@jreyesr
Copy link
Owner

jreyesr commented Sep 22, 2023

I don't see a clean way of doing it, sadly. Plugins don't really have control over the page render, and since they operate outside of the React component model they can't force a component rerender by mutating some state.

@CC007
Copy link
Author

CC007 commented Sep 22, 2023

Well, let's hope that they fix their plugin API then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants