Repository navigation
feat(listener): report recent projects instead of past sessions - #36
Merged
Merged
Conversation
The phone no longer lists ended runs, so the sessions report stops carrying knownSessions (up to 50 runs, ~21 KB) and carries recentProjects instead: the projects this machine ran lately, up to 12, each agent of a project once with the newest session it ran there. That is the list the phone starts a new session from (hwip session-runs Q47). Entries carry no times: a running session's lastSeenAt moves on every sweep and would defeat the unchanged-inventory gate. An unreadable registry leaves the field out rather than sending an empty list, which would clear the phone's project list. The registry, recallRun/recallSession and the runId resume and forget handlers stay: fresh starts read folders from the registry, and older apps may still resume or forget a run.
|
🎉 This PR is included in version 0.1.18 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
리스너의 세션 보고가 지난 실행 목록(
knownSessions, 최대 50건·약 21KB)을 더 이상 싣지 않습니다. 대신 이 컴퓨터가 최근에 연 프로젝트 목록인recentProjects를 싣습니다. 프로젝트는 최대 12개이고, 프로젝트·에이전트 쌍마다 그 프로젝트에서 연 가장 최근 세션 하나를 적습니다. 폰은 이 목록으로 '+' 새 세션 시트를 채웁니다. 지금 실행 중인 세션이 없는 프로젝트도 계속 고를 수 있습니다(hwipdocs/session-runs.mdQ47·Q49).hwip 쪽 스택 PR(server → iOS → Android → 제거) hwipit/hwip#679 ~ hwipit/hwip#688 과 짝입니다. server PR(#679·#682·#683)이 배포된 뒤 머지합니다.
Changes
src/recent-projects.ts(새 파일):recentProjectsToReport(now)는 레지스트리의knownSessions(now)순서대로 (project ?? name,agentKind)별 첫 항목만 남깁니다.<parent>.<digits>)와 예약 세션(-sched-)은 뺍니다.src/sessions-report.ts:planSessionsReport가 첫 조각에recentProjects를 싣습니다. 레지스트리를 읽을 수 없으면(registryUnreadable()) 필드를 아예 뺍니다. 빈 배열을 보내면 서버가 폰의 프로젝트 목록을 지우기 때문입니다.src/listener.ts:knownSessionsToReport·지문·KNOWN_SESSIONS_REPORTED를 제거하고, 테스트listener-known-sessions.test.ts를 삭제했습니다.recallRun·recallSession,runId다시 시작·forget 핸들러.줄 수: +227 / −456. 삭제한 테스트 파일 하나가 319줄입니다.
How to Test
GitHub Actions 가 돌지 않아 로컬에서
.github/workflows/test.yml단계를 돌렸습니다.npm run build: 통과npx vitest run --exclude src/http-proxy.test.ts: 211 files, 5635 passed / 1 skippedhttp-proxy.test.ts는 main(8e2daa1)에서도 로컬 프록시 환경 탓에 8개가 실패해서 뺐습니다.Evidence
/review --full, 교차 모델(sonnet) 파인더에서 cli 쪽 지적은 0건입니다.project에는 절대경로가 아닌 프로젝트 이름만 나갑니다.Risks
recentProjects를 무시합니다.사람 할 일
Door: two-way(필드 추가·제거. 옛 앱의 다시 시작 경로는 남겨 둠)
🤖 Generated with Claude Code