Skip to content

feat(dashboard): add usage capability display and account usage hooks#3

Draft
eliteprox wants to merge 10 commits into
mainfrom
feat/pymthouse-integration
Draft

feat(dashboard): add usage capability display and account usage hooks#3
eliteprox wants to merge 10 commits into
mainfrom
feat/pymthouse-integration

Conversation

@eliteprox

Copy link
Copy Markdown
Collaborator
  • Implemented usage-capability-display.ts for displaying account usage capabilities with color coding and data distribution.
  • Created useAccountUsage.ts hook to manage account usage state and fetch usage data.
  • Added useApiKeys.ts for managing API keys with create and revoke functionality.
  • Introduced useDiscoveryModel.ts and useExploreModels.ts for fetching and managing discovery models.
  • Developed useSigningSession.ts for handling signing sessions and token management.
  • Added discovery client functions in client.ts for fetching capabilities and models.
  • Created configuration and constants files for discovery service.
  • Implemented mapping functions for transforming discovery capabilities to models.
  • Defined types for discovery service API responses.
  • Updated package dependencies and added type definitions for jmuxer and mux.js.

- Implemented `usage-capability-display.ts` for displaying account usage capabilities with color coding and data distribution.
- Created `useAccountUsage.ts` hook to manage account usage state and fetch usage data.
- Added `useApiKeys.ts` for managing API keys with create and revoke functionality.
- Introduced `useDiscoveryModel.ts` and `useExploreModels.ts` for fetching and managing discovery models.
- Developed `useSigningSession.ts` for handling signing sessions and token management.
- Added discovery client functions in `client.ts` for fetching capabilities and models.
- Created configuration and constants files for discovery service.
- Implemented mapping functions for transforming discovery capabilities to models.
- Defined types for discovery service API responses.
- Updated package dependencies and added type definitions for jmuxer and mux.js.
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment Jun 16, 2026 9:04pm

Request Review

…a visualization

- Updated StackedAreaChart to support Y-axis ticks, horizontal grid lines, and per-day hover tooltips.
- Integrated dayKeys prop for better date handling in the chart.
- Modified UsageView to utilize new daily data structure, including dynamic period day count and improved data fetching.
- Added utility functions for generating UTC date keys and aligning daily request series with OpenMeter data.
- Introduced tests for new utility functions to ensure correctness in date handling and data alignment.
- Changed dependency from local link to versioned package for @pymthouse/builder-sdk in package.json and pnpm-lock.yaml.
- Updated lock file to reflect the new version and its peer dependencies.
- Added new environment variable `GATEWAY_SIGNER_FROM_REQUEST_ORIGIN` to control signer URL behavior.
- Implemented API route rewrites for orchestrator info, discovery, and payment generation to use the dashboard's signer proxy.
- Refactored session handling in the API to read configuration from the request context.
- Introduced a new signer proxy handler to forward requests based on allowed paths.
- Updated the LiveStreamPlayground component to optimize sleep intervals for better performance.
- Adjusted gateway configuration functions to support request-based signer URL resolution.
…up related code

- Deleted unused gateway session API routes and related handlers to streamline the codebase.
- Removed references to the LiveStreamPlayground component and associated gateway checks from the playground tab.
- Cleaned up environment variables in `.env.example` by removing obsolete gateway configurations.
- Updated the `next.config.ts` to eliminate unnecessary rewrites related to the gateway.
- Enhanced the API key exchange configuration to include audience requirements for improved security.
- Refactored the CodeSnippets component to simplify snippet generation without gateway dependencies.
- Eliminated the audience parameter from the API key exchange configuration in both exchange routes to simplify the code and avoid reliance on deprecated functionality.
- Updated the fetchAccountUsageForExternalUser function to include the `includeRetail` parameter for both current and prior usage data requests, enhancing the data retrieval capabilities for external users.
- Changed dependency from local link to versioned package for @pymthouse/builder-sdk in package.json and pnpm-lock.yaml.
- Updated lock file to reflect the new version and its peer dependencies.
- Added `dynamic` export to force dynamic rendering for live data.
- Implemented `NO_STORE_HEADERS` to prevent caching of account usage responses, ensuring users always receive the latest data.
- Updated the `GET` method to include these headers in both successful and error responses.
- Modified the `useAccountUsage` hook to fetch account usage data with `cache: "no-store"` to align with the new caching strategy.
- Updated dependency for @pymthouse/builder-sdk in package.json and pnpm-lock.yaml to the latest version 0.4.3.
- Adjusted lock file to reflect the new version and its integrity hash.
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