← All projects

Sift for Gmail

A Chrome extension that sorts and groups your Gmail inbox by sender, which Gmail still can't do.

Sift for Gmail landing page
The landing page.

The short version

unit tests
89
ways to sort
5
servers, accounts or analytics
0
current release
1.3.3

What it is

Gmail still can't sort your inbox by sender. Sift adds that, plus sorting by subject, date, label or unread, collapsible groups by sender with a count badge and quick-filter chips for the noisiest labels.

It reorders what Gmail has already drawn, inside your browser, and sends nothing anywhere. One more click cycles back to the original order, so you can always get back to Gmail's own view.

What I had to steer

Gmail's markup changes without notice, so I insisted on layered fallback selectors at every touch point and a visible message when they all fail. I'd rather it said it was broken than showed a button that silently does nothing.

The other steer was honesty with the store. The listing, permission explanations and privacy policy say exactly what the code does, and version 1.3.3 dropped a permission it didn't need.

What I wired together

Manifest V3 and vanilla JavaScript with no build step and no runtime dependencies. Scoped MutationObservers, chrome.storage.local for per-view memory, and theme detection that reads Gmail's own dark mode rather than the operating system's. Vitest and jsdom for the core, GitHub Actions for CI and a Vercel landing page with its own privacy policy.

Where I pushed it

I took a hacker extension to the point where a stranger could trust it: 89 tests, a store listing written to match the code line for line and a rendering harness for the dark-mode bug.

What's left before submission is a full pass against live Gmail in both themes. A test fixture can prove the styling, but it can't prove Google hasn't changed the page.

Live site

See it live.

sift-for-gmail.vercel.app homepage
Sales site The landing page. The inbox in the hero is a mockup. The real extension runs inside Gmail.

The build log

Sorting Gmail by sender

Gmail still won’t let you sort the current inbox view by sender. I wanted a Chrome extension that adds the missing controls straight into Gmail, without turning into an inbox product or a privacy headache.

Sift is a Manifest V3 extension. It adds a small set of controls to Gmail, reads the visible rows and lets you sort by sender, subject, date or unread first. It groups messages from the same sender into collapsible rows, remembers the sort for each view and restores the original order when you’re done.

The hard part is Gmail’s markup, which changes without warning. Every interaction point has several fallback selectors, and the extension shows a visible message when it can’t safely act.

The next step was distribution: a Chrome Web Store listing, more testing against real Gmail accounts, and deciding whether it stays a hacker extension or gets polished enough for anyone to trust. The popup screenshot is the real UI in a demo state, because running it against a live inbox would mean showing someone’s actual email.

Getting store-ready

The group headers were unreadable in Gmail’s dark mode. Fixing it meant more than colours: Sift now reads Gmail’s own theme instead of trusting the operating system, because people run a dark Gmail on a light Mac and the other way round.

Two features came with it: label sort, and quick-filter chips for whatever is filling the inbox at that moment. The chips hand off to Gmail’s search scoped to the current view, so you get the whole inbox rather than only the rows on screen.

Paperwork

Version 1.3.3 removed a permission the extension didn’t need and rewrote the disclosure of what it processes locally. The store listing, permission justifications and privacy policy are written against the actual code. 89 unit tests run in CI on every push. The landing page moved to sift-for-gmail.vercel.app, and the old address still works.

The engineering’s done and store submission is in progress. The last job is a full manual pass in real Gmail in both themes, because a test fixture can prove the styling but can’t prove Google hasn’t changed its markup this week.