unfoldingWord / gateway-edit

Book Package harmonized view.
https://gatewayedit.com
MIT License
1 stars 4 forks source link

SPIKE: Re-address stateful routing for selecting QA server #600

Open theNerd247 opened 9 months ago

theNerd247 commented 9 months ago

Problem Statement

251 was solved using #264 wherein the routing system provided by nextjs made it difficult to pass query parameters around. The solution to work around this (the marshaling of query parameters) involves using localstorage to statefully route the user to the correct page. This may be the cause of issues such as #548 (and potentially other undiscovered issues). Further, having statefull

routing makes it difficult to know which server is being used during debugging - this approach to routing is not intuitive and another developer needed clarification. I personally ran into this issue even when I had set an environment variable to force the app to use a particular server.

Proposed Solution Implement the logic of the router to be stateless. The benefits are two fold:

Details I suggest the following investigations/ideas: