Korgalore Changelog
===================

v0.4 (2026-01-20)
-----------------

New Features
~~~~~~~~~~~~

* IMAP OAuth2 Authentication for Microsoft 365

  - Support for modern OAuth2 authentication (XOAUTH2) with Microsoft 365
  - Uses PKCE authorization flow for secure desktop application authentication
  - Built-in Azure AD application ID for zero-configuration setup
  - Custom client_id support for organizations that block third-party apps
  - Automatic token refresh with secure local storage
  - Full GUI support for re-authentication when tokens expire

  Example configuration::

    [targets.office365]
    type = 'imap'
    auth_type = 'oauth2'
    server = 'outlook.office365.com'
    username = 'user@company.com'

Improvements
~~~~~~~~~~~~

* Close network connections after sync runs to avoid keeping idle connections
  open between periodic syncs (IMAP, HTTP sessions)

* JMAP target now uses shared requests session for consistent User-Agent
  header and proper connection cleanup

* Add GUI optional dependencies to pyproject.toml (``pip install korgalore[gui]``)

* Support AyatanaAppIndicator3 as fallback for AppIndicator3 (needed on
  Debian and derivatives)

* GUI now monitors network availability via Gio.NetworkMonitor and skips
  sync attempts when network is unavailable (airplane mode, resume from
  suspend, etc.). Sync is automatically scheduled when network is restored.

* GUI error messages now display actual error text instead of unhelpful
  "see logs" messages, since logs are not collected by default.

* Add hashed requirements file for GUI dependencies (requirements-gui.txt)

v0.3 (2026-01-15)
-----------------

New Features
~~~~~~~~~~~~

* GNOME Taskbar Application (``kgl gui``)

  - System tray status indicator with automatic background syncing
  - Configurable sync interval via ``[gui] sync_interval`` config option
  - Real-time status updates showing current feed/delivery being processed
  - "Sync Now" menu item for manual sync triggering
  - "Yank..." dialog to fetch messages by message-id or URL without terminal
  - "Edit Config..." menu item to edit configuration in preferred editor
  - "Edit Bozofilter..." menu item to manage blocked senders
  - Automatic TOML validation after config edits with live reload on success
  - Gmail re-authentication support: detects expired tokens and shows
    "Authenticate..." menu item to re-auth via browser without terminal
  - Deduplicates message count by Message-ID for accurate reporting
  - Desktop entry file (korgalore.desktop) for application menu integration

* Thread Tracking (``kgl track``)

  - Track specific email threads for ongoing updates without full list subscription
  - Subcommands: add, list, stop, pause, resume
  - Uses lei to create persistent searches that monitor threads
  - Tracked threads automatically updated during regular ``pull`` operations
  - Threads auto-expire after 30 days of inactivity (can be resumed)

* Subsystem Tracking (``kgl track-subsystem``)

  - Track Linux kernel subsystems by parsing MAINTAINERS file
  - Automatically creates lei queries for mailing list traffic and patches
  - Supports substring matching for subsystem names (case-insensitive)
  - ``--threads`` option to include entire threads when any message matches
  - ``--since`` option to control query date range (default: 7 days)
  - ``--forget`` flag to remove tracking and clean up lei queries
  - Configuration stored in conf.d/ for easy management

* Modular Configuration (conf.d)

  - Additional config files automatically loaded from ``~/.config/korgalore/conf.d/*.toml``
  - Files merged alphabetically into main configuration
  - Useful for separating auto-generated configs from manual configuration

* Pipe Target

  - New target type for delivering messages to external commands
  - Labels passed as command-line arguments to the pipe command
  - Useful for custom processing pipelines

* TOML Validation

  - ``edit-config`` command now validates syntax after editor closes
  - Reports errors with line numbers for easy debugging

* Bozofilter (``kgl bozofilter``)

  - Block messages from unwanted senders
  - Blocked messages are silently skipped during delivery
  - Simple text file format (one address per line, supports comments)
  - CLI options: ``--add``, ``--edit``, ``--list``, ``--reason``
  - GUI integration: "Edit Bozofilter..." menu item

Improvements
~~~~~~~~~~~~

* Gmail token handling: gracefully handle expired/revoked tokens instead of
  crashing, with clear error messages guiding re-authentication

* Suppress googleapiclient discovery cache warning by disabling file_cache

* Defer feed initialization messages until after progressbar completes for
  cleaner output

* Add comprehensive test suite with 300+ tests

* Optimize delivery lookup algorithms for better performance

* Labels can now be specified as comma-separated strings (e.g., ``-l INBOX,UNREAD``)
  in addition to repeated options (``-l INBOX -l UNREAD``)

Bug Fixes
~~~~~~~~~

* Fix crash when initializing a new feed for the first time

* Fix feed_lock failing when feed directory does not exist

* Drop dependency on python-dateutil (use stdlib datetime instead)

* Fix git commands failing with ``safe.bareRepository=explicit`` by using
  ``--git-dir`` instead of ``-C``

Documentation
~~~~~~~~~~~~~

* Add documentation for thread tracking feature

* Add comprehensive GUI documentation covering installation, usage,
  configuration, and systemd service setup

* Add documentation for subsystem tracking and conf.d modular configuration

* Add manpage (``man/kgl.1``) for distribution packages

* Add shell completion scripts for bash, zsh, and fish (``completions/``)

v0.2
----

Initial public release with support for:

* Gmail, JMAP, IMAP, and Maildir targets
* Lore.kernel.org and lei feed sources
* Basic pull and yank commands
