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

Improve/small fixes to new Debug UI #6419

Open
6 tasks
t2gran opened this issue Feb 3, 2025 · 4 comments
Open
6 tasks

Improve/small fixes to new Debug UI #6419

t2gran opened this issue Feb 3, 2025 · 4 comments
Labels
Improvement A functional improvement

Comments

@t2gran
Copy link
Member

t2gran commented Feb 3, 2025

This issue contains a list of small issues with the new Debug UI.

  • Change name of dynamic input from "Filters" to "Request Parameters" or just "Request"
  • The input request tree is collapsed when switching the view tab from input request parameters to itineraries and back. There are to good ways to fix this:
    - Remember the state, and expand the same tree.
    - Keep set field expanded end empty fields closed.
  • There is no feedback on error. OTP uses the standard error message format in GraphQL an any call may return an error. Th json must be inspected, the HTTP Status may be be 200, 4xx or 5xx. To get some kind of feedback would be nice. A very good solution would be to list the error JSON as is, not trying to parse it. A minimum solution is to just show the error message.
{ "errors": [  {
   "message": "Variable 'itineraryFilters' has an invalid value: Invalid input for enum 'ItineraryFilterDebugProfile'. No value found for name 'not_selected'",
   "locations": [  {  "line": 1, "column": 510 }  ],
   "extensions": {  "classification": "ValidationError" }
}  ]  }
  • When an input field is cleared, an empty string or not_selected is passed into OTP. The desired behaviour would be to remove the argument from the request again. Testing invalid input is out of scope for the Debug UI.
  • When opening the OTP GraphQL Explorer all trip arguments are listed in the query. The argument list is pruned and only set fields are listed. It would be nice if we could do the same with the query. The query is often inspected manually and all the empty fields make it harder to read. We also use it when reporting bugs - and a minimum query should be used.

Styling

  • The indentation can be shrinked in the request input tree.
@t2gran t2gran added the Improvement A functional improvement label Feb 3, 2025
@leonardehrenfried
Copy link
Member

We have a bunch of debug UI tickets still open:

I believe they can be closed. Can you confirm this and perhaps to the closing yourself?

@t2gran
Copy link
Member Author

t2gran commented Feb 3, 2025

The #5330 is not complete.

@t2gran t2gran changed the title Improve new Debug UI Improve/small fixes to new Debug UI Feb 3, 2025
@testower
Copy link
Contributor

testower commented Feb 3, 2025

When opening the OTP GraphQL Explorer all trip arguments are listed in the query. The argument list is pruned and only set fields are listed. It would be nice if we could do the same with the query. The query is often inspected manually and all the empty fields make it harder to read. We also use it when reporting bugs - and a minimum query should be used.

This is confusing. What does it mean for selection fields to be "set". Does it mean non-null in the response? How can we know this up-front?

@t2gran
Copy link
Member Author

t2gran commented Feb 3, 2025

This is confusing. What does it mean for selection fields to be "set". Does it mean non-null in the response? How can we know this up-front?

The variables list is the answer, it only have fields set from the UI. Her is an example:

Image

The accessEgressPenalty: $accessEgressPenalty, alightSlackDefault: $alightSlackDefault ... is not in the list of variables.

Another problem with this is that if the API changes, then the query will not work until it is manually updated - even if the change has nothing to do with the problem reported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement A functional improvement
Projects
None yet
Development

No branches or pull requests

3 participants