Skip to content

Commit 242d124

Browse files
committed
fix: v1.8.24 — escaped backtick in Extract tab + Help Automation tab
Bug 1: Extract tab shows raw template code "); _sf.insertAdjacentHTML..." When the password card was inserted into the tab-extract block, the template-literal closing backtick was escaped (\\` instead of `) and the next insertAdjacentHTML call was also escaped (\\` instead of `). Result: the raw JS string appeared as visible text in the Extract tab. Fixed at byte level: 0x5c 0x60 → 0x60 at both positions. Bug 2: Help Automation tab rendered outside view-help The htab-automation panel was inserted between view-saved-searches and view-analytics (L408) — completely outside view-help. When the Automation help-tab was clicked, the panel became visible but was outside the scrollable help-panels-wrap, pushing content below the fixed tab bar. Additionally view-learning was also incorrectly placed inside help-panels-wrap during the same insertion. Fixes: - Moved htab-automation into help-panels-wrap (before closing tag) - Moved view-learning back outside view-help (before view-help) - CSS: clean flex approach for #view-help: #view-help.active → display:flex; flex-direction:column; height:100% #help-tabs → flex-shrink:0 (never compressed) .help-panels-wrap → flex:1; overflow-y:auto; min-height:0 - Removed position:sticky workaround (was ineffective in scrolling parent) All 8 htab-panels now inside help-panels-wrap: quickstart, howitworks, qbit, aria2, integrations, settings, trouble, automation 292/292 tests passing
1 parent 10b9e17 commit 242d124

4 files changed

Lines changed: 81 additions & 89 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.23
1+
1.8.24

frontend/static/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,8 +1504,8 @@ function renderSettings() {
15041504
</div>
15051505
</div>
15061506
1507-
</div>\`);
1508-
_sf.insertAdjacentHTML('beforeend', \`<div class="stab-panel" id="tab-notifications">
1507+
</div>`);
1508+
_sf.insertAdjacentHTML('beforeend', `<div class="stab-panel" id="tab-notifications">
15091509
<div class="scard">
15101510
<div class="scard-header">🔔 Discord Notifications</div>
15111511
<div class="scard-body">

frontend/static/index.html

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -405,77 +405,7 @@ <h1 id="page-title">Dashboard</h1>
405405
</div>
406406
</div>
407407

408-
<!-- ── Automation ────────────────────────────────────────────────── -->
409-
<div class="help-panel" id="htab-automation">
410-
<div class="card" style="margin-top:0;border-radius:0 0 var(--radius) var(--radius)">
411-
<div class="card-body" style="max-width:760px;display:flex;flex-direction:column;gap:24px;padding:20px 24px">
412408

413-
<div>
414-
<h3 style="margin:0 0 10px;color:var(--accent);font-size:15px">&#129504; Rule Engine</h3>
415-
<p style="margin:0 0 10px;color:var(--text2);font-size:13px">
416-
The Rule Engine automatically applies actions to new torrents before they are uploaded to AllDebrid.
417-
Enable it in <b>Settings → Automation → Rule Engine</b>.
418-
</p>
419-
<p style="margin:0 0 6px;font-size:12px;font-weight:600">Example rules (JSON):</p>
420-
<pre style="background:var(--surface2);padding:14px;border-radius:var(--radius);font-size:11px;overflow-x:auto;line-height:1.6;margin:0 0 10px">[
421-
{"if": {"label_contains": "anime"}, "then": {"download_path": "/media/anime"}},
422-
{"if": {"title_contains": "REMUX"}, "then": {"priority": -10}},
423-
{"if": {"size_gb_gt": 80}, "then": {"pause": true}},
424-
{"if": {"title_matches": ".*FLUX.*"}, "then": {"priority": 5}},
425-
{"if": {"title_contains": "sample"}, "then": {"block": true}},
426-
{"if": {"source_is": "jackett"}, "then": {"label": "auto"}}
427-
]</pre>
428-
<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:12px">
429-
<div style="background:var(--surface2);padding:10px;border-radius:var(--radius)">
430-
<div style="font-weight:600;margin-bottom:6px;color:var(--text2)">Conditions</div>
431-
<div><code>title_contains</code> — substring match</div>
432-
<div><code>title_matches</code> — regex (re.search)</div>
433-
<div><code>size_gb_gt / size_gb_lt</code> — size in GB</div>
434-
<div><code>label_contains</code> — label/category</div>
435-
<div><code>source_is</code> — manual, jackett, watch…</div>
436-
</div>
437-
<div style="background:var(--surface2);padding:10px;border-radius:var(--radius)">
438-
<div style="font-weight:600;margin-bottom:6px;color:var(--text2)">Actions</div>
439-
<div><code>priority</code> — int, added to current</div>
440-
<div><code>pause</code> — true = start paused</div>
441-
<div><code>download_path</code> — override folder</div>
442-
<div><code>label</code> — set/override label</div>
443-
<div><code>block</code> — true = skip upload</div>
444-
</div>
445-
</div>
446-
</div>
447-
448-
<div>
449-
<h3 style="margin:0 0 10px;color:var(--accent);font-size:15px">&#127919; Download Profiles</h3>
450-
<p style="margin:0 0 10px;color:var(--text2);font-size:13px">
451-
Named presets that bundle download path, priority, and label.
452-
Only one profile can be active at a time.
453-
Configure in <b>Settings → Automation → Download Profiles</b>.
454-
</p>
455-
<p style="margin:0 0 6px;font-size:12px;font-weight:600">Example profiles (JSON):</p>
456-
<pre style="background:var(--surface2);padding:14px;border-radius:var(--radius);font-size:11px;overflow-x:auto;line-height:1.6;margin:0">[
457-
{"name": "Streaming", "download_path": "/media/stream", "priority": 10, "label": "stream"},
458-
{"name": "Archive", "download_path": "/media/archive", "priority": -5, "label": "archive"},
459-
{"name": "Anime", "download_path": "/media/anime", "priority": 5, "label": "anime"},
460-
{"name": "Low Bandwidth", "download_path": "/media/lowbw", "priority": -10,"label": "low-bw"},
461-
{"name": "High Quality", "download_path": "/media/remux", "priority": 0, "label": "remux"}
462-
]</pre>
463-
</div>
464-
465-
</div>
466-
</div>
467-
</div>
468-
<div class="view" id="view-learning">
469-
<div class="card">
470-
<div class="card-header">
471-
<span class="card-title">🧠 Historical Learning</span>
472-
<button class="btn btn-ghost btn-sm" onclick="loadLearningStats()">↻ Refresh</button>
473-
</div>
474-
<div style="padding:14px" id="learning-body">
475-
<div style="color:var(--text3)">Click Refresh to load indexer performance data.</div>
476-
</div>
477-
</div>
478-
</div>
479409

480410
<div class="view" id="view-analytics">
481411
<div class="card">
@@ -829,6 +759,18 @@ <h2 class="view-title">&#9660; Downloads</h2>
829759
</div>
830760
</div>
831761

762+
<div class="view" id="view-learning">
763+
<div class="card">
764+
<div class="card-header">
765+
<span class="card-title">🧠 Historical Learning</span>
766+
<button class="btn btn-ghost btn-sm" onclick="loadLearningStats()">↻ Refresh</button>
767+
</div>
768+
<div style="padding:14px" id="learning-body">
769+
<div style="color:var(--text3)">Click Refresh to load indexer performance data.</div>
770+
</div>
771+
</div>
772+
</div>
773+
832774
<!-- Help -->
833775
<div class="view" id="view-help">
834776
<div class="view-header">
@@ -1176,6 +1118,66 @@ <h3 style="margin:0;color:var(--accent);font-size:15px">Troubleshooting</h3>
11761118
</div>
11771119
</div>
11781120

1121+
<!-- ── Automation ────────────────────────────────────────────────── -->
1122+
<div class="help-panel" id="htab-automation">
1123+
<div class="card" style="margin-top:0;border-radius:0 0 var(--radius) var(--radius)">
1124+
<div class="card-body" style="max-width:760px;display:flex;flex-direction:column;gap:24px;padding:20px 24px">
1125+
1126+
<div>
1127+
<h3 style="margin:0 0 10px;color:var(--accent);font-size:15px">&#129504; Rule Engine</h3>
1128+
<p style="margin:0 0 10px;color:var(--text2);font-size:13px">
1129+
The Rule Engine automatically applies actions to new torrents before they are uploaded to AllDebrid.
1130+
Enable it in <b>Settings → Automation → Rule Engine</b>.
1131+
</p>
1132+
<p style="margin:0 0 6px;font-size:12px;font-weight:600">Example rules (JSON):</p>
1133+
<pre style="background:var(--surface2);padding:14px;border-radius:var(--radius);font-size:11px;overflow-x:auto;line-height:1.6;margin:0 0 10px">[
1134+
{"if": {"label_contains": "anime"}, "then": {"download_path": "/media/anime"}},
1135+
{"if": {"title_contains": "REMUX"}, "then": {"priority": -10}},
1136+
{"if": {"size_gb_gt": 80}, "then": {"pause": true}},
1137+
{"if": {"title_matches": ".*FLUX.*"}, "then": {"priority": 5}},
1138+
{"if": {"title_contains": "sample"}, "then": {"block": true}},
1139+
{"if": {"source_is": "jackett"}, "then": {"label": "auto"}}
1140+
]</pre>
1141+
<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:12px">
1142+
<div style="background:var(--surface2);padding:10px;border-radius:var(--radius)">
1143+
<div style="font-weight:600;margin-bottom:6px;color:var(--text2)">Conditions</div>
1144+
<div><code>title_contains</code> — substring match</div>
1145+
<div><code>title_matches</code> — regex (re.search)</div>
1146+
<div><code>size_gb_gt / size_gb_lt</code> — size in GB</div>
1147+
<div><code>label_contains</code> — label/category</div>
1148+
<div><code>source_is</code> — manual, jackett, watch…</div>
1149+
</div>
1150+
<div style="background:var(--surface2);padding:10px;border-radius:var(--radius)">
1151+
<div style="font-weight:600;margin-bottom:6px;color:var(--text2)">Actions</div>
1152+
<div><code>priority</code> — int, added to current</div>
1153+
<div><code>pause</code> — true = start paused</div>
1154+
<div><code>download_path</code> — override folder</div>
1155+
<div><code>label</code> — set/override label</div>
1156+
<div><code>block</code> — true = skip upload</div>
1157+
</div>
1158+
</div>
1159+
</div>
1160+
1161+
<div>
1162+
<h3 style="margin:0 0 10px;color:var(--accent);font-size:15px">&#127919; Download Profiles</h3>
1163+
<p style="margin:0 0 10px;color:var(--text2);font-size:13px">
1164+
Named presets that bundle download path, priority, and label.
1165+
Only one profile can be active at a time.
1166+
Configure in <b>Settings → Automation → Download Profiles</b>.
1167+
</p>
1168+
<p style="margin:0 0 6px;font-size:12px;font-weight:600">Example profiles (JSON):</p>
1169+
<pre style="background:var(--surface2);padding:14px;border-radius:var(--radius);font-size:11px;overflow-x:auto;line-height:1.6;margin:0">[
1170+
{"name": "Streaming", "download_path": "/media/stream", "priority": 10, "label": "stream"},
1171+
{"name": "Archive", "download_path": "/media/archive", "priority": -5, "label": "archive"},
1172+
{"name": "Anime", "download_path": "/media/anime", "priority": 5, "label": "anime"},
1173+
{"name": "Low Bandwidth", "download_path": "/media/lowbw", "priority": -10,"label": "low-bw"},
1174+
{"name": "High Quality", "download_path": "/media/remux", "priority": 0, "label": "remux"}
1175+
]</pre>
1176+
</div>
1177+
1178+
</div>
1179+
</div>
1180+
</div>
11791181
</div><!-- /help-panels-wrap -->
11801182
</div>
11811183

frontend/static/style.css

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -583,24 +583,14 @@ td { padding: 11px 16px; vertical-align: middle; }
583583
.help-panel { display:none; }
584584
.help-panel.active { display:block; }
585585
/* Help view: tabs always visible, content scrolls below */
586-
#view-help { overflow: hidden; display: none !important; flex-direction: column; }
587-
#view-help.active { display: flex !important; }
586+
#view-help { display: none !important; }
587+
#view-help.active { display: flex !important; flex-direction: column; height: 100%; }
588588
#view-help .view-header { flex-shrink: 0; }
589-
#help-tabs {
590-
flex-shrink: 0; /* tabs never compress */
591-
margin-bottom: 0;
592-
overflow-x: auto; /* horizontal scroll on tiny screens */
593-
scrollbar-width: none; /* Firefox */
594-
-webkit-overflow-scrolling: touch;
595-
}
589+
#help-tabs { flex-shrink: 0; margin-bottom: 0; overflow-x: auto; scrollbar-width: none; }
596590
#help-tabs::-webkit-scrollbar { display: none; }
597-
#view-help .help-panels-wrap {
598-
flex: 1;
599-
overflow-y: auto;
600-
min-height: 0; /* critical: allows flex child to shrink */
601-
}
602-
#view-help .help-panel { display: none; }
603-
#view-help .help-panel.active { display: block; }
591+
.help-panels-wrap { flex: 1; overflow-y: auto; min-height: 0; }
592+
.help-panels-wrap .help-panel { display: none; }
593+
.help-panels-wrap .help-panel.active { display: block; }
604594
.stab-panel.active { display:flex; }
605595
#settings-form .stab-panel.active { max-width: 1180px; }
606596
#settings-form .scard-body { gap: 14px; }

0 commit comments

Comments
 (0)