Skip to content

feat: Add Retry Failed button - #14

Open
dylanmtaylor wants to merge 1 commit into
digisamroc:mainfrom
dylanmtaylor:feature-retry-failed
Open

feat: Add Retry Failed button#14
dylanmtaylor wants to merge 1 commit into
digisamroc:mainfrom
dylanmtaylor:feature-retry-failed

Conversation

@dylanmtaylor

Copy link
Copy Markdown

Adds a button to retry failed brokers.

JustMaris added a commit to drumandbytes/eraser that referenced this pull request Aug 21, 2026
Broker data corrections (not previously applied in this fork):
- atlantic-fox-technologies: clear stale contact (upstream PR digisamroc#7)
- xactus: update to current DSR contact doria.sutton@xactus.com (upstream PR digisamroc#9)
- adadapted: clear stale billing contact (upstream issue digisamroc#12)

Security/reliability fixes found during the review:
- browser.go: tighten screenshot file/dir permissions to 0600/0700
  (screenshots can capture personal data mid-form-fill)
- job.go: fix data races on Job fields via GetStatus/finishedBefore/Pause,
  wire the previously-dead Cleanup() into an hourly ticker
- server.go: unify daily-send-limit logic with the CLI (removed leftover
  SendGrid/Resend-era hardcoded limits), tighten CSP (drop CDN script-src,
  add object-src 'none'), stop discarding AddBrokerResponse/
  UpdateBrokerResponseClassification/UpdateBrokerResponseBody errors -
  this silent failure is why the web UI's "Scan Complete!" summary could
  report matches while the Pipeline page stayed empty (upstream issue digisamroc#17,
  same root cause as the email_body column bug already fixed for issue digisamroc#3)
- main.go: same fix for the monitor --watch callback
- monitor.go: fix goroutine leak on ctx.Done() by draining idleDone
- layout.html + static/js/tailwind-jit.js: self-host Tailwind/HTMX instead
  of loading from live CDNs (the file was mislabeled tailwind.min.css but
  is actually the Tailwind JIT compiler's JS - renamed accordingly)

Dead code removed (confirmed zero-caller via deadcode + manual grep):
broker.LoadFromDir, several unused browser/chromedp wrappers, unused
inbox classifier/monitor/parser helpers, template.AvailableTemplates,
web.SessionStore.Count

New regression tests: sender_test.go (SMTP header injection, upstream
issue digisamroc#6, already fixed - test just locks it in), history_test.go
(email_body column round-trip, upstream issue digisamroc#3)

Reviewed but intentionally not applied:
- upstream PR digisamroc#8 (Andrews Wharton -> Stirista) would create a duplicate
  broker entry; andrews-wharton is already cleared/redirected and a
  correct standalone stirista entry already exists
- upstream PR digisamroc#14 (Retry Failed button), PR digisamroc#15 (multi-profile support),
  issue digisamroc#21 (multi-email/multi-sender support) are real feature requests
  but need a design decision before implementing
- issue digisamroc#16 (middle name) is already covered by the existing
  profile.name_variants config field
JustMaris added a commit to drumandbytes/eraser that referenced this pull request Aug 21, 2026
…g fixes

New functionality:
- Retry Failed button on brokers.html, using the status=failed filter the
  backend already supported (upstream issue/PR digisamroc#14 equivalent)
- Missing-email filter + "No email on file" indicator on the brokers page,
  matching the CLI's list-brokers --missing-email; disables the per-row
  Send button for those brokers instead of letting it fail confusingly
- Settings > Danger Zone > "Clear All History" now actually works
  (DeleteAllHistory + DELETE /api/history); "Reset Configuration" removed
  since it rendered as a live button with no handler - a real reset needs
  its own design (backup? re-run setup?) rather than a silent no-op

Bug fixes found during a full web-UI-vs-CLI audit:
- The web UI (both single-broker Send and bulk Send-to-All/job processing)
  hardcoded template "generic" instead of the user's configured template -
  every web-sent email cited generic privacy law instead of GDPR Article 17
  regardless of config.yaml. Fixed both call sites. Also changed the fork's
  default (CLI init prompt, web setup wizard, config.Load fallback) from
  generic to gdpr, since this fork exists specifically for GDPR use.
- task-helper.html (the CAPTCHA-task action page) hand-wrote a CSRF hidden
  input under the wrong field name (csrf_token instead of the
  gorilla/csrf-expected gorilla.csrf.Token), so "Mark Complete"/"Skip"
  silently 403'd on every click. Fixed to use the shared {{.CSRFField}}.
- Bulk-send's "no brokers matched" error always said "No pending brokers"
  even when retrying failed ones - now filter-aware.
- Removed dead code found during the audit: top-level templates/setup.html
  and forms.html (both unreferenced, superseded by setup/welcome.html and
  tasks.html), partials/history-list.html + partials/task-list.html and
  their handlers, plus three more JSON API endpoints (/api/stats,
  /api/pipeline/stats, /api/pipeline/tasks) that no template ever called -
  dashboard/pipeline stats render server-side directly instead.
- Fixed a stale "Consider using Resend" suggestion in the send-failure
  banner (Resend was removed as a provider earlier this session).

Documented in CLAUDE.md: the gdpr-default quirk, the CSRF field-name
gotcha, and that internal/web/templates/partials/*.html are NOT invokable
as named sub-templates from page templates (they lack {{define}} wrappers,
so e.g. brokers.html's inline table and partials/broker-list.html are
hand-duplicated markup) - flagged as a real audit finding, not yet fixed,
since fixing the template loader is a larger, separate change.
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