Previously, the whole walk tree was returned. This can be convenient
because you get the whole descendant tree all at once, but it's
unusual since all the other individual .json endpoints only return a
single object, not a list.
The cached_endpoint decorator was detecting that the response content
kept changing, so it never returned 304. Oops. At the moment the client
doesn't even use this key, so if we need it back we can use the etag or
another http header.
Previous version had a bug when the URL contained percent-encoded
spaces because url.replace() was looking for spaces and not replacing
the %20. Constructing the url from parts is more reliable.
I was adding messages as strings because that's how they get shown on
the web interface. But it's better to return the real exception objects
and have the interface deal with it.
This prevents the specific tag from being included in the results in
the first place, and has the knock-on effect that the descendants'
lines won't all start with the parent tag's name.
The current system has bad performance when you've got 100,000+ tags.
I discovered that when the server returns 304, the browser gives the
ajax a 200 with the full response, and it's not clear to me if js can
know it got a 304. So, the tag set is being fully re-parsed from the
response on every page load. I was thinking that I should store that in
IndexedDB to avoid the parsing step, but... since the JSON.parse is
done by my common.get before it hits this function, it's meaningless.
Not to mention I still have to rebuild the datalist on every page since
of course that state isn't shared between tabs. Not worth the DB stuff.
We'll see what happens next.