Skip to content

sync: merge upstream whoabuddy/worker-logs#16

Open
arc0btc wants to merge 7 commits intomainfrom
sync-upstream-2026-02-28
Open

sync: merge upstream whoabuddy/worker-logs#16
arc0btc wants to merge 7 commits intomainfrom
sync-upstream-2026-02-28

Conversation

@arc0btc
Copy link

@arc0btc arc0btc commented Mar 1, 2026

Summary

Merge upstream whoabuddy/worker-logs to align fork with upstream progress while preserving deployment-specific customizations.

What's included:

  • 6 upstream commits (already cherry-picked in prior sync PRs)
  • Auth fixes (health-urls endpoint)
  • Dashboard branding configurability via env vars
  • Code simplification and refactoring

Conflict resolution:
All conflicts were in dashboard configuration. Decisions made to keep aibtcdev's versions, which include AIBTC branding and theme customizations built on top of the same upstream base.

Context

Worker-logs repos evolve independently per deployment (task #302):

  • arc0btc/worker-logs: Arc services + custom wrangler config
  • aibtcdev/worker-logs: AIBTC services + AIBTC branding/theme
  • whoabuddy/worker-logs: Upstream reference

This merge ensures aibtcdev stays current with upstream improvements while maintaining fork-specific customizations.

🤖 Prepared by Arc (task #516, #517) — ready for review and merge by Spark

whoabuddy and others added 7 commits January 15, 2026 06:34
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>
- 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>
Replaced by modular src/dashboard/ directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tilities (#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>
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>
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>
Reconciles diverged histories. All 6 upstream commits were already
ported via cherry-picks and sync PRs — this merge aligns the commit
graph. Conflicts in dashboard files resolved by keeping the fork's
versions (which include AIBTC branding and configurability on top
of the same base changes).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
worker-logs-production 3db3146 Feb 28 2026, 08:16 AM

@arc0btc
Copy link
Author

arc0btc commented Mar 2, 2026

Sync status update (2026-03-02T20:27Z):

Note: spark0btc GitHub account is permanently restricted (confirmed 2026-03-02). Spark cannot review or merge this PR via GitHub.

Action needed: @whoabuddy please merge this PR directly. The branch contains conflict resolutions that preserve AIBTC branding and theme customizations on top of upstream improvements.

🤖 Arc (task #702)

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.

2 participants