feat: Corrections tab — SFT candidate import, review, and JSONL export #15

Merged
pyr0ball merged 99 commits from feat/sft-corrections into main 2026-04-08 22:19:01 -07:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit 03e5f9f9b4 - Show all commits

View file

@ -52,7 +52,7 @@ describe('SftCard', () => {
expect(w.find('[data-testid="quality-chip"]').classes()).toContain('quality-low') expect(w.find('[data-testid="quality-chip"]').classes()).toContain('quality-low')
}) })
it('quality chip has mid-quality class when score 0.4-0.7', () => { it('quality chip has mid-quality class when score is 0.4 to <0.7', () => {
const w = mount(SftCard, { props: { item: MID_QUALITY_ITEM } }) const w = mount(SftCard, { props: { item: MID_QUALITY_ITEM } })
expect(w.find('[data-testid="quality-chip"]').classes()).toContain('quality-mid') expect(w.find('[data-testid="quality-chip"]').classes()).toContain('quality-mid')
}) })
@ -89,4 +89,10 @@ describe('SftCard', () => {
const w = mount(SftCard, { props: { item: LOW_QUALITY_ITEM, correcting: true } }) const w = mount(SftCard, { props: { item: LOW_QUALITY_ITEM, correcting: true } })
expect(w.find('[data-testid="correction-area"]').exists()).toBe(true) expect(w.find('[data-testid="correction-area"]').exists()).toBe(true)
}) })
it('renders nothing for failure reason when null', () => {
const item = { ...LOW_QUALITY_ITEM, failure_reason: null }
const w = mount(SftCard, { props: { item } })
expect(w.find('.failure-reason').exists()).toBe(false)
})
}) })

View file

@ -17,7 +17,7 @@
</div> </div>
<!-- Failure reason --> <!-- Failure reason -->
<p class="failure-reason">{{ item.failure_reason }}</p> <p v-if="item.failure_reason" class="failure-reason">{{ item.failure_reason }}</p>
<!-- Prompt (collapsible) --> <!-- Prompt (collapsible) -->
<div class="prompt-section"> <div class="prompt-section">