refactor(sessions): single source of truth for session directory scope (#10)

Extract the list/create scope rule into sessionScopeDirectory() so loadSessions
and createSession can no longer drift apart — the root cause of #10 (sessions
empty after connect/create). Add a zero-dependency node:test regression guard
proving both paths resolve identically across all inputs, a 'test' npm script,
and exclude test files from the app typecheck.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
engineer
2026-06-01 23:46:48 -07:00
parent 0615ab898e
commit bed0b6f622
5 changed files with 59 additions and 18 deletions

View File

@@ -8,7 +8,8 @@
"start:clear": "expo start --clear",
"ios": "expo run:ios",
"android": "expo run:android",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"test": "node --test 'src/**/*.test.ts'"
},
"dependencies": {
"@expo/vector-icons": "^15.0.3",