Skip to content

Repo tidy-up: lint, tests, CI, README, remove unused Outlook code - #1

Merged
ravimehra9911 merged 3 commits into
mainfrom
claude/beautiful-albattani-ba962f
Oct 20, 2026
Merged

ravimehra9911 merged 3 commits into
mainfrom
claude/beautiful-albattani-ba962f

Conversation

@ravimehra9911

Copy link
Copy Markdown
Owner

Makes the repo easier to read and safer to change. Nothing is released; the app's behaviour is unchanged.

Lint and CI

  • eslint.config.mjs (flat config, next/core-web-vitals + next/typescript). Rules turned off, with the reason in the config: no-html-link-for-pages (/ is rewritten by the middleware and /api/connect/* are API redirects, so full page loads are what we want) and no-img-element (static images, no next/image in the standalone desktop server). no-unused-vars ignores rest siblings (we drop token fields with destructuring).
  • New npm scripts: lint, typecheck, test.
  • .github/workflows/ci.yml: npm ci, typecheck, lint, test and next build on pushes and PRs to main. It skips the Electron binary download.

Tests (Vitest, 37 tests)

  • headers.ts: decodeWords, parseFrom, parseListUnsubscribe
  • companies.ts: companyDomain
  • updates.ts: isNewer
  • applock.ts: PIN set/check/remove and the rate limit (5 free tries, then 30 s doubling up to 1 h, and the counter resets after a correct PIN). Uses a temporary DATA_DIR and fake timers.

Dead code

  • Removed src/lib/providers/microsoft.ts, SHOW_OUTLOOK, and the microsoft provider in accounts, AddAccount, Dashboard, the connect routes, middleware, catalog, prepare-desktop.mjs and .env.example. Google sign-in still works the same way.
  • Removed the redundant desktop:build script.
  • Kept public/screenshots/filter-dark.png, because scripts/capture.cjs still generates it.

README

  • Feature list now covers Gmail tabs, Rules, cleaning suggestions, keep-newest, Apps & access, the PIN app lock and the Microsoft Store listing.
  • Download link now goes to https://www.mailclean.app/download.
  • Outlook is described as planned.
  • New sections: the checks to run, Versioning (electron/package.json is the source of truth), and the Store workflow.
  • Code map now includes rules, companies, applock, headers, competitors, brand.cjs, both workflows and the tests.

Checked locally: npm run typecheck, npm run lint, npm test and npm run build all pass.

Outlook sign-in is being built on a separate branch; on main it was hidden
behind SHOW_OUTLOOK and never reachable. Google sign-in is unchanged.
- eslint.config.mjs (next/core-web-vitals + next/typescript), npm run lint
- npm run typecheck, npm test (Vitest) for headers, companies, updates and the PIN lock
- CI runs typecheck, lint, test and build on pushes and pull requests to main
- drop the redundant desktop:build script
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
mailclean Ready Ready Preview Oct 20, 2026 4:03pm UTC

@ravimehra9911
ravimehra9911 merged commit b05638e into main Oct 20, 2026
3 checks passed
@ravimehra9911
ravimehra9911 deleted the claude/beautiful-albattani-ba962f branch October 20, 2026 16:57

This branch was successfully deployed

1 active deployment
Preview — 741ab111 Deployed Oct 20, 2026 by vercel[bot]
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