-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Comparing changes
Open a pull request
base repository: coder/coder
base: main
head repository: coder/coder
compare: dean-tallyman-dashboard-endpoint
- 8 commits
- 15 files changed
- 1 contributor
Commits on Dec 11, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 7ee1daa - Browse repository at this point
Copy the full SHA 7ee1daaView commit details -
refactor(usage): move license selection logic into tallymansdk.New
- Move getBestLicenseJWT logic from publisher.go to tallymansdk.New() - Add NewOptions struct for tallymansdk client creation - Export ErrNoLicenseSupportsPublishing for reuse in other contexts - Simplify publisher.publishOnce by delegating license selection to SDK
Configuration menu - View commit details
-
Copy full SHA for 196c188 - Browse repository at this point
Copy the full SHA 196c188View commit details -
feat(enterprise): add embeddable dashboard endpoint
- Add POST /api/v2/licenses/usage/embeddable-dashboard endpoint - Requires license read permission (admin-only) - Returns 404 when no license supports usage publishing - Validates dashboard URL is from metronome.com domain - Converts codersdk types to tallymansdk types - Includes Swagger documentation for API - Auto-generated API docs and TypeScript types
Configuration menu - View commit details
-
Copy full SHA for 45fd5ac - Browse repository at this point
Copy the full SHA 45fd5acView commit details -
test(enterprise): add tests for embeddable dashboard endpoint
- Test no license scenario (returns 404) - Test license without PublishUsageData (returns 404) - Test unauthorized user access (returns 403) - Focus on authorization and license validation logic
Configuration menu - View commit details
-
Copy full SHA for f8ce104 - Browse repository at this point
Copy the full SHA f8ce104View commit details -
test(enterprise): improve embeddable dashboard endpoint tests
- Remove 3 empty lines between test cases - Make Tallyman URL configurable via enterprise/coderd.Options - Add TallymanURL field as pre-parsed *url.URL - Pass through to tallymansdk.New for testing - Add comprehensive tests with httptest fake server: - Success: validates happy path with proper auth headers - WithColorOverrides: validates color override pass-through - UntrustedHostRejected: validates security check for non-metronome.com domains - TallymanServerError: validates error handling from Tallyman - InvalidDashboardType: validates invalid dashboard type returns 400 - Add dashboard type validation in handler - Use tallymansdk structs instead of map[string]interface{} in tests - Use assert instead of require in HTTP handlers (safe for non-test goroutines) - Simplify httptest.NewServer calls by using HandlerFunc directly - Make codersdk dashboard type an enum (UsageEmbeddableDashboardType) - Add nolint comments for owner user usage (required for license access) Made by cmuxConfiguration menu - View commit details
-
Copy full SHA for 17d391f - Browse repository at this point
Copy the full SHA 17d391fView commit details -
- Add type relationship comments between codersdk and tallymansdk types - Move NewOptions type definition above New function in tallymansdk - Rename PublisherWithIngestURL to PublisherWithTallymanBaseURL - Change fakeServer to return *url.URL instead of string - Rename ingestURL to baseURL throughout tests - Add validation for Metronome color names in API - Use real Metronome color names in tests (Primary_medium, UsageLine_0, etc.) - Add test for invalid color name rejection
Configuration menu - View commit details
-
Copy full SHA for 5a11e60 - Browse repository at this point
Copy the full SHA 5a11e60View commit details -
refactor: move valid color overrides to tallymansdk package
- Create tallymansdk.TallymanValidColorOverrides global variable - Add documentation about Metronome color palette - Update API to use tallymansdk.TallymanValidColorOverrides - Remove local validColors map from licenses.go
Configuration menu - View commit details
-
Copy full SHA for 581064c - Browse repository at this point
Copy the full SHA 581064cView commit details -
Configuration menu - View commit details
-
Copy full SHA for cbdc098 - Browse repository at this point
Copy the full SHA cbdc098View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...dean-tallyman-dashboard-endpoint