y-scope / yscope-log-viewer

A tool that can be used to view logs compressed in CLP's IR Stream format.
Apache License 2.0
9 stars 12 forks source link

new-log-viewer: Avoid redundant `loadPage` after `loadFile` when loading a URL with a `logEventNum` specified. #55

Closed junhaoliao closed 4 weeks ago

junhaoliao commented 1 month ago

References

new-log-viewer series: #45 #46 #48 #51 #52 #53

48 new-log-viewer: Add UrlContextProvider to provide URL parameters and use them in the StateContextProvider.

It was found that when logEventNum is specified in the web application URL, a redundant loadPage request is sent to the main service worker after an initial loadFile request.

image Debug prints which show a redundant loadPage request is sent after loadFile

Description

  1. new-log-viewer: Avoid redundant loadPage after loadFile when logEventNum is specified in the URL.

Validation performed

  1. Referred to the validation steps in #46 to start the debug server.
  2. Loaded http://localhost:3010/?filePath=http://localhost:3010/test/example.jsonl#logEventNum=10 and observed no loadPage request is sent after loadFile. image Screenshot showing no loadPage request is sent after loadFile
junhaoliao commented 1 month ago

@Henry8192 kindly help review this

kirkrodrigues commented 4 weeks ago

For the PR title, how about:

new-log-viewer: Avoid redundant loadPage after loadFile when loading a URL with a logEventNum specified.