fix(lifecycle): NoteStatus 의 archived 제거 — MoveStatusModal/classifyStatus/store 정리

- NoteStatus 에서 'archived' 제거 (active | completed | trashed 3분기)
- MoveStatusModal ALL_STATUSES 에서 'archived' 제거 + statusLabel switch 정리
- classifyStatus VALID/FALLBACK/PROMPT 에서 archived 제거 → completed fallback
- inboxApi IPC set-status VALID 배열에서 archived 제거, classify-status fallback → completed
- store InboxView 에서 'archived' 제거, InboxCounts.archived 제거, archived: 0 spread 제거
- ImportService.applySyncFromDir — 기존 파일의 status=archived 를 completed 로 coerce
- 영향 받는 tests 13개 파일 모두 update (archived → completed, 없어진 UI 옵션 제거)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
th-kim0823
2026-05-15 11:03:09 +09:00
parent 96174f84c9
commit 274c171ee8
13 changed files with 78 additions and 94 deletions

View File

@@ -26,7 +26,7 @@ describe('MoveStatusModal', () => {
cleanup();
});
it('renders reason textarea + 4 buttons + AI classify button', () => {
it('renders reason textarea + 3 buttons + AI classify button (v0.4 — 보관 제거)', () => {
render(
<MoveStatusModal
noteId="n1"
@@ -39,7 +39,7 @@ describe('MoveStatusModal', () => {
);
expect(screen.getByRole('textbox')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '완료' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '보관' })).toBeInTheDocument();
expect(screen.queryByRole('button', { name: '보관' })).toBeNull();
expect(screen.getByRole('button', { name: '휴지통' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /AI 자동 분류/ })).toBeInTheDocument();
});
@@ -84,7 +84,7 @@ describe('MoveStatusModal', () => {
await waitFor(() => expect(onMoved).toHaveBeenCalledWith('completed', '결재 끝'));
});
it('currentStatus=completed → Inbox/보관/휴지통 노출, 완료 미노출', () => {
it('currentStatus=completed → Inbox/휴지통 노출, 완료/보관 미노출 (v0.4 — 보관 제거)', () => {
render(
<MoveStatusModal
noteId="n1"
@@ -96,31 +96,14 @@ describe('MoveStatusModal', () => {
/>
);
expect(screen.getByRole('button', { name: 'Inbox' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '보관' })).toBeInTheDocument();
expect(screen.queryByRole('button', { name: '보관' })).toBeNull();
expect(screen.getByRole('button', { name: '휴지통' })).toBeInTheDocument();
expect(screen.queryByRole('button', { name: '완료' })).toBeNull();
});
it('currentStatus=archived → Inbox 버튼 클릭 시 setStatus("active") 호출', async () => {
const onMoved = vi.fn();
render(
<MoveStatusModal
noteId="n1"
rawText="t"
summary=""
currentStatus="archived"
onClose={vi.fn()}
onMoved={onMoved}
/>
);
fireEvent.click(screen.getByRole('button', { name: 'Inbox' }));
await waitFor(() => {
expect(mockSetStatus).toHaveBeenCalledWith('n1', 'active', null);
expect(onMoved).toHaveBeenCalledWith('active', null);
});
});
// v0.4 Task 16 — currentStatus=archived 는 NoteStatus 에서 제거됨. 테스트 제거.
it('currentStatus=trashed → Inbox/완료/보관 노출, 휴지통 미노출', () => {
it('currentStatus=trashed → Inbox/완료 노출, 휴지통/보관 미노출 (v0.4 — 보관 제거)', () => {
render(
<MoveStatusModal
noteId="n1"
@@ -133,7 +116,7 @@ describe('MoveStatusModal', () => {
);
expect(screen.getByRole('button', { name: 'Inbox' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '완료' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '보관' })).toBeInTheDocument();
expect(screen.queryByRole('button', { name: '보관' })).toBeNull();
expect(screen.queryByRole('button', { name: '휴지통' })).toBeNull();
});
@@ -185,7 +168,7 @@ describe('MoveStatusModal', () => {
onMoved={onMoved}
/>
);
fireEvent.click(screen.getByRole('button', { name: '보관' }));
await waitFor(() => expect(mockSetStatus).toHaveBeenCalledWith('n1', 'archived', null));
fireEvent.click(screen.getByRole('button', { name: '완료' }));
await waitFor(() => expect(mockSetStatus).toHaveBeenCalledWith('n1', 'completed', null));
});
});