Merged
Conversation
danias
requested changes
Mar 31, 2026
Member
danias
left a comment
There was a problem hiding this comment.
Use the /devql/global API and add the reverse pagination you requested
There was a problem hiding this comment.
Pull request overview
Refactors the dashboard data layer to use dedicated GraphQL operations for branches/options/commits (with cursor pagination tracked in a Zustand slice), while keeping checkpoint detail loading on existing REST endpoints. Also migrates the REST OpenAPI-generated client under src/api/rest and updates Query Explorer to use the shared GraphQL client and SDL-based schema loading.
Changes:
- Add a shared GraphQL client (
/devql,/devql/sdl) and switch Query Explorer networking + error handling to it. - Refactor dashboard fetching to GraphQL operations + mappers, and introduce Zustand pagination state.
- Move OpenAPI-generated REST client from
src/api/types/schematosrc/api/rest/types/schemaand update imports/tests accordingly.
Reviewed changes
Copilot reviewed 75 out of 76 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Adds Vite dev proxy for /devql GraphQL endpoint. |
| tsconfig.app.json | Updates TS project references/excludes for the relocated REST schema project. |
| tests/integration/dashboard.test.tsx | Updates REST type import and adds new commit pagination props to DashboardView test setup. |
| src/store/slices/dashboard.ts | Adds Zustand slice for dashboard commit cursor stack pagination. |
| src/store/index.ts | Composes dashboard slice into the root Zustand store. |
| src/features/query-explorer/run-query.ts | Switches query explorer error handling from REST ApiError to GraphQLRequestError. |
| src/features/query-explorer/run-query.test.ts | Updates tests to assert behavior with GraphQLRequestError. |
| src/features/query-explorer/query-client.ts | Replaces REST /api/query* calls with the shared GraphQL client + SDL mapping. |
| src/features/query-explorer/query-client.test.ts | Mocks shared GraphQL client and updates expectations. |
| src/features/query-explorer/graphql/types.ts | Introduces QueryApiResponse as a GraphQLResponseEnvelope. |
| src/features/query-explorer/graphql/operations.ts | Documents that query explorer uses arbitrary runtime GraphQL documents. |
| src/features/query-explorer/graphql/mappers.ts | Adds SDL → DevQLSchema mapper for autocomplete schema. |
| src/features/dashboard/utils.ts | Updates REST type import path and adds ISO date helpers used by GraphQL queries. |
| src/features/dashboard/utils.test.ts | Updates REST type import path for tests. |
| src/features/dashboard/use-dashboard-data.ts | Refactors dashboard data loading to GraphQL (branches/options/commits) + cursor pagination and keeps checkpoint detail via REST. |
| src/features/dashboard/use-dashboard-data.test.ts | Updates hook tests to mock GraphQL operations and pagination behavior. |
| src/features/dashboard/graphql/types.ts | Adds typed shapes for dashboard GraphQL query payloads and variables. |
| src/features/dashboard/graphql/operations.ts | Adds dashboard GraphQL operation strings and repo name constant. |
| src/features/dashboard/graphql/mappers.ts | Adds GraphQL → existing DTO mapping and filter logic. |
| src/features/dashboard/graphql/mappers.test.ts | Adds unit tests for new dashboard GraphQL mappers. |
| src/features/dashboard/graphql/fetch-dashboard-data.ts | Adds fetchers for dashboard GraphQL operations (commits/options) with error handling. |
| src/features/dashboard/graphql/fetch-dashboard-data.test.ts | Adds unit tests for dashboard GraphQL fetchers. |
| src/features/dashboard/dashboard-view.tsx | Adds commit pagination controls (Prev/Next) and updates REST type import. |
| src/features/dashboard/components/token-usage-chart.tsx | Updates REST type import path. |
| src/features/dashboard/components/checkpoint-sheet.tsx | Updates REST type import path. |
| src/api/types/schema/services/DefaultService.ts | Removes old OpenAPI-generated REST service (migrated under src/api/rest). |
| src/api/types/schema/models/ApiTokenUsageDto.ts | Removes old generated model (migrated under src/api/rest). |
| src/api/types/schema/models/ApiKpisResponse.ts | Removes old generated model (migrated under src/api/rest). |
| src/api/types/schema/models/ApiCommitRowDto.ts | Removes old generated model (migrated under src/api/rest). |
| src/api/types/schema/models/ApiCheckpointSessionDetailDto.ts | Removes old generated model (migrated under src/api/rest). |
| src/api/types/schema/models/ApiCheckpointDto.ts | Removes old generated model (migrated under src/api/rest). |
| src/api/types/schema/models/ApiCheckpointDetailResponse.ts | Removes old generated model (migrated under src/api/rest). |
| src/api/types/schema/index.ts | Removes old generated barrel export (replaced by src/api/rest). |
| src/api/types/schema/core/request.ts | Removes old generated request implementation (migrated under src/api/rest). |
| src/api/types/schema/core/OpenAPI.ts | Removes old generated OpenAPI config (migrated under src/api/rest). |
| src/api/types/schema/core/FetchHttpRequest.ts | Removes old generated fetch request impl (migrated under src/api/rest). |
| src/api/types/schema/core/CancelablePromise.ts | Removes old generated cancelable promise (migrated under src/api/rest). |
| src/api/types/schema/core/BaseHttpRequest.ts | Removes old generated base request type (migrated under src/api/rest). |
| src/api/types/schema/core/ApiRequestOptions.ts | Removes old generated request options type (migrated under src/api/rest). |
| src/api/types/schema/core/ApiError.ts | Removes old generated error type (migrated under src/api/rest). |
| src/api/types/schema/BitloopsCli.ts | Removes old generated REST client entrypoint (migrated under src/api/rest). |
| src/api/rest/types/schema/tsconfig.json | Fixes relative extends/output paths after moving schema project. |
| src/api/rest/types/schema/services/DefaultService.ts | Adds generated REST service under new location. |
| src/api/rest/types/schema/models/ApiUserDto.ts | Reformats/updates generated model under new location. |
| src/api/rest/types/schema/models/ApiTokenUsageDto.ts | Adds generated model under new location. |
| src/api/rest/types/schema/models/ApiRootResponse.ts | Reformats/updates generated model under new location. |
| src/api/rest/types/schema/models/ApiKpisResponse.ts | Adds generated KPI model under new location. |
| src/api/rest/types/schema/models/ApiFileChangeStatsDto.ts | Reformats/updates generated model under new location. |
| src/api/rest/types/schema/models/ApiErrorEnvelope.ts | Reformats/updates generated model under new location. |
| src/api/rest/types/schema/models/ApiErrorBody.ts | Reformats/updates generated model under new location. |
| src/api/rest/types/schema/models/ApiCommitRowDto.ts | Adds generated commit-row model under new location. |
| src/api/rest/types/schema/models/ApiCommitDto.ts | Reformats/updates generated commit model under new location. |
| src/api/rest/types/schema/models/ApiCheckpointSessionDetailDto.ts | Adds generated checkpoint session detail model under new location. |
| src/api/rest/types/schema/models/ApiCheckpointDto.ts | Adds generated checkpoint model under new location. |
| src/api/rest/types/schema/models/ApiCheckpointDetailResponse.ts | Adds generated checkpoint detail model under new location. |
| src/api/rest/types/schema/models/ApiBranchSummaryDto.ts | Reformats/updates generated branch summary model under new location. |
| src/api/rest/types/schema/models/ApiAgentDto.ts | Reformats/updates generated agent model under new location. |
| src/api/rest/types/schema/index.ts | Adds new generated REST barrel export under new location. |
| src/api/rest/types/schema/core/request.ts | Adds generated core request implementation under new location. |
| src/api/rest/types/schema/core/OpenAPI.ts | Adds generated OpenAPI config under new location. |
| src/api/rest/types/schema/core/FetchHttpRequest.ts | Adds generated FetchHttpRequest under new location. |
| src/api/rest/types/schema/core/CancelablePromise.ts | Adds generated CancelablePromise under new location. |
| src/api/rest/types/schema/core/BaseHttpRequest.ts | Adds generated BaseHttpRequest under new location. |
| src/api/rest/types/schema/core/ApiResult.ts | Reformats/updates generated ApiResult type under new location. |
| src/api/rest/types/schema/core/ApiRequestOptions.ts | Adds generated request options type under new location. |
| src/api/rest/types/schema/core/ApiError.ts | Adds generated ApiError under new location. |
| src/api/rest/types/schema/BitloopsCli.ts | Adds generated REST client entrypoint under new location. |
| src/api/rest/index.ts | Adds convenient re-export entrypoint for REST client/types. |
| src/api/graphql/types.ts | Adds shared GraphQL envelope types and request options. |
| src/api/graphql/errors.ts | Adds GraphQLRequestError used by clients and callers. |
| src/api/graphql/client.ts | Implements shared GraphQL request client and SDL fetcher. |
| package.json | Bumps package version to 0.0.4. |
| e2e/query-explorer.spec.ts | Updates Playwright stubs/routes to /devql and /devql/sdl. |
| e2e/dashboard.spec.ts | Updates dashboard Playwright stubs to GraphQL operations and keeps checkpoint detail REST stub. |
| bundle_versions.json | Adds bundle metadata for version 0.0.4. |
| .gitignore | Ignores common local tool directories (.bitloops/, .cursor/, etc.). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
danias
approved these changes
Mar 31, 2026
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.
The dashboard now loads data through separate GraphQL operations, with state kept in a Zustand store. Checkpoint detail still uses REST endpoints as it isnt implemented yet.