Skip to content

feat: redirect plugin#1

Open
ahaasco wants to merge 5 commits intomasterfrom
feat/redirect-plugin
Open

feat: redirect plugin#1
ahaasco wants to merge 5 commits intomasterfrom
feat/redirect-plugin

Conversation

@ahaasco
Copy link
Owner

@ahaasco ahaasco commented Feb 1, 2026

Summary

  • Fix hit count tracking with UNIQUE index for ON CONFLICT support
  • Add sourcePlugin field to track redirects created by external plugins
  • Display sourcePlugin as amber badge in redirect list view

Test plan

  • Verify redirect middleware intercepts and redirects correctly
  • Confirm hit counts increment on redirect usage
  • Test sourcePlugin badge displays correctly in list view
  • Create redirect with sourcePlugin via service and verify display

🤖 Generated with Claude Code

Andrew Haas and others added 5 commits February 1, 2026 11:04
- Change redirect_analytics index to UNIQUE (required for ON CONFLICT)
- Remove noisy console.error for admin route skipping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add source_plugin column to track which plugin created the redirect
- NULL = created via admin UI, otherwise contains plugin ID (e.g., 'qr-code')
- Add filter support for sourcePlugin in list() and count()
- Include sourcePlugin in CREATE, getById, and list queries
- Create migration 035 with index for filtering

This allows other plugins (like QR code generator) to mark redirects
they create for identification and filtering.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add amber-colored badge next to source URL when sourcePlugin is set
- Shows which plugin created the redirect (e.g., 'qr-code')
- Badge only appears when sourcePlugin is not null
- Add data-sourceplugin attribute for client-side filtering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename matchType PARTIAL to WILDCARD for Cloudflare alignment
- Add Cloudflare-aligned fields: preserveQueryString, includeSubdomains,
  subpathMatching, preservePathSuffix
- Add CloudflareBulkService for syncing redirects to Cloudflare edge
- Add autoOffloadEnabled plugin setting for auto-sync
- Update CSV import/export with new column names
- Remove custom settings page (use standard plugin settings instead)
- Change plugin author to ahaas

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add deleted_at column to redirects table
- Change delete() to set timestamp instead of hard delete
- Filter out soft-deleted records in all queries (list, count, getById, etc.)
- Update middleware cache warming to exclude deleted redirects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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