Repository navigation
Conversation
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
Implements Block B (Read Contracts, Pagination & Eliminating N+1):
API (
apps/api)GET /api/recordings:PagedResponse<T>(Items, Page, PageSize, TotalCount, HasMore)andRecordingSummaryResponse(excludingTranscribedTextandEditedTextfrom list projections).page(default1, clamped>= 1),pageSize(default20, clamped1..100),status(case-insensitiveRecordingStatus,400if invalid non-empty), andq(case-insensitive substring match onTitleorFileName).CreatedAt DESC, Id DESCand projected summary fields in SQL.RecordingResponse(withTranscribedTextandEditedText) onGET /api/recordings/{id}.GET /api/outputs:GetOutputsmapped toGET /api/outputswith optionalpage,pageSize, andformat(blog | interview | notes | news,400if invalid).RefinementJobsjoined withRecordingswhereTranscriptRevision == Recording.TranscriptRevisionandStatus == Completed, ordered byCreatedAt DESC, Id DESC.HasActiveJobsfor current-revision jobs inCreatedorProcessingstatus.OutputsPageResponse(Items, Page, PageSize, TotalCount, HasMore, HasActiveJobs)withOutputSummaryResponse(including precomputedWordCount).apps/api/Echo.API.Tests):ReadContractsTestscovering recordings pagination, clamping, deterministic ordering, status/qfiltering, slim payload verification, andGET /api/outputsrevision filtering, pagination, format validation, andhasActiveJobstracking.StorageKeyMigrationTests.Disposefor reliable file cleanup on Windows.Web (
apps/web)src/api/recordings.ts(RecordingSummary,PagedResponse<T>,getRecordings(params?)) andsrc/api/refinements.ts(OutputSummary,OutputsPageResponse,getOutputs(params?)).src/lib/recording-query.ts,src/components/Layout.tsx,src/components/RecordingCard.tsx, andsrc/routes/index.tsxto use server-side pagination, status/search filtering, andtotalCount/itemscleanly.useQueriesloop insrc/routes/outputs.tsxwith a singleuseQuerycallinggetOutputs({ page: page + 1, pageSize: 20 }), polling every1000msonly whendata?.hasActiveJobsistrue, and wiring server-side pagination controls.['outputs']cache on recording deletion, transcript save, and refinement creation.e2e/workflow.spec.ts,e2e/redesign.spec.ts) for the new paged/api/recordingsand/api/outputscontracts.test/read-contracts.test.ts.Verification
dotnet test apps/api/Echo.slnx— 19/19 passedpnpm --dir apps/web install --frozen-lockfile— succeededpnpm --dir apps/web lint— passedpnpm --dir apps/web test— 3 test files, 6/6 tests passedpnpm --dir apps/web build—tsc -b && vite buildsucceeded