Commentto live screenshot

Commentto — Case Study

A production-ready Chrome extension build + web app that summarizes long-form content and generates concise, thoughtful comments in the user’s writing voice.
Designed for real-world usage, not prompt demos.


Background / Why This Matters

Engaging with long-form content (blogs, LinkedIn posts, essays) has a hidden cost:

I wanted to explore what happens when:

The goal was to reduce the activation energy of thoughtful engagement.


Project Goal

Build a system that:


My Role

I built the entire system end-to-end:


Architecture Overview

Monorepo Structure

commentto/
├── apps/
│   ├── web/          # Next.js app + API routes
│   └── extension/    # Chrome extension (Vite + MV3)
│
├── packages/
│   ├── types/        # Shared domain contracts
│   ├── voices/       # Preset voice definitions
│   ├── utils/        # Shared helpers
│   └── ui/           # Reusable UI components

This structure ensured:


How It Works (Flow)

  1. User clicks Generate in the extension popup.

  2. Background service worker injects a content script.

  3. Page text is extracted from article, main, or body.

  4. Content is sent to the production API.

  5. Backend:

    • safely truncates input
    • summarizes content
    • generates a voice-conditioned comment
  6. Result is returned to the popup UI.

  7. The extension is currently loaded via developer mode, allowing rapid iteration without store-level constraints.

The entire flow is designed to feel instant and local.


AI & Voice Modeling

Summarization

Voice Profiles

Instead of vague prompts like “be casual”, each voice is defined as a concrete profile describing:

This significantly reduced “voice drift” and made generations consistent across runs.


Key Challenges & Solutions

1. Chrome Extension MV3 + ESM

Problem: Service workers failed silently due to ESM vs classic script mismatch.

Solution:

Why it mattered: Modern bundlers default to ESM, but MV3 requires precise configuration.


2. Monorepo Dependency Drift

Problem: Types and voice presets began drifting between web and extension.

Solution:

Why it mattered: Prevented subtle runtime mismatches and simplified iteration.


3. Voice Consistency (“AI Voice Drift”)

Problem: Early generations felt similar across different voices.

Solution:


Browser Extension Design Philosophy

I intentionally avoided:

Instead, the extension is:

Custom voices are stored using browser storage and persist across sessions.


Outcomes / Learnings

This project reinforced several lessons:


Final Thoughts

Commentto was not built as a tutorial clone or demo.

It reflects:

It’s the kind of system I’d want to use daily — and the kind I enjoy building.

The system is fully deployable today, with Chrome Web Store publication intentionally deferred until product direction is validated.


Recent Iterations & Advanced Features

As the project matured, I extended Commentto beyond basic summarization and generation, focusing on real-world usage patterns and edge cases surfaced through daily testing.

1. Loosened Prompt Constraints (Expressiveness Without Quality Loss)

Early versions of the system produced consistent but overly “AI-sounding” comments. While technically correct, they lacked personality and variation.

What changed:

Result:

This demonstrated that prompt looseness must be intentional, not random — stability and expressiveness can coexist when constraints are applied selectively.


2. Regenerate Variations (Low-Noise UX)

Instead of introducing a complex versioning system, I added a lightweight regeneration capability.

Design choices:

Why it matters:

In practice, this revealed that small prompt nudges combined with controlled randomness are sufficient for meaningful variation.


3. Content-Length Awareness (Avoiding “Summary of a Tweet”)

Summarizing short-form content (tweets, short posts) often leads to awkward or redundant outputs.

Solution:

Impact:

This reinforced the idea that AI pipelines should adapt to content shape, not treat all inputs equally.


4. User Draft → AI Enhancement Mode

To support users who already have a rough comment in mind, I introduced a draft-enhancement flow.

How it works:

Key constraint: The AI acts as an editor, not a generator.

This feature shifted Commentto from “comment generator” to a more flexible writing assistant, without complicating the UI or mental model.


5. Viewport-Aware Content Reading (Feed-Friendly Extraction)

Traditional content extraction works well for blogs, but fails on infinite feeds (LinkedIn, Twitter, etc.).

Final approach: A progressive extraction strategy:

  1. Attempt viewport-aware extraction (partially visible, text-heavy elements)
  2. Fall back to semantic containers (article, main)
  3. Final fallback to document.body

Why this matters:

This hybrid approach ensures:


Updated Learnings

These iterations reinforced several additional lessons:


Closing Reflection

As the feature set expanded, the core philosophy remained unchanged:

Commentto evolved from a simple summarization tool into a practical writing companion, shaped by real usage rather than theoretical capability.

Every feature was added only after it proved necessary — not because it was possible.