Skip to content

feat(board): add 5-day stale detection/filter and multi-link metadata on threads - #51

Merged
zereight merged 1 commit into
mainfrom
feat/thread-board-stale-links
Nov 22, 2026
Merged

zereight merged 1 commit into
mainfrom
feat/thread-board-stale-links

Conversation

@zereight

Copy link
Copy Markdown
Owner

요약

별도 Bot Items 엔티티를 신설해 스레드 칸반과 이중 관리(Split-Brain)를 만드는 대신, 기존 TaskRecord + ThreadBoard 위에 5일 방치(Stale) 감지·필터와 스레드 멀티 링크(links, 최대 10개) 메타데이터를 확장합니다.

이유

  • Orca Bots 벤치마킹 검토에서 DevilsAdvocate가 TaskRecord/ThreadBoard와 Bot Items의 80% 중복 및 상태 고착 위험을 지적했고, 기존 스레드 보드에 5일 Stale 감지와 멀티 링크만 얹는 것이 가장 안전하고 작은 경계로 정리되었습니다.

변경 파일

  • shared/thread-link.ts: MAX_THREAD_LINKS(10), threadLinkUrls(배열 검증·중복 제거), threadLinksOf(link+links 병합), threadLinkDisplayLabel(PR/MR 단축 표기 및 도메인 폴백) 추가
  • packages/phone-protocol/src/wire.ts, server/store.ts, server/routes/tasks.ts, server/cloud-chat-merge.ts, src/state/store.tsx: TaskRecord/WireTask에 links?: string[] 추가 및 PATCH 검증(http(s), 최대 10개, null 초기화)
  • src/lib/thread-board.ts: BOARD_STALE_WINDOW_MS(5일) 기준 stale 파생 계산(보관·완료·실행/큐 잠금 스레드 제외) 및 links 전달
  • src/components/ThreadBoard.tsx, src/components/ThreadBoardPanel.tsx: Stale 배지(data-board-stale), Stale 필터 토글(data-board-filter-stale), 카드 요약 링크(+N) 및 사이드 패널 전체 링크 칩(data-board-panel-links) 표시
  • src/locales/en.json, src/locales/ko.json, src/locales/pt-br.json: board.stale, board.staleFilter 추가

Before / After 증적

  • Before: 스레드 보드에서 5일 이상 방치된 활성 스레드를 구분/필터링할 수 없었고, 스레드당 단일 link만 표시 가능.
  • After:
    • pnpm vitest run src/lib/thread-board.test.ts src/components/ThreadBoard.test.ts src/components/Select.guard.test.ts shared/thread-link.test.ts → 3개 파일 18/18 통과
    • node -e 직접 실행으로 threadLinkUrls(중복 제거·javascript: 차단·11개 초과 거부), threadLinksOf, threadLinkDisplayLabel 검증 → RUNTIME_VERIFY_OK
    • pnpm run typecheck → 통과 (exit 0)
    • pnpm run build → 통과 (exit 0, 18.88s)
    • pre-push 가드 (vocabulary.test.ts, file-size-ratchet.test.ts) → 통과

@zereight
zereight merged commit 09d8bda into main Nov 22, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant