# Changelog

Notable changes to `pi-nvim-context` are recorded here.

## [Unreleased]

## [0.4.0] - 2026-09-09

Selection annotations, visible success notices, and draft-level header toggling.

### Added

- Visual `<leader>pS` and `:PiContextSelectionComment` capture a selection, prompt for an optional comment, and append both to Pi's editable draft without submitting it. Blank input sends the selection alone; cancelling the prompt sends nothing.
- Format comments as `[an: ...]` annotations outside the selection fence, matching Pi Studio and `pi-annotated-reply`, with safe handling of unmatched brackets and backticks.
- Normal/Visual `<leader>ph` and `:PiContextAnnotationHeader` toggle a single annotation header in Pi's current input draft. The capability-gated bridge request modifies only a recognised leading header, preserves the body, never submits a turn, and is not automatically retried after a lost acknowledgement. Requires restarting both halves of the bridge.
- Reject stale selections after source or directory changes, changed Pi links during the comment prompt, oversized comments, and combined payloads that would truncate the comment.

### Fixed

- Request a Pi TUI redraw after toggling the annotation header so it appears/disappears immediately, without waiting for a terminal keystroke.
- Show successful context sends in a brief, non-focusable floating notice so Visual-mode redraws cannot erase the acknowledgement. Keep directory paths, PIDs, and long session names in the picker and status command instead; configure duration with `success_notice_ms`.
- Use “1 line” rather than “1 lines” in selection summaries.

## [0.3.2] - 2026-09-03

Visual-mode mapping safety patch.

### Fixed

- Make the explicit Pi picker available in Visual mode and prevent other enabled prefix-based Normal mappings from falling through to native Visual commands without overriding unrelated custom mappings.

## [0.3.1] - 2026-09-03

Documentation-only patch.

### Changed

- Document default mappings with `<leader>` notation instead of assuming Space.
- Clarify that the plugin does not set `mapleader`, whose Vim and Neovim default is backslash (`\`).
- Label Space as the optional leader used in the gallery preview.

## [0.3.0] - 2026-09-02

Initial public preview.

### Added

- Visible, unsubmitted accumulation of Neovim file, location, selection, diagnostic, and buffer context in a standalone Pi session.
- Explicit per-working-directory Pi links, including deliberate cross-directory selection and stale asynchronous-work protection.
- Direct cursor completions, instruction-guided insertions, and visual-selection rewrites using the linked Pi session's active model.
- Inline and scrollable previews, regeneration, cancellation, configuration-safe acceptance mappings, and one-step undo for accepted edits.
- Private same-host Unix-socket discovery with bounded payloads, ownership and permission checks, stale-process cleanup, and request cancellation.
- Neovim 0.11 and current-stable CI coverage on Linux and macOS.

[Unreleased]: https://github.com/omaclaren/pi-nvim-context/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/omaclaren/pi-nvim-context/releases/tag/v0.4.0
[0.3.2]: https://github.com/omaclaren/pi-nvim-context/releases/tag/v0.3.2
[0.3.1]: https://github.com/omaclaren/pi-nvim-context/releases/tag/v0.3.1
[0.3.0]: https://github.com/omaclaren/pi-nvim-context/releases/tag/v0.3.0
