core, webclient: cheap session lists, changed-row saves, smaller bundle
The sidebar asked for a count and a 60-char snippet and got every hot
message of every listed session: 2,097 rows / 4.4 MB for 507 sessions,
plus a full Pydantic hydration. list_page now aggregates counts and the
last displayed line in SQL (4.0 ms, 30 rows); get_meta folds its COUNT
into the same round trip.

save() runs after every streaming step and rewrote the whole hot
history each time — 1,016 UPDATEs, 46.8 ms, per call, growing with the
session. A fingerprint of the mutable columns lets it touch only the
rows that changed, which is normally the tail.

HTTP: content-hashed /assets are immutable for a year, gzip drops to
level 6 (same ratio within a couple of percent on JSON, half the CPU),
and session search gets pg_trgm GIN indexes when the extension exists.

Client: one shared highlight.js on lib/common plus the languages we
actually render (openscad included) instead of the full ~190-language
entry point, and the unused @tanstack/vue-virtual is gone.
Bundle 1566 -> 760 kB (gzip 495 -> 238 kB).
1 parent 2bc9b12 commit 01c0f78dff186cd520a079acb342c143498161db
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 15 hours ago
Showing 17 changed files
View
navi/api/routes/sessions/listing.py
View
navi/core/session.py
View
navi/core/sessions/ddl.py
View
navi/core/sessions/rows.py
View
navi/core/sessions/store.py
View
navi/main.py
View
tests/unit/api/test_gzip.py
View
tests/unit/core/test_pg_session_store.py
View
webclient/dist/assets/index-Ceizh7DK.js 0 → 100644
View
webclient/dist/assets/index-D-jo88O-.js 100644 → 0
Not supported
View
webclient/dist/index.html
View
webclient/dist/sw.js
View
webclient/package-lock.json
View
webclient/package.json
View
webclient/src/composables/useMarkdown.js
View
webclient/src/utils/highlight.js 0 → 100644
View
webclient/src/utils/sourceHighlight.js