Skip to content

Add tag alias resync workflow and status API - #142

Merged
BenHall-1 merged 5 commits into
masterfrom
resync-command-aliases
Sep 20, 2026
Merged

BenHall-1 merged 5 commits into
masterfrom
resync-command-aliases

Conversation

@biast12

@biast12 biast12 commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Introduces a full tag-alias reconciliation flow: new backend resync/status endpoints, background processing with Redis lock/progress/cooldown tracking, Discord error handling, and audit logging for alias resync runs. It also extracts shared alias command/planning/storage logic into a new internal tagalias package and reuses it from tag creation and admin command recreation.

On the frontend, adds API bindings and a tags-page UI action to start resyncs, poll progress, surface cooldown/conflict responses, and show completion/warning/error toasts, plus new TagAliasResyncStatus typing and audit label support.

NEEDS: TicketsBot-cloud/database#42

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

Add a good handful of command aliases not via the dashboard (for an example manually via the database)
These commands will be out of sync, now please click the button and see the commands the resynced to discord, this will work the other way too

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Introduces a full tag-alias reconciliation flow: new backend resync/status endpoints, background processing with Redis lock/progress/cooldown tracking, Discord error handling, and audit logging for alias resync runs. It also extracts shared alias command/planning/storage logic into a new internal `tagalias` package and reuses it from tag creation and admin command recreation.

On the frontend, adds API bindings and a tags-page UI action to start resyncs, poll progress, surface cooldown/conflict responses, and show completion/warning/error toasts, plus new `TagAliasResyncStatus` typing and audit label support.
@biast12
biast12 requested a review from a team as a code owner September 5, 2026 23:04
@github-actions github-actions Bot added type:bug Bug Fixes needs:bump_db PR references database repo changes labels Sep 5, 2026
@BenHall-1

Copy link
Copy Markdown
Member

@biast12 DB ready for bump

@biast12

biast12 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@BenHall-1 bumped!!

@github-actions github-actions Bot added the type:feature New Feature label Sep 10, 2026
DeleteTag treated any DeleteGuildCommand failure as fatal, so a tag whose
application_command_id no longer resolves returned 500 and its row was never
reached, leaving it undeletable. Reuse discordError to let a 404 fall through.

Also convert the tags package to AbortWithError so the cause survives, move the
5xx report into ErrorHandler keyed on the route, and drop the access log to
Warn. 503 is exempt: every one is a feature flag, and its message was being
overwritten and filed as a crash.
@BenHall-1 BenHall-1 removed the needs:bump_db PR references database repo changes label Sep 11, 2026
Removes the temporary hardcoded `auditActionTagAliasResync` value and switches `ResyncTagAliases` to use `dbmodel.AuditActionTagAliasResync` directly. This aligns the endpoint with the canonical audit action enum now available in `dbmodel` and avoids relying on a magic number.
@github-actions github-actions Bot added the needs:bump_db PR references database repo changes label Sep 12, 2026
@BenHall-1
BenHall-1 merged commit 9c688e7 into master Sep 20, 2026
2 checks passed
@BenHall-1
BenHall-1 deleted the resync-command-aliases branch September 20, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:bump_db PR references database repo changes type:bug Bug Fixes type:feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants