A Bluesky Archival Tool
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: change delete swap from 'delete' to 'outerHTML' to avoid CSS selector issues

The export IDs contain special characters (colons and slashes from DIDs)
that are invalid in CSS selectors. Changed from:
- hx-target="#export-{{.ID}}" with hx-swap="delete"

To:
- hx-target="closest tr" with hx-swap="outerHTML"

This avoids the querySelectorAll syntax error while still properly
removing the table row when the delete succeeds.

Fixes: SyntaxError: '#export-did:plc:...' is not a valid selector

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+4 -4
+2 -2
internal/web/handlers/export.go
··· 559 559 h.logger.Printf("Delete completed: user=%s export=%s", 560 560 session.DID, exportID) 561 561 562 - // Return 200 OK with empty body for HTMX delete swap 563 - // The hx-swap="delete" will remove the target element on 2xx response 562 + // Return 200 OK with empty body for HTMX outerHTML swap 563 + // The hx-swap="outerHTML" with empty response will remove the target element 564 564 w.WriteHeader(http.StatusOK) 565 565 w.Write([]byte{}) 566 566 }
+2 -2
internal/web/templates/pages/export.html
··· 162 162 style="margin: 0;" 163 163 hx-delete="/export/delete/{{.ID}}" 164 164 hx-confirm="Are you sure you want to delete this export? This action cannot be undone." 165 - hx-target="#export-{{.ID}}" 166 - hx-swap="delete" 165 + hx-target="closest tr" 166 + hx-swap="outerHTML" 167 167 hx-headers='{"X-CSRF-Token": "{{$.CSRFToken}}"}'> 168 168 Delete 169 169 </button>