This repository has no description
JavaScript 77%
CSS 16%
HTML 7%

README.md

Thunderstruck — Mailbox Analytics for Thunderbird #

A Thunderbird MailExtension that lets you pick any mailbox (folder) and instantly see:

  • Unread messages per month — bucketed by calendar month, sorted chronologically, and drawn as a bar chart.
  • Senders by frequency — every sender in the mailbox ranked by how many messages they sent, with their unread count alongside. Senders with a single message are collapsed behind a toggle to keep the list scannable.
  • Threads by size — messages grouped by (normalised) subject, largest conversations first.

It also shows summary cards for total messages, total unread, and the number of unique senders.

Click any month (bar or table row), sender name, or thread to open an in-page reader listing exactly those messages, grouped into threads. Skim message bodies with the keyboard and triage without leaving the report:

  • ↑/↓ (or j/k) — move between rows
  • ←/→ — collapse/expand the selected thread
  • Del/Backspace — move to Trash
  • A — archive
  • M — move to another mailbox (a filterable folder list pops up)
  • Esc — close the reader (or the move popup)

When a thread header is selected, Del/A/M apply to the whole thread; when an individual message is selected they apply to just that message.

The chart and tables update live as you delete, archive, or move. Skimming a message does not mark it as read, so your unread counts stay meaningful. Threads are approximated from subjects (Thunderbird's message headers don't expose reply references without fetching each message in full).

The report stays in sync with the folder while it's open: new mail, moves, archiving, deletions, and read/unread changes made anywhere in Thunderbird are reflected in the stats and tables (and in the reader, if open) automatically.

How it works #

Click the ⚡ Mailbox Analytics toolbar button. A tab opens with a mailbox dropdown (every folder across every account). Pick one, hit Analyze, and the extension walks the folder's message headers to build the report. No data ever leaves Thunderbird — everything is computed locally, and there are no external runtime dependencies (the chart is drawn directly on a <canvas>).

Installing for development #

  1. Open Thunderbird.
  2. Go to Tools → Developer Tools → Debug Add-ons (or visit about:debugging → This Thunderbird).
  3. Click Load Temporary Add-on… and select the manifest.json file in this repository.
  4. The toolbar button appears in the main window. If you don't see it, you may need to add it from Toolbar customization.

Temporary add-ons are removed when Thunderbird restarts. To package it for distribution, zip the contents of this directory (the manifest.json must be at the root of the zip) and rename it to thunderstruck.xpi.

Permissions #

  • accountsRead — to enumerate accounts and folders for the picker.
  • messagesRead — to read message headers (author, date, read state) for the report, and message bodies on demand when you open one in the reader.
  • messagesMove — to archive a message from the reader (A).
  • messagesDelete — to move a message to Trash from the reader (Del).
  • tabs — to open the analytics page in a tab and reuse it instead of opening a new one on every click.

Notes & compatibility #

  • Targets Thunderbird 115+ (strict_min_version). It uses the stable accounts, folders, and messages APIs and paginates with messages.continueList, so very large mailboxes are handled without loading everything at once.
  • Senders are grouped by email address (case-insensitive) when one is present, so Robin <robin@x.com> and robin@x.com count as the same sender.