fix(dashboard): fs.watch cache invalidation + agent status inference improvements#1
Merged
Merged
Conversation
…s inference - server.mjs: cache buildStatus() result in memory, invalidate via fs.watch on each project's .velith/status.json so dashboard reflects scan-project.js updates without server restart - scan-project.js: add publish/marketing-plan.md as marketing-expert artifact so it reports 'complete' when marketing plan exists - scan-project.js: relax style-doctor/continuity-editor status checks to recognize any edit stage >= line-edit as complete - scan-project.js: mark fiction-only agents (scene-generator) as 'disabled' for non-fiction genres instead of 'idle'
- server.mjs: attach agents array to each project record so frontend shows project-specific agent statuses - server.mjs: global agents fallback now merges by picking the most- progressed status (complete > running > disabled > idle) across projects instead of last-project-wins - App.svelte: derive agents from selected project's agents first, falling back to global agents list - rebuild dist bundle with updated App.svelte
Genre-based disabled inference was overreach — scene-generator is useful beyond strict fiction (game scenarios, screenplay, etc). Let it report idle naturally instead of forcing disabled.
filter(Boolean) excludes 0 (falsy), causing ch00.md to be missing from draftedNums and generating a spurious wait entry for Chapter 0.
…ion genre sync - Add status.disabled key to all 10 locale files (en/ko/ja/zh/de/es/fr/it/pt/ru) - Add disabled agent count tile and badge styling in StatusView.svelte - Clean up stale fs.watch entries when projects removed from registry - Export FICTION_GENRES constant in data.js, aligned with scan-project.js - Align scene-generator role text in SAMPLE_DATA and examples/status.json
- server.mjs: spread cachedStatus instead of mutating generated_at directly - scan-project.js: add FICTION_GENRES + EDIT_STAGE_ORDER constants; scene-generator now sets 'disabled' for non-fiction genres; style-doctor/continuity-editor use editStageGte() helper instead of hardcoded OR chains - StatusView.svelte: dynamic grid columns (3 or 4) based on disabledCount so layout stays correct when disabled card is absent - data.js: fix sync comment to match actual constant name FICTION_GENRES
…uard, example status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 내용
1. 대시보드 서버 캐시 무효화 (
dashboard/server.mjs)buildStatus()결과를 인메모리 캐시에 저장하여 매 HTTP 요청마다 디스크를 읽지 않도록 최적화.velith/status.json에fs.watch를 설정하여 파일 변경 시 캐시 자동 무효화scan-project.js실행 후 서버 재시작 없이도 대시보드에 즉시 반영됨2. 에이전트 상태 추론 로직 개선 (
skills/book-status/scripts/scan-project.js)idlepublish/marketing-plan.mdartifact 추가 → 파일 존재 시completeeditStage === proofread만completeline-edit이상이면completeeditStage === developmental만completedevelopmental이상이면completeidle표시disabled표시3. Fiction 전용 에이전트 구분
scene-generator를 fiction-only로 분류fiction,romance,thriller,mystery,fantasy,sci-fi,literary-fiction외 장르에서disabled상태로 표시테스트
complete로 표시되는지 확인disabled로 표시되는지 확인