Skip to content

feat: add session scope, provider policy, and queue utilities#184

Closed
bbsngg wants to merge 1 commit intomainfrom
split/a-foundation-types
Closed

feat: add session scope, provider policy, and queue utilities#184
bbsngg wants to merge 1 commit intomainfrom
split/a-foundation-types

Conversation

@bbsngg
Copy link
Copy Markdown
Contributor

@bbsngg bbsngg commented Apr 15, 2026

Summary

  • Add providerPolicy (provider whitelist/normalization), sessionScope (composite scope key management), sessionEvents (event constants)
  • Add codexQueue (queued turn data structures), sessionLoadGuards, sessionMessageCache, sessionSnapshotCache, sessionFilterDebug
  • Add QueuedTurn types to chat types
  • All modules include unit tests (~1,090 lines, pure additions)

Part of the session lifecycle PR split (2/6, independent). Foundation for PRs D and E.

Test plan

  • npx tsc --noEmit passes
  • npx vitest run src/utils/__tests__/sessionScope.test.ts src/components/chat/utils/__tests__/codexQueue.test.ts src/components/chat/utils/__tests__/sessionLoadGuards.test.ts src/components/chat/utils/__tests__/sessionMessageCache.test.ts src/components/chat/utils/__tests__/sessionSnapshotCache.test.ts passes

🤖 Generated with Claude Code

Add foundational utility modules for the upcoming session lifecycle
feature. These are pure additions with no changes to existing behavior.

New modules:
- providerPolicy: provider whitelist, normalization, and validation
- sessionScope: composite project::provider::session key management
- sessionEvents: optimistic session-created event constants
- codexQueue: queued turn data structures and queue operations
- sessionLoadGuards: pre-load validation helpers
- sessionMessageCache: provider-scoped message cache key generation
- sessionSnapshotCache: session state snapshot cache
- sessionFilterDebug: debug logging controlled via localStorage
- QueuedTurn types added to chat types

All modules include unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bbsngg
Copy link
Copy Markdown
Contributor Author

bbsngg commented Apr 15, 2026

Split from #170 (2/6). Independent — can be merged immediately. #187 and #188 depend on this. See #170 for full split plan.

@bbsngg bbsngg closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant