diff --git a/docs/architecture.adoc b/docs/architecture.adoc index 6222a91..94b099a 100644 --- a/docs/architecture.adoc +++ b/docs/architecture.adoc @@ -282,26 +282,31 @@ multi-second hang on a checkbox click reads as broken in a way the same wait during an upload doesn't. A file that fails to parse still saves fine either way; the error just surfaces on first view instead. A `.geojson` upload skips this path entirely — `geojson` reads and -returns it directly, no cache file, no `Gpx`/`Fit` involved; the file -tree's cached-file icon (`GEOJSON_ICON`, `public/js/icons.js`) always -shows for one, since there's no conversion step it could ever be -waiting on. +returns it directly, no cache file, no `Gpx`/`Fit` involved. +`GpxStore#save` converting eagerly means `cached` is `true` for +almost everything in the tree — the one exception is a `.gpx`/`.fit` +dropped straight into `data/gpx/` on the filesystem, bypassing the +app, and not yet opened. Badging the common case would just be noise, +so the file tree's icon (`PENDING_ICON`, `public/js/icons.js`) marks +that exception instead of the (near-universal) ready state. + Once a `.gpx`/`.fit` is cached, the tree shows it under its converted name instead — `"ride.gpx"` reads as `"ride.gpx.geojson"`, matching the real cache file sitting next to it on disk — since the GeoJSON, not the original, is what's actually rendered on the map from that point on. The original is never deleted or re-parsed once cached, just -not re-shown as itself; the tree's file name is a real link -(`GET /api/gpx/file/?download=1`), the only way to get that -converted form out of the app as an actual file, since the cache is -otherwise an implementation detail with no name of its own to expose. -It's an ``, not a ``, specifically so clicking it downloads -instead of also toggling the row's checkbox — a native ``/`