[fix](trx-frontend-http): group decode history by decoder

Serve grouped decode history payloads and restore each decoder through
explicit history restore hooks instead of replaying a mixed message stream.

This reduces replay overhead further by removing type regrouping and keeping
history restoration on decoder-specific bulk paths.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-14 18:11:09 +01:00
parent cba3751f0e
commit 73b1d5618d
10 changed files with 176 additions and 138 deletions
@@ -390,6 +390,10 @@ window.onServerAisBatch = function(messages) {
scheduleAisHistoryRender();
};
window.restoreAisHistory = function(messages) {
window.onServerAisBatch(messages);
};
window.pruneAisHistoryView = function() {
pruneAisMessageHistory();
updateAisBar();
@@ -447,6 +447,10 @@ window.onServerAprsBatch = function(packets) {
scheduleAprsHistoryRender();
};
window.restoreAprsHistory = function(packets) {
window.onServerAprsBatch(packets);
};
document.getElementById("aprs-clear-btn").addEventListener("click", async () => {
try {
await postPath("/clear_aprs_decode");
@@ -426,6 +426,14 @@ window.onServerCw = function(evt) {
});
};
window.restoreCwHistory = function(events) {
if (!Array.isArray(events) || events.length === 0) return;
if (cwStatusEl) cwStatusEl.textContent = cwPaused ? "Paused" : "Receiving";
for (const evt of events) {
window.onServerCw(evt);
}
};
if (cwPauseBtn) {
cwPauseBtn.addEventListener("click", () => {
cwPaused = !cwPaused;
@@ -167,6 +167,10 @@ window.onServerFt8Batch = function(messages) {
scheduleFt8HistoryRender();
};
window.restoreFt8History = function(messages) {
window.onServerFt8Batch(messages);
};
window.pruneFt8HistoryView = function() {
pruneFt8MessageHistory();
updateFt8Bar();
@@ -393,6 +393,10 @@ window.onServerHfAprsBatch = function(packets) {
scheduleHfAprsHistoryRender();
};
window.restoreHfAprsHistory = function(packets) {
window.onServerHfAprsBatch(packets);
};
document.getElementById("hf-aprs-decode-toggle-btn")?.addEventListener("click", async () => {
try { await postPath("/toggle_hf_aprs_decode"); } catch (e) { console.error("HF APRS toggle failed", e); }
});
@@ -331,6 +331,10 @@ window.onServerVdesBatch = function(messages) {
scheduleVdesHistoryRender();
};
window.restoreVdesHistory = function(messages) {
window.onServerVdesBatch(messages);
};
if (vdesClearBtn) {
vdesClearBtn.addEventListener("click", async () => {
try {
@@ -144,6 +144,10 @@ window.onServerWsprBatch = function(messages) {
scheduleWsprHistoryRender();
};
window.restoreWsprHistory = function(messages) {
window.onServerWsprBatch(messages);
};
window.pruneWsprHistoryView = function() {
pruneWsprMessageHistory();
renderWsprHistory();