StampyAI / stampy-ui

AI Safety Q&A web frontend
https://aisafety.info
MIT License
35 stars 9 forks source link

Answer text sometimes fails to load, and sometimes unloads after loading #171

Closed ChrisRimmer closed 1 year ago

ChrisRimmer commented 1 year ago

Initially reported by Plex in Discord: https://discord.com/channels/677546901339504640/758062805810282526/1076611649487786085

Steps to reproduce:

  1. Clear cache at https://ui.stampy.ai/questions/cache
  2. Load https://aisafety.info/?state=2222_
  3. If the question loaded correctly and the whole answer text appears, return to step 1

Expected behaviour:

Actual behaviour:

Tests performed and other notes:

I suspect the steps to reproduce above are incomplete, as the failure rate seemed to slowly go to zero as I repeated the process. In my last ten or so attempt to clear my question cache and reload the page, the answer has loaded correctly every time, after failing quite reliably earlier on. I think the error smells a bit like a race condition, so if there's some network or application level caching happening that might have affected the timing of the network request I can imagine that might be responsible for the increase in my perceived reliability. Just a guess though!

Aprillion commented 1 year ago

It could be the way how infinite scroll de-duplicates answers, since the responses have text: null e.g.:

e.g. https://aisafety.info/questions/allOnSite?nextPage=https://coda.io/apis/v1/docs/fau7sl2hmG/tables/table-1Q8_MjxUes/rows?pageToken=eyJsaW1pdCI6MTAsIm9mZnNldCI6MTAsIm9wVmVyc2lvbiI6MzMxMjIsInNjaGVtYVZlcnNpb24iOjE3MSwic29ydEJ5IjoibmF0dXJhbCIsInVzZUNvbHVtbk5hbWVzIjp0cnVlLCJ2YWx1ZUZvcm1hdCI6InJpY2gifQ image

@mruwnik can you please investigate?

mruwnik commented 1 year ago

Hopefully fixed by the above merge - if this bug doesn't reappear over the next week or so, this can be closed

mruwnik commented 1 year ago

Can this be closed?