# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.0] - 2026-06-05

### Changed
- Session reset now shown as absolute clock time (`resets at 16:43`)
  instead of relative duration.
- Weekly reset now shown as day + clock time (`resets lun 05:00`).
- Progress bar baseline color is green (`#4caf50`) instead of blue.
- Color thresholds: green ≤70%, amber 71-89%, red ≥90%.
- Extension icon redesigned: four-pointed sparkle in fluorescent green
  on transparent background. Generic shape, not Anthropic's logo.

## [2.0.2] - 2026-06-05

### Fixed (CRITICAL)
- Removed the `MutationObserver` entirely. v2.0.0 and v2.0.1 had a
  fatal architectural bug: the observer reacted to mutations caused
  by the extension itself, triggering a re-render that caused another
  mutation, infinitely. On pages where the embedded-mode selector
  succeeded, this froze the browser tab.
- Replaced the observer with a 3-second `setInterval` check.
  Iterations are separated by real time (not microtasks), making
  infinite loops architecturally impossible.
- Switched from `replaceWith`-based rebuild to in-place text/style
  updates. Drastically reduces DOM mutations per poll.
- Added a circuit breaker: if the embedded UI gets removed by the
  host page more than 5 times in 30 seconds, embedded mode is
  disabled for the session and the floating fallback takes over.

## [2.0.1] - 2026-06-05

### Fixed
- Prompt-detection heuristic rewritten from "find ancestor with a
  'send'-labelled button" (anglocentric, broken because Claude.ai's
  send button is an unlabelled icon) to "find first ancestor with
  ≥2 visible buttons within ±150px of the editable's vertical
  center". Language-independent.

## [2.0.0] - 2026-06-05

### Changed (BREAKING)
- New default UI: progress bars integrated into the Claude.ai prompt
  input box footer, showing Session (5h) and Weekly (7d) with reset
  countdowns.
- The floating bottom-right overlay is now a fallback. It appears
  only when the prompt toolbar cannot be located (e.g. Claude.ai
  refactors its DOM).

### Added
- Color-coded progress bars (initial scheme).
- One-decimal precision on percentages.

## [1.0.1] - 2026-05-26

### Fixed
- `formatPct()` was rendering an integer `1` from the server as
  `100%` (interpreting it as the fraction `1.0`). The boundary now
  belongs to the percent interpretation: `1` → `1%`.

## [1.0.0] - 2026-05-22

### Added
- First public release.
- 5-hour session cap and 7-day weekly cap displayed as percentages.
- Reset timestamps for each cap.
- Draggable overlay with persistent position.
- Shadow DOM isolation from host page CSS.
- Visibility-aware polling (45s while tab is visible, paused when
  hidden).
- Local-only storage (no telemetry, no remote hosts).
- Two permissions only: `storage` and `https://claude.ai/*`.

### Notes
- The `/api/organizations/{uuid}/usage` endpoint consumed by this
  extension is not part of Anthropic's public API and may change
  without notice.
