Skip to content

v11.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Aug 14:23
· 24 commits to master since this release
6b1e85c

Changelog for v11.2.0

This release focuses on improving the overall note taking capability by featuring a in-built note editor and a much better one, instead of the slightly underwhelming older one with many bugs.

result

Features

Note editor completely rebuilt (UX Overhaul)

The previous note editor was a hand-rolled raw-ANSI input loop that felt like a placeholder. It rendered the entire buffer on a single line with a block cursor character, gave no sense of document structure, and cleared the whole screen on every keystroke, which flickered badly on slow connections. Editing was barely usable: arrow up/down did nothing, there was no undo, no word navigation or deletion, no line numbers, no soft wrapping, no status feedback, and no safety net — hitting Esc immediately threw away whatever you had typed. Multiline notes were effectively impossible to write or review, and the editor advertised intrusive "autocorrect" that rewrote words while you were typing them.

v11.2.0 features a replaced editor with a full-screen Bubble Tea TUI built on the charmbracelet stack already declared in go.mod (bubbletea, bubbles/textarea, lipgloss). The new editor:

  • Renders a proper document view with line numbers, soft word wrapping, and smooth auto-scrolling (no full-screen clears, no flicker).
  • Shows a header bar with the note name and vault space, a status bar with Ln/Col, character and word counts plus a modified/clean indicator, and a two-row footer listing every keybinding.
  • Adds undo/redo (Ctrl+Z / Ctrl+Y) with cursor-position restore, capped at 200 snapshots. Snapshot-based undo captures the pre-edit value and cursor location so undoing a change lands you exactly where the edit happened.
  • Implements the full standard editing keymap: arrows, Home/End, Ctrl+A/E line start/end, Ctrl+U delete to start of line, Ctrl+K delete to end of line, Ctrl+W delete word backward, Ctrl+D delete character, Ctrl+T transpose, Alt+U/L/C word case transforms, and Ctrl+V paste from the system clipboard (with bracketed-paste support).
  • Protects against accidental data loss: Esc (or Ctrl+C) with unsaved changes now asks for confirmation ("Esc again to discard, any other key to continue") instead of nuking the buffer, and Ctrl+C is treated like Esc instead of silently killing the session.
  • Saves with Ctrl+S, exactly as before. The non-interactive fallback (plain line input until an empty line) is preserved for piped/scripted usage.

Removed behavior: The old "autocorrect" (teh -> the, etc.) and automatic bracket-pair insertion were dropped; word transformations are still available intentionally via Alt+U/L/C rather than happening mid-keystroke.

Note editor unit test coverage (Testing)

Added 12 unit tests driving the editor model directly: typing and save, multi-line entry, untouched-content preservation, Esc cancel (immediate without changes, confirm-discard with changes), Ctrl+C parity with Esc, undo/redo including cursor restoration on a wrapped multi-line document, and the modified/clean flag lifecycle. pm's CLI smoke tests were also fixed to build the whole package (go build -o … ..) instead of only main.go, since the main package now spans multiple files.