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

Streamline frontend change level network calls 🛠🛠🛠 #824

Closed
pmarsh-scottlogic opened this issue Feb 6, 2024 · 0 comments · Fixed by #839 or #858
Closed

Streamline frontend change level network calls 🛠🛠🛠 #824

pmarsh-scottlogic opened this issue Feb 6, 2024 · 0 comments · Fixed by #839 or #858
Assignees
Labels
backend Requires work on the backend frontend Requires work on the frontend refactor Improve code quality

Comments

@pmarsh-scottlogic
Copy link
Contributor

pmarsh-scottlogic commented Feb 6, 2024

Here's what happens when I change from sandbox to level 1:

  • email/get?level=0 returns all the sent emails in the session for given level.
  • openai/history?level=0 returns the chat history in the session for given level.
  • defence/status?level=0 returns the defences as configured for given level.

These three are also called when you refresh.

🔧 These should be combined.

AC:

GIVEN frontend in preview mode (so that react doesn't do its double render thing) npm run preview
WHEN the user changes from one level to another (check specifically switching in and out of sandbox)
THEN there should be only one api call made of type fetch

Here's how you quickly find out in Chrome what api calls are being made that are fetch type. Note that the CombinedFonts call is of type xhr, therefore we ignore it.

image

@pmarsh-scottlogic pmarsh-scottlogic changed the title Streamline frontend change level network calls Streamline frontend change level network calls 🛠🛠🛠 Feb 6, 2024
@pmarsh-scottlogic pmarsh-scottlogic added frontend Requires work on the frontend backend Requires work on the backend refactor Improve code quality labels Feb 6, 2024
@pmarsh-scottlogic pmarsh-scottlogic self-assigned this Feb 22, 2024
@pmarsh-scottlogic pmarsh-scottlogic linked a pull request Feb 22, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires work on the backend frontend Requires work on the frontend refactor Improve code quality
Projects
None yet
1 participant