diff --git a/app/static/js/app.js b/app/static/js/app.js
index 7f11fba..3c30982 100644
--- a/app/static/js/app.js
+++ b/app/static/js/app.js
@@ -1237,13 +1237,35 @@ function updateMessageMetaDOM(wrapper, meta) {
if (meta.packet_hash) {
const actionsEl = msgDiv.querySelector('.message-actions');
if (actionsEl && !actionsEl.querySelector('[title="View in Analyzer"]')) {
- const resendBtn = actionsEl.querySelector('[title="Resend"]');
+ // Anchor analyzer before whichever action button comes first
+ // (post-rename: "Edit message"; legacy renders may still say "Resend")
+ const anchor = actionsEl.querySelector('[title="Edit message"]')
+ || actionsEl.querySelector('[title="Resend"]')
+ || actionsEl.querySelector('[title^="Resend"]');
const analyzerBtn = document.createElement('button');
analyzerBtn.className = 'btn btn-outline-secondary btn-msg-action';
analyzerBtn.setAttribute('onclick', `openMessageAnalyzer('${meta.packet_hash}')`);
analyzerBtn.title = 'View in Analyzer';
analyzerBtn.innerHTML = '';
- actionsEl.insertBefore(analyzerBtn, resendBtn);
+ if (anchor) actionsEl.insertBefore(analyzerBtn, anchor);
+ else actionsEl.appendChild(analyzerBtn);
+ }
+ }
+
+ // Add raw-resend button if supported and missing. The initial render
+ // path also injects this, but messages loaded from history before
+ // window.deviceCaps was populated by loadStatus get it here on the
+ // next echo-driven meta refresh.
+ const msgId = wrapper.dataset.msgId;
+ if (window.deviceCaps?.supports_raw_resend && msgId) {
+ const actionsEl = msgDiv.querySelector('.message-actions');
+ if (actionsEl && !actionsEl.querySelector('.btn-raw-resend')) {
+ const rawBtn = document.createElement('button');
+ rawBtn.className = 'btn btn-outline-secondary btn-msg-action btn-raw-resend';
+ rawBtn.setAttribute('onclick', `resendChannelMessageRaw(${msgId}, this)`);
+ rawBtn.title = 'Resend (rebroadcast same packet so unreached repeaters can pick it up)';
+ rawBtn.innerHTML = '';
+ actionsEl.appendChild(rawBtn);
}
}
}
@@ -1329,9 +1351,14 @@ function createMessageElement(msg) {
` : ''}
-