Skip to content

Conversation

@alexi-build
Copy link
Contributor

@alexi-build alexi-build commented Jan 4, 2026

Description

Fifteen Million Merits

Trigger Raycast Focus and block Social Media unless you have work currently running in AI agents. Inspired by a tweet from @theo.

Features

  • AI Agent Session Tracking: Monitor active sessions from popular AI agents.
  • Dynamic Focus Mode: Triggers Raycast Focus mode when no AI agents are active.
  • Auto-Completion: Automatically stops Focus mode once an AI agent session is initiated.
  • Menu Bar Integration: Real-time counter display and quick controls in the macOS menu bar.
  • Universal Hooks: One-click setup for Claude Code, Cursor, Opencode, and Codex CLI.

Screencast

fifteen-million-merits-issue-1080.mov

Checklist

@raycastbot raycastbot added new extension Label for PRs with new extensions platform: macOS labels Jan 4, 2026
@raycastbot
Copy link
Collaborator

Congratulations on your new Raycast extension! 🚀

Due to our current reduced availability, the initial review may take up to 10-15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

- feat: add enable/disable toggle for session counter
- feat(storage): add lifetime merits tracking
- feat: add confirmation alert before resetting lifetime merits
- refactor(ui): reorder menu items for better UX
@alexi-build alexi-build marked this pull request as ready for review January 7, 2026 01:47
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile Summary

This PR introduces a new extension that gamifies productivity by tracking active AI agent sessions and controlling Raycast Focus mode. When no AI agents are active, Focus mode blocks distractions (social media, news). Starting an agent session automatically disables Focus mode.

Key changes:

  • Menu bar counter displaying active AI agent sessions and lifetime merits
  • Automatic hook setup for Claude Code, Cursor, Opencode, and Codex CLI
  • LocalStorage-based state management with preference-driven distraction threshold
  • Focus mode integration via Raycast URL schemes
  • One minor style suggestion regarding operator precedence clarity

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The code is well-structured, properly documented, and follows Raycast extension best practices. It correctly uses LocalStorage for persistence, implements proper error handling, uses cached promises for performance, and follows all repository standards (Prettier config, CHANGELOG format, package.json structure). The single style suggestion is non-critical.
  • No files require special attention

Important Files Changed

Filename Overview
extensions/fifteen-million-merits/src/lib/storage.ts Core storage logic with counter management, Focus mode integration, and preference handling - one minor style suggestion
extensions/fifteen-million-merits/src/show-ai-agent-sessions-counter.tsx Menu bar UI with cached state management and optimistic updates - clean implementation
extensions/fifteen-million-merits/src/setup-ai-agent.ts Hook setup for various AI agents (Claude, Cursor, Opencode, Codex) - handles config files correctly

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (1)

  1. extensions/fifteen-million-merits/src/lib/storage.ts, line 62-72 (link)

    logic: use open() from @raycast/api instead of execSync to avoid potential activation errors

13 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@alexi-build
Copy link
Contributor Author

@greptile-apps please, review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@alexi-build
Copy link
Contributor Author

@greptile-apps please, review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

alexi-build and others added 2 commits January 18, 2026 16:23
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Merge branch \'contributions/merge-1768772341617\'
- Pull contributions
- chore(package-lock): remove unnecessary peer dependencies for cleaner package management
- refactor(setup): update Command function type definition for improved type safety
- refactor(storage): simplify preference value retrieval for distraction threshold and focus mode
- feat: enhance AI agent session management with distraction threshold and improved focus synchronization
- feat: add confirmation alert before resetting lifetime merits
- refactor(ui): reorder menu items for better UX
- feat: add enable/disable toggle for session counter
- feat(storage): add lifetime merits tracking
- chore: reorder commands in package.json
- fix: replace Raycast open API with execSync to avoid activation errors
- feat(setup): persist focus index after configuring AI agents
- implement
- init
@alexi-build
Copy link
Contributor Author

@0xdhrv @pernielsentikaer

Ready for review.

Works a lot better than on the video now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants