Skip to content

Commit 78863d4

Browse files
arc0btcwhoabuddyclaude
authored
sync: merge upstream whoabuddy/worker-logs (#16)
* feat: allow admin key to delete apps Previously DELETE /apps/:id required the app's own API key. Now admins can also delete apps using the X-Admin-Key header, consistent with other admin operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(dashboard): overhaul with unified view and advanced filtering (#3) - Add unified overview page showing all apps with error trends and health status - Add enhanced app detail page with 7-day stats chart (Chart.js) - Add advanced filtering: date range picker, request ID, context field filters - Add server-side search and context filtering to Durable Object - Modularize dashboard into separate files for maintainability - Integrate Alpine.js for declarative client-side state management - Add SVG sparklines and trend indicators for quick status overview New file structure: src/dashboard/ index.ts - Main router auth.ts - Session management styles.ts - Shared styles types.ts - Dashboard types pages/ - Login, overview, app-detail api/ - Overview aggregation endpoint components/ - Layout, charts utilities Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * chore: remove deprecated dashboard.ts Replaced by modular src/dashboard/ directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: code simplifier pass 1 - remove dead code and consolidate utilities (#4) * refactor: remove dead code and extract shared utilities - Delete unused src/services/stats.ts (legacy KV-based stats, replaced by DO SQLite) - Extract getAppDO and countByLevel to src/utils.ts - countByLevel now uses Map for O(n) instead of O(n²) array scanning Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: consolidate duplicated code and remove unused functions Dashboard: - Extract getAppList, getAppName, getHealthUrls to shared helpers.ts - Fix type safety: replace `any` with proper Context type Result utilities: - Add wrapError() for consistent error handling in catch blocks - Remove unused exports: isOk, isErr, getErrorStatus, ErrorStatusMap Registry service: - Use wrapError() instead of inline error handling (6 occurrences) - Remove unused validateApiKey and regenerateApiKey functions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: remove unused dashboard code - Remove unused loadingSpinner component from layout.ts - Remove unused appOptions variable from header function - Remove unused types: SavedFilter, FilterState, HealthSummary - Remove unused HealthCheck import from types.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * feat(dashboard): make branding configurable via env vars (#7) Add BrandConfig type and getBrandConfig() that reads BRAND_* environment variables with automatic accent color derivation and CDN URL composition. Replace static CSS with buildBrandCss(config) generated from BrandConfig. Thread brand config through router middleware and all page functions. Includes comprehensive tests for brand config defaults, env overrides, hex color validation, and accent fallback behavior. Cherry-picked from #10 with conflict resolution to preserve upstream wrangler.jsonc (no fork-specific environments). Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix(auth): allow admin key for health-urls endpoint The health-urls endpoint only accepted per-app API keys, preventing admin users from configuring health check URLs. Switch to requireApiKeyOrAdmin middleware to match the pattern used by other app management endpoints. Ported from #11. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Jason Schrader <whoabuddy@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cd57bc1 commit 78863d4

0 file changed

File tree

    0 commit comments

    Comments
     (0)