hippotable icon indicating copy to clipboard operation
hippotable copied to clipboard

[bug] Limit max URL length

Open thoughtspile opened this issue 1 year ago • 0 comments

Describe the bug

A long analysis / charts config (over 7K with our json + base64 serialization) causes GH to return HTTP 413 when you open the link / reload page.

To Reproduce

Steps to reproduce the behavior:

  1. Open alalysis panel
  2. Add analysis steps / chart until location.href length reaches 8000
  3. Reload the page or copy & paste link from the address bar

Expected: Page loads with some pipeline and no error Actual: GH pages returns 413, app is not loaded

Expected behavior

  • State is not persisted to URL if the resulting URL length would cause GH pages to 413.
  • Further changes are not prevented in case you'd like to go ahead locally, and don't need to share
  • Page reload / copy-and-paste from the address bar leads you to the last persisted state before overflow

Screenshots If applicable, add screenshots to help explain your problem.

Extra considerations

The limit should be enforced globally for all the persisted parameters (app URL + CSV source URL + panels + analysis + charts). It's best to centralize persistence and allow any breakdown of allowed length between parts, but we could also enforce separate limits per parameter if the optimal approach is too hard.

thoughtspile avatar Jun 19 '24 11:06 thoughtspile