A simple tool which lets you scrape twitter accounts and crosspost them to bluesky accounts! Comes with a CLI and a webapp for managing profiles! Works with images/videos/link embeds/threads.

fix: restore backfill actions after clear queue

jack e973127b f349fd21

+19 -20
+11 -11
src/server.ts
··· 812 812 res.json({ success: true, message: 'Check triggered' }); 813 813 }); 814 814 815 + app.post('/api/backfill/clear-all', authenticateToken, requireAdmin, (_req, res) => { 816 + pendingBackfills = []; 817 + updateAppStatus({ 818 + state: 'idle', 819 + message: 'All backfills cleared', 820 + backfillMappingId: undefined, 821 + backfillRequestId: undefined, 822 + }); 823 + res.json({ success: true, message: 'All backfills cleared' }); 824 + }); 825 + 815 826 app.post('/api/backfill/:id', authenticateToken, requireAdmin, (req, res) => { 816 827 const { id } = req.params; 817 828 const { limit } = req.body; ··· 848 859 const { id } = req.params; 849 860 pendingBackfills = pendingBackfills.filter((bid) => bid.id !== id); 850 861 res.json({ success: true }); 851 - }); 852 - 853 - app.post('/api/backfill/clear-all', authenticateToken, requireAdmin, (_req, res) => { 854 - pendingBackfills = []; 855 - updateAppStatus({ 856 - state: 'idle', 857 - message: 'All backfills cleared', 858 - backfillMappingId: undefined, 859 - backfillRequestId: undefined, 860 - }); 861 - res.json({ success: true, message: 'All backfills cleared' }); 862 862 }); 863 863 864 864 // --- Config Management Routes ---
+8 -9
web/src/App.tsx
··· 240 240 const ADD_ACCOUNT_STEP_COUNT = 4; 241 241 const ADD_ACCOUNT_STEPS = ['Owner', 'Sources', 'Bluesky', 'Confirm'] as const; 242 242 const ACCOUNT_SEARCH_MIN_SCORE = 22; 243 + const DEFAULT_BACKFILL_LIMIT = 15; 243 244 244 245 const selectClassName = 245 246 'flex h-10 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2'; ··· 1378 1379 return; 1379 1380 } 1380 1381 } 1381 - 1382 - const limitInput = window.prompt(`How many tweets should be backfilled for this account?`, '15'); 1383 - if (limitInput === null) { 1384 - return; 1385 - } 1386 - 1387 - const limit = Number.parseInt(limitInput, 10); 1388 - const safeLimit = Number.isFinite(limit) && limit > 0 ? limit : 15; 1382 + const safeLimit = DEFAULT_BACKFILL_LIMIT; 1389 1383 1390 1384 try { 1391 1385 if (mode === 'reset') { ··· 1393 1387 } 1394 1388 1395 1389 await axios.post(`/api/backfill/${mappingId}`, { limit: safeLimit }, { headers: authHeaders }); 1396 - showNotice('success', mode === 'reset' ? 'Cache reset and backfill queued.' : 'Backfill queued.'); 1390 + showNotice( 1391 + 'success', 1392 + mode === 'reset' 1393 + ? `Cache reset and backfill queued (${safeLimit} tweets).` 1394 + : `Backfill queued (${safeLimit} tweets).`, 1395 + ); 1397 1396 await fetchStatus(); 1398 1397 } catch (error) { 1399 1398 handleAuthFailure(error, 'Failed to queue backfill.');