fix(#240): remove weekly pulse badge from ReadyColumn
The weekly count in Lesefertig counted any document with a reviewed block in the past 7 days, not documents that crossed the ≥90% ready threshold — a misleading stat given the column shows a different set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,6 @@ let { segmentationDocs, transcriptionDocs, readyDocs, weeklyStats }: Props = $pr
|
||||
docs={transcriptionDocs}
|
||||
weeklyCount={weeklyStats?.transcriptionCount ?? 0}
|
||||
/>
|
||||
<ReadyColumn docs={readyDocs} weeklyCount={weeklyStats?.readyCount ?? 0} />
|
||||
<ReadyColumn docs={readyDocs} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -8,10 +8,9 @@ type TranscriptionQueueItemDTO = components['schemas']['TranscriptionQueueItemDT
|
||||
|
||||
interface Props {
|
||||
docs: TranscriptionQueueItemDTO[];
|
||||
weeklyCount: number;
|
||||
}
|
||||
|
||||
let { docs, weeklyCount }: Props = $props();
|
||||
let { docs }: Props = $props();
|
||||
|
||||
function reviewedPct(doc: TranscriptionQueueItemDTO): number {
|
||||
if (doc.annotationCount === 0) return 0;
|
||||
@@ -24,15 +23,10 @@ function reviewedPct(doc: TranscriptionQueueItemDTO): number {
|
||||
class="flex flex-col gap-3 rounded-sm border border-brand-mint bg-brand-mint/10 p-4 transition-shadow hover:shadow-sm"
|
||||
>
|
||||
<div>
|
||||
<div class="mb-1 flex items-center gap-2">
|
||||
<div class="mb-1">
|
||||
<h3 class="font-sans text-xs font-bold tracking-widest text-ink uppercase">
|
||||
{m.mission_control_ready_heading()}
|
||||
</h3>
|
||||
{#if weeklyCount > 0}
|
||||
<span class="rounded-full bg-accent-bg px-2 py-0.5 text-xs font-semibold text-ink-2">
|
||||
{m.mission_control_weekly_pulse({ count: weeklyCount })}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
<p class="text-xs font-semibold text-ink-2">
|
||||
{m.mission_control_ready_subtitle({ count: docs.length })}
|
||||
|
||||
@@ -24,7 +24,7 @@ describe('ReadyColumn', () => {
|
||||
const doc1 = makeDoc({ id: 'doc-1', title: 'Leseферtig Brief' });
|
||||
const doc2 = makeDoc({ id: 'doc-2', title: 'Archiv Dokument' });
|
||||
|
||||
render(ReadyColumn, { props: { docs: [doc1, doc2], weeklyCount: 0 } });
|
||||
render(ReadyColumn, { props: { docs: [doc1, doc2] } });
|
||||
|
||||
await expect.element(page.getByText('Leseферtig Brief')).toBeInTheDocument();
|
||||
await expect.element(page.getByText('Archiv Dokument')).toBeInTheDocument();
|
||||
@@ -35,7 +35,7 @@ describe('ReadyColumn', () => {
|
||||
});
|
||||
|
||||
it('renders dashed empty state with CTA link when docs array is empty', async () => {
|
||||
render(ReadyColumn, { props: { docs: [], weeklyCount: 0 } });
|
||||
render(ReadyColumn, { props: { docs: [] } });
|
||||
|
||||
await expect
|
||||
.element(page.getByText('Noch keine Dokumente vollständig transkribiert.'))
|
||||
@@ -59,7 +59,7 @@ describe('ReadyColumn', () => {
|
||||
textedBlockCount: 2
|
||||
});
|
||||
|
||||
render(ReadyColumn, { props: { docs: [doc], weeklyCount: 0 } });
|
||||
render(ReadyColumn, { props: { docs: [doc] } });
|
||||
|
||||
// Should show 100% (using annotationCount=4 as denominator)
|
||||
await expect.element(page.getByText('100% geprüft')).toBeInTheDocument();
|
||||
@@ -68,7 +68,7 @@ describe('ReadyColumn', () => {
|
||||
it('links to /documents/{id}', async () => {
|
||||
const doc = makeDoc({ id: 'ready-789', title: 'Fertiges Dokument' });
|
||||
|
||||
render(ReadyColumn, { props: { docs: [doc], weeklyCount: 0 } });
|
||||
render(ReadyColumn, { props: { docs: [doc] } });
|
||||
|
||||
const link = page.getByRole('link', { name: /Fertiges Dokument/ });
|
||||
await expect.element(link).toHaveAttribute('href', '/documents/ready-789');
|
||||
|
||||
Reference in New Issue
Block a user