feat(seo): 사이트맵 재생성 진행상황 + 실시간/폴링 UI

관리자 "전체 재생성"을 큐(Full 모드)로 던지고 진행상황을 SEO 탭에서 확인한다.
Reverb ON 이면 방송 채널 구독으로 실시간 갱신, OFF 면 상태 API 폴링으로 폴백한다.

- SitemapProgress 진행상황 스토어(queued→running→writing→completed/failed,
 캐시 TTL 3600, 방송 스로틀) + SitemapManager.getStatus 확장(progress + realtime_enabled)
- GET /api/admin/seo/sitemap/status(core.settings.read) 신규
- 관리자 재생성을 항상 Full 모드로 큐잉 + 진행률 기록, Job 최종 실패 시 progress=failed 고정
- core.admin.seo.sitemap 방송 채널 인증(core.settings.read)
- SEO 탭 진행상황 UI(상태 배지/단계/누적 URL/실시간·폴링 안내) + 폴링 분기
- 재생성 중 누적 URL 표기(replaceAllForContributor 삽입 건수 반환 — count 쿼리 없이 스트림 누적)
- ja 언어팩 진행상황 UI 번역 동기화
This commit is contained in:
HeuJung committed 2026-07-18 18:22:16 +09:00
1 parent 1629684156
commit face022073
29 files changed
+1145 -83

No files matched your search

@@ -156,6 +156,30 @@ class SitemapUrlRepositoryTest extends TestCase
$this->assertSame(['https://example.com/page/a'], $page, '다른 기여자 행은 보존돼야 합니다.');
}
/**
* replaceAllForContributor 는 삽입된 행 수를 반환한다 (진행상황 누적 URL 표기용).
*
* 청크 경계를 넘겨도 정확히 집계돼야 한다 (INSERT_CHUNK=1000 이므로 2건은 단일 청크지만
* 반환 계약 자체를 고정한다).
*/
public function test_replace_all_for_contributor_returns_inserted_count(): void
{
$count = $this->repository->replaceAllForContributor('sirsoft-board', [
['loc' => 'https://example.com/board/a', 'resource_type' => 'board', 'resource_id' => '1'],
['loc' => 'https://example.com/board/a/1', 'resource_type' => 'board_post', 'resource_id' => '1'],
['loc' => 'https://example.com/board/a/2', 'resource_type' => 'board_post', 'resource_id' => '2'],
]);
$this->assertSame(3, $count);
// 재대체 시에도 새로 삽입된 건수를 반환 (기존 삭제분은 제외)
$recount = $this->repository->replaceAllForContributor('sirsoft-board', [
['loc' => 'https://example.com/board/b', 'resource_type' => 'board', 'resource_id' => '2'],
]);
$this->assertSame(1, $recount);
}
/**
* 긴 loc(2000자) 도 loc_hash 로 안전 저장 및 식별된다 (MySQL 키 길이 회피).
*/