In a status filter, swap 'Already Correct' -> 'Skip'
Browse filesWhile a filter is active (reviewing already-labeled clips), the triage/single
'->' action becomes Skip (advance, no status change) instead of Already Correct,
which would wrongly reclassify. markCorrectOrSkip() routes on filterActive();
button label, title, and the -> kbd hint update live via renderCorrectSkipButtons.
Normal unfiltered triage/single keep Already Correct.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
app.js
CHANGED
|
@@ -581,6 +581,15 @@
|
|
| 581 |
afterTriageAction('status-correct');
|
| 582 |
}
|
| 583 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 584 |
function markNeedsCorrection() {
|
| 585 |
if (currentIdx < 0) return;
|
| 586 |
const seg = segments[currentIdx];
|
|
@@ -698,22 +707,41 @@
|
|
| 698 |
textEditor.classList.toggle('readonly', isTriage);
|
| 699 |
editorLabelText.textContent = isTriage ? 'Transcription (reference)' : 'Transcription';
|
| 700 |
|
|
|
|
| 701 |
renderKbdHints();
|
| 702 |
}
|
| 703 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 704 |
function renderKbdHints() {
|
|
|
|
|
|
|
| 705 |
if (mode === 'triage') {
|
| 706 |
kbdHints.innerHTML =
|
| 707 |
'<div class="kbd-hint"><kbd>Space</kbd> Play</div>' +
|
| 708 |
'<div class="kbd-hint"><kbd>D</kbd> Delete</div>' +
|
| 709 |
-
'<div class="kbd-hint"><kbd>→</kbd>
|
| 710 |
'<div class="kbd-hint"><kbd>C</kbd> Needs Fix</div>' +
|
| 711 |
'<div class="kbd-hint"><kbd>↑↓</kbd> Prev/Next</div>';
|
| 712 |
} else if (mode === 'single') {
|
| 713 |
kbdHints.innerHTML =
|
| 714 |
'<div class="kbd-hint"><kbd>Space</kbd> Play</div>' +
|
| 715 |
'<div class="kbd-hint"><kbd>D</kbd> Delete</div>' +
|
| 716 |
-
'<div class="kbd-hint"><kbd>→</kbd>
|
| 717 |
'<div class="kbd-hint"><kbd>Ctrl+Enter</kbd> Save</div>' +
|
| 718 |
'<div class="kbd-hint"><kbd>↑↓</kbd> Prev/Next</div>';
|
| 719 |
} else {
|
|
@@ -934,6 +962,8 @@
|
|
| 934 |
statusFilter = next;
|
| 935 |
filterStart = 0;
|
| 936 |
renderStatusFilter();
|
|
|
|
|
|
|
| 937 |
renderSidebar();
|
| 938 |
updateStats();
|
| 939 |
updateChunkMeta();
|
|
@@ -1777,14 +1807,14 @@
|
|
| 1777 |
markNeedsCorrection();
|
| 1778 |
return;
|
| 1779 |
}
|
| 1780 |
-
// ArrowRight -> Already Correct
|
| 1781 |
if (e.key === 'ArrowRight' && !inEditor) {
|
| 1782 |
e.preventDefault();
|
| 1783 |
-
|
| 1784 |
return;
|
| 1785 |
}
|
| 1786 |
} else if (mode === 'single') {
|
| 1787 |
-
// D -> Delete, ArrowRight -> Already Correct (only when not editing text)
|
| 1788 |
if ((e.key === 'd' || e.key === 'D') && !inEditor) {
|
| 1789 |
e.preventDefault();
|
| 1790 |
markDelete();
|
|
@@ -1792,7 +1822,7 @@
|
|
| 1792 |
}
|
| 1793 |
if (e.key === 'ArrowRight' && !inEditor) {
|
| 1794 |
e.preventDefault();
|
| 1795 |
-
|
| 1796 |
return;
|
| 1797 |
}
|
| 1798 |
} else {
|
|
@@ -1866,7 +1896,7 @@
|
|
| 1866 |
btnNext.addEventListener('click', () => step(1));
|
| 1867 |
// Triage actions
|
| 1868 |
$('btn-delete').addEventListener('click', markDelete);
|
| 1869 |
-
$('btn-already').addEventListener('click',
|
| 1870 |
$('btn-needs').addEventListener('click', markNeedsCorrection);
|
| 1871 |
// Correction actions
|
| 1872 |
$('btn-correct').addEventListener('click', submitCorrected);
|
|
@@ -1874,7 +1904,7 @@
|
|
| 1874 |
$('btn-correct-delete').addEventListener('click', markDelete);
|
| 1875 |
// Single-pass actions
|
| 1876 |
$('btn-single-delete').addEventListener('click', markDelete);
|
| 1877 |
-
$('btn-single-already').addEventListener('click',
|
| 1878 |
$('btn-single-save').addEventListener('click', submitSingle);
|
| 1879 |
// Mode toggle
|
| 1880 |
modeTriageBtn.addEventListener('click', () => setMode('triage'));
|
|
|
|
| 581 |
afterTriageAction('status-correct');
|
| 582 |
}
|
| 583 |
|
| 584 |
+
// The triage/single "β" action. In a normal pass it marks the clip already-correct;
|
| 585 |
+
// while reviewing a status filter it becomes Skip (advance, no status change) β
|
| 586 |
+
// "already correct" is nonsensical for clips that are already labeled.
|
| 587 |
+
function markCorrectOrSkip() {
|
| 588 |
+
if (currentIdx < 0) return;
|
| 589 |
+
if (filterActive()) advanceFiltered();
|
| 590 |
+
else markCorrect();
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
function markNeedsCorrection() {
|
| 594 |
if (currentIdx < 0) return;
|
| 595 |
const seg = segments[currentIdx];
|
|
|
|
| 707 |
textEditor.classList.toggle('readonly', isTriage);
|
| 708 |
editorLabelText.textContent = isTriage ? 'Transcription (reference)' : 'Transcription';
|
| 709 |
|
| 710 |
+
renderCorrectSkipButtons();
|
| 711 |
renderKbdHints();
|
| 712 |
}
|
| 713 |
|
| 714 |
+
// The triage/single "β" button becomes Skip while a status filter is active
|
| 715 |
+
// (reviewing already-labeled clips), else the usual Already Correct.
|
| 716 |
+
function renderCorrectSkipButtons() {
|
| 717 |
+
const skip = filterActive();
|
| 718 |
+
const html = skip
|
| 719 |
+
? 'βοΈ Skip <span class="btn-kbd">β</span>'
|
| 720 |
+
: 'βοΈ Already Correct <span class="btn-kbd">β</span>';
|
| 721 |
+
const title = skip
|
| 722 |
+
? 'Skip to next without changing status (Arrow Right)'
|
| 723 |
+
: 'Mark as already correct (Arrow Right)';
|
| 724 |
+
['btn-already', 'btn-single-already'].forEach(id => {
|
| 725 |
+
const el = $(id);
|
| 726 |
+
if (el) { el.innerHTML = html; el.title = title; }
|
| 727 |
+
});
|
| 728 |
+
}
|
| 729 |
+
|
| 730 |
function renderKbdHints() {
|
| 731 |
+
// In a status-filtered review, "β" skips rather than marking already-correct.
|
| 732 |
+
const rightHint = filterActive() ? 'Skip' : 'Correct';
|
| 733 |
if (mode === 'triage') {
|
| 734 |
kbdHints.innerHTML =
|
| 735 |
'<div class="kbd-hint"><kbd>Space</kbd> Play</div>' +
|
| 736 |
'<div class="kbd-hint"><kbd>D</kbd> Delete</div>' +
|
| 737 |
+
'<div class="kbd-hint"><kbd>→</kbd> ' + rightHint + '</div>' +
|
| 738 |
'<div class="kbd-hint"><kbd>C</kbd> Needs Fix</div>' +
|
| 739 |
'<div class="kbd-hint"><kbd>↑↓</kbd> Prev/Next</div>';
|
| 740 |
} else if (mode === 'single') {
|
| 741 |
kbdHints.innerHTML =
|
| 742 |
'<div class="kbd-hint"><kbd>Space</kbd> Play</div>' +
|
| 743 |
'<div class="kbd-hint"><kbd>D</kbd> Delete</div>' +
|
| 744 |
+
'<div class="kbd-hint"><kbd>→</kbd> ' + rightHint + '</div>' +
|
| 745 |
'<div class="kbd-hint"><kbd>Ctrl+Enter</kbd> Save</div>' +
|
| 746 |
'<div class="kbd-hint"><kbd>↑↓</kbd> Prev/Next</div>';
|
| 747 |
} else {
|
|
|
|
| 962 |
statusFilter = next;
|
| 963 |
filterStart = 0;
|
| 964 |
renderStatusFilter();
|
| 965 |
+
renderCorrectSkipButtons(); // "β" becomes Skip while filtering, Already Correct otherwise
|
| 966 |
+
renderKbdHints();
|
| 967 |
renderSidebar();
|
| 968 |
updateStats();
|
| 969 |
updateChunkMeta();
|
|
|
|
| 1807 |
markNeedsCorrection();
|
| 1808 |
return;
|
| 1809 |
}
|
| 1810 |
+
// ArrowRight -> Already Correct (Skip while a status filter is active)
|
| 1811 |
if (e.key === 'ArrowRight' && !inEditor) {
|
| 1812 |
e.preventDefault();
|
| 1813 |
+
markCorrectOrSkip();
|
| 1814 |
return;
|
| 1815 |
}
|
| 1816 |
} else if (mode === 'single') {
|
| 1817 |
+
// D -> Delete, ArrowRight -> Already Correct / Skip (only when not editing text)
|
| 1818 |
if ((e.key === 'd' || e.key === 'D') && !inEditor) {
|
| 1819 |
e.preventDefault();
|
| 1820 |
markDelete();
|
|
|
|
| 1822 |
}
|
| 1823 |
if (e.key === 'ArrowRight' && !inEditor) {
|
| 1824 |
e.preventDefault();
|
| 1825 |
+
markCorrectOrSkip();
|
| 1826 |
return;
|
| 1827 |
}
|
| 1828 |
} else {
|
|
|
|
| 1896 |
btnNext.addEventListener('click', () => step(1));
|
| 1897 |
// Triage actions
|
| 1898 |
$('btn-delete').addEventListener('click', markDelete);
|
| 1899 |
+
$('btn-already').addEventListener('click', markCorrectOrSkip);
|
| 1900 |
$('btn-needs').addEventListener('click', markNeedsCorrection);
|
| 1901 |
// Correction actions
|
| 1902 |
$('btn-correct').addEventListener('click', submitCorrected);
|
|
|
|
| 1904 |
$('btn-correct-delete').addEventListener('click', markDelete);
|
| 1905 |
// Single-pass actions
|
| 1906 |
$('btn-single-delete').addEventListener('click', markDelete);
|
| 1907 |
+
$('btn-single-already').addEventListener('click', markCorrectOrSkip);
|
| 1908 |
$('btn-single-save').addEventListener('click', submitSingle);
|
| 1909 |
// Mode toggle
|
| 1910 |
modeTriageBtn.addEventListener('click', () => setMode('triage'));
|