refactor(session): enforce canonical UI projection boundaries#194
Merged
Conversation
Route session UI surfaces through narrow canonical selectors, quarantine transcript compatibility writers, and document the GOD authority boundary for duplicate provider-id and ordering bugs.
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
Compatibilitynames while keeping canonical snapshot/delta paths as product transcript truth.Verification
cd packages/desktop && bun run checkgit diff --checkcd packages/desktop && bun test ./src/lib/acp/store/queue/__tests__/queue-utils.test.ts ./src/lib/acp/store/__tests__/tab-bar-store.test.ts ./src/lib/acp/store/__tests__/tab-bar-utils.test.ts ./src/lib/acp/store/__tests__/urgency-tabs-store.test.ts ./src/lib/acp/store/__tests__/live-session-work.test.ts ./src/lib/acp/store/__tests__/session-store-projection-state.vitest.ts ./src/lib/acp/components/agent-input.test.ts ./src/lib/acp/store/__tests__/session-entry-store-streaming.vitest.ts ./src/lib/acp/store/services/__tests__/chunk-aggregator.test.ts ./src/lib/acp/store/services/__tests__/transcript-tool-call-buffer.test.ts ./src/lib/acp/store/__tests__/assistant-chunk-aggregation.test.ts ./src/lib/acp/store/__tests__/chunk-fragmentation-scenarios.vitest.ts ./src/lib/acp/store/__tests__/chunk-aggregation-bug.test.ts ./src/lib/acp/store/__tests__/tool-call-event-flow.test.tsNotes
Rust checks were not rerun for this final slice because the committed work touched desktop TypeScript/Svelte/docs only.
Summary by cubic
Refactored session UI to use canonical selectors end-to-end and quarantined legacy transcript paths under explicit Compatibility APIs to prevent provider-id/order drift in rendering.
Refactors
permission-operation-projection(operation-derived), and removedpermission-visibility.ts.OperationStoreSvelte context; UI no longer pulls the store directly. Access operation-driven state via session store helpers and projections.appendCompatibilityEntry,replaceCompatibilityEntry, etc.).Migration
getSessionLifecyclePresentation,getSessionUsageTelemetry,getCanonicalSessionProjection, and related getters.permission-operation-projection:visiblePermissionsForOperations,isPermissionRepresentedByOperation,shouldHidePermissionBarForExitPlanFromOperations.createOperationStore/getOperationStorein UI; do not injectOperationStorevia context.preloadCompatibilityEntriesAndBuildIndex,recordCompatibilityToolCallTranscriptEntry,updateCompatibilityToolCallTranscriptEntry,aggregateCompatibilityAssistantChunk,aggregateCompatibilityUserChunk,appendCompatibilityEntry,replaceCompatibilityEntry.ISessionStateReader; remove calls to streaming-specific handlers.Written for commit 79c0dee. Summary will update on new commits. Review in cubic