Skip to content

Conversation

@lane711
Copy link
Collaborator

@lane711 lane711 commented Jan 24, 2026

Summary

Changes

File Description
packages/core/src/app.ts Import cache plugin and register routes at /admin/cache
packages/core/src/__tests__/routes/admin-cache.test.ts Add 27 unit tests for cache API endpoints
tests/e2e/43-cache-plugin.spec.ts Add comprehensive e2e tests for cache dashboard

Root Cause

The cache plugin was fully implemented with:

  • Dashboard UI template
  • All API endpoints (stats, clear, invalidate, health, browser, analytics)
  • Navigation menu item in admin sidebar

But the routes were never registered in app.ts, causing all /admin/cache/* endpoints to return 404.

Testing

  • 27 unit tests pass for cache route endpoints
  • E2e tests cover dashboard navigation and API functionality
  • All existing unit tests pass (810 tests)

Checklist

  • Code follows project conventions
  • No new TypeScript errors introduced
  • Tests added for new functionality

🤖 Generated with Claude Code

The cache plugin was fully implemented but its routes were never
registered in the main application, causing 404 errors when users
tried to access /admin/cache.

Changes:
- Import cache plugin in app.ts and register routes at /admin/cache
- Move cache dashboard template from @sonicjs-cms/templates to core
  package to avoid circular dependency during build
- Update routes.ts to use relative import for the template
- Add 27 unit tests for cache route endpoints
- Add comprehensive e2e tests for cache dashboard

This fixes GitHub Issue #461 where users reported:
- Unable to find clear cache button in admin UI
- Cache API endpoints returning 404

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lane711 lane711 force-pushed the fix/issue-461-cache-routes branch from d19d599 to fa8fc6e Compare January 24, 2026 01:44
@lane711 lane711 merged commit 236176d into main Jan 24, 2026
2 checks passed
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