๐Ÿ’พ Archived View for bbs.geminispace.org โ€บ s โ€บ Lagrange-Issues โ€บ 33 captured on 2023-07-22 at 16:59:38. Gemini links have been rewritten to link to archived content

View Raw

More Information

โฌ…๏ธ Previous capture (2023-07-10)

โžก๏ธ Next capture (2023-09-08)

๐Ÿšง View Differences

-=-=-=-=-=-=-

[#33] Streaming bugs

Two or three bugs with streamed gemtext in Lagrange (latest dev branch).

Bug 1: truncation

Occasionally, the streamed page is truncated in the output, even though the connection to server stays alive. It seems to always show complete lines, but sometimes all lines after some point are not shown, even if the stream is appended to. Test case:

gemini://sggs.thegonz.net/?infstreamtest

This is running the following cgi shell script:

printf "20 text/gemini\r\n"
n=0
while true; do
    echo "$((n++))"
    if [ $((n%500)) -eq 0 ]; then
        sleep 1
    fi
    sleep 0.01
done

Running this locally, I find Lagrange truncates the page after some random number of lines, normally around 5-40. Without the "sleep 0.01" it sometimes gets into the thousands.

The CGI script continues running, and the tls connection is still up, and I can see from tcpdump that the network traffic continues. The connection closes once the tab is closed in lagrange.

Bug 2: refreshing

If I refresh a streaming page, Lagrange seems to consider it as a request to refresh the *previous* url. If that was itself a streaming page, another refresh will cause it to refresh the url before, and so on backwards through history. This seems unlikely to be what's wanted!

Arguable bug 3: no indication when stream appended to

One more thing, though not so clearly a bug. If the stream is appended to

while the user isn't scrolled down to the end, the only way the user can tell

is if they pay careful attention to the scroll bar. This is a problem for

things like SGGS or mozz's chat thingy, which append to the stream as a way of

notifying the user.

#bug #feature

๐Ÿž Issue #33 in s/Lagrange-Issues

๐Ÿš€ mbays

2023-06-11 ยท 6 weeks ago

3 Comments โ†“

๐Ÿš€ skyjake

I'm adding a #feature tag because there should be an officially recognized UI state where the tab is understood to be in streaming mode. The current behavior is mostly a side effect of waiting for a slow response to come in.

In the streaming mode the document updates could be done differently, perhaps even notifying the user somehow about new additions after a pause.

๐Ÿš€ mbays

@skyjake Hmm, I guess also if there's a lengthy pause due to network delays the user could want to know when new data comes in.

๐Ÿš€ mbays

This infstreamtest test seems to work fine on Android (I don't know what Lagrange version, but could find out). It remain broken with latest dev on my linux machine.

2023-06-18 ยท 5 weeks ago