You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract load lifecycle orchestration from main.go into a shared boundary so list mode, interactive mode, and the future debug-load performance hook can reuse source loading behavior without copying logic.
Current problem
main.go currently owns two load paths:
list mode waits for a complete session list before rendering rows;
interactive mode starts the picker immediately and feeds it streaming batches.
The source loaders are partly reused, but orchestration concerns are split across main.go: source selection, source concurrency, date filtering, partial failure handling, complete-load result construction, stream completion, and batch ownership.
Desired direction
Add a dedicated load lifecycle boundary.
Keep complete loading and streaming loading as separate caller-facing paths.
Move the streaming batch contract to the load boundary so picker consumes the loader-owned batch type directly.
Preserve current behavior for list mode and interactive mode.
Goal
Extract load lifecycle orchestration from
main.gointo a shared boundary so list mode, interactive mode, and the future debug-load performance hook can reuse source loading behavior without copying logic.Current problem
main.gocurrently owns two load paths:The source loaders are partly reused, but orchestration concerns are split across
main.go: source selection, source concurrency, date filtering, partial failure handling, complete-load result construction, stream completion, and batch ownership.Desired direction
pickerconsumes the loader-owned batch type directly.Non-goals
--debug-load; that belongs to Add debug-load performance hook #59.Plan
See
docs/agent/plan-issue-61-load-lifecycle-refactor.md.