Skip to content

v0.17.0

Latest

Choose a tag to compare

@thebanri thebanri released this 26 Nov 07:55
· 15 commits to main since this release

Breaking

  • driver.ProbeQueries carries the kitty graphics query before DA1. Code
    that matched the handshake byte for byte (a test terminal, a recording)
    sees one more APC.
  • testkit.SnapshotDiff.Expected and .Actual are string, not rune. A
    cell holds a grapheme cluster as readily as a rune, and a message that
    printed only the first rune of the cell did not say what differed.

Added

  • The capability handshake asks the kitty graphics query (a 1×1 picture,
    never shown) and picks kitty's protocol when the terminal answers OK,
    whatever it is called. kwi, KDE's terminal on libghostty, names itself
    Kwi (libghostty 1.0.2), which no table knew, and lists no Sixel, so its
    pictures were half blocks. A terminal that does not know APC prints the
    query where the handshake's measurements go, and it is erased with them.

  • Frame.ClearImageRegions drops the pictures placed so far in a frame, for
    a scene drawn over the whole screen. The field it replaces became private
    in v0.16.0 with no way left to do this.

  • termimg shows sixel and iTerm2 pictures with the terminal's own kitty
    protocol when the terminal has one (kwi, Ghostty): no overlay window, so it
    works on Wayland, where kwi has no X11 window and pictures fell back to
    half blocks. The program's own kitty commands then pass through unchanged.

  • backdrop-shell now builds and runs natively on Windows: ConPTY for the
    shell and the scene terminals, console resize polling for window changes,
    a PowerShell Profile.ps1 hook for enable/disable, and install.ps1
    alongside install.sh. The Unix path is unchanged. On Windows a scene
    cannot be paused without SIGSTOP, the terminal tab is not renamed after
    the foreground program, and ending a scene stops the program itself, not
    a job object holding everything it started (#133).

  • LogView draws the ANSI escapes a program printed: SGR colours (16, 256
    and truecolour, in ; and : forms) and attributes are drawn, a reset
    returns to the line's own level style, and every other sequence (cursor
    moves, erases, OSC titles and links) is skipped. Highlights, sideways
    scroll and the semantic tree work on the text without escapes. Before,
    the ESC byte was dropped and [31m showed as text. Still 0 allocs per
    frame; a coloured line is stripped once, for the semantic tree, when it
    first comes on screen.

  • graphics.AppendKittyPlaceID places a Kitty picture under a placement
    id, and graphics.AppendKittyDeletePlacement deletes one placement.

  • Terminal.Commit / Frame.Commit and UpdateResult.Commit: an inline
    application prints a widget above its band, into the terminal's
    scrollback, where it stays after exit and is never drawn again. A chat or
    an agent commits finished messages and redraws only what still changes.
    A height of zero is as tall as the widget needs (Markdown.Rows, else
    SizeHint). On a full-screen terminal it returns ErrNotInline; a
    Program's commits are dropped there.

  • limoni.WithInlineFit(max) / Terminal.SetInlineFit: an inline band as
    tall as the rows the frame draws in, up to max.

  • widgets.SettledMarkdown: splits a streaming reply into the blocks that
    can no longer change and the rest, so the first can be committed. An open
    code fence settles in batches of eight lines and is reopened with its
    language.

  • widgets.DiffView / DiffViewState: a highlighted line diff (Myers)
    with context lines and gaps, 0 allocs per draw.

  • testkit.Terminal.Committed and uitest.Page.WaitForScreen: tests see
    the committed rows above the frame in Screen, and wait for text there.

  • limoni new -template agent: a coding agent on the Claude API, inline,
    with streamed replies committed to the scrollback and edits shown as
    diffs to approve; -demo runs a scripted agent without a key.

  • cell.Context.CellPixelW / CellPixelH (and the same on Frame): the
    size of a terminal cell in pixels, which Terminal reads from the driver
    when the window size changes. Zero means unknown. They sit in the padding
    after Style, so Context stays at 128 bytes.

Changed

  • FuzzyMatch scores the best alignment of the query instead of the first
    one: it tries each position where the first query character occurs and
    keeps the highest score. The scoring rules are unchanged. For split,
    widgets/splitpane.go scored 32 because the match began at the s of
    widgets; it now scores 48 and ranks above apps/pikap/library_test.go.
    This changes the order of FuzzyFilter, FuzzyFilterBy,
    FuzzyFilterByFields and Autocomplete results, and the command palette
    highlights the characters that were scored. Still 0 allocs per frame
    (#82).

  • Viewer3D{Pixels: true} renders the model at the terminal's cell size in
    pixels instead of a fixed 8×16, which stays the fallback where the frame
    does not know it. On a HiDPI screen with 16×32 cells the picture was
    scaled up and blurry, and on cells that are not 1:2 (10×22) it was
    stretched; it is now shown pixel for pixel. A change of cell size, as when
    the font changes, renders a new picture. Still 0 allocs per moving frame
    in the widget (#58).

  • With Kitty's protocol, only the placements that changed are sent. Each
    placement keeps an id tied to its cells; a frame places a new picture
    before deleting the old one, and a full redraw still places everything
    again. On a map of about a thousand small pictures a move went from
    117 KB to about 5 KB, and Konsole no longer flashes between deleting and
    placing. A picture that moves to new cells takes over a placement of the
    same picture that is no longer used and moves it in one step, so a
    scrolling map costs a placement per tile, as before, and nothing is
    deleted until everything is placed. Frames still draw with 0
    allocations.

  • Konsole shows pictures with Kitty's protocol when it names itself in its
    XTVERSION reply. Before, Limoni did not list it as showing pictures, and
    the handshake chose Sixel because Konsole's DA1 reply lists it. Konsole
    supports both since 22.04; Kitty's protocol works better of the two.
    LIMONI_GRAPHICS still overrides the choice.

  • ProgressBar and Sparkline draw in the frame's theme (#97). With their
    styles unset, a progress bar's filled cells take the theme's primary
    role and its empty cells muted, and a sparkline's bars take primary.
    An explicit style still wins. A Sparkline without a Color now draws
    its bars in Style's foreground when it has one, as its comment said;
    before, that foreground was ignored.

  • BarChart and LineChart draw in the frame's theme (#97). A bar or a
    series without a colour takes the theme's primary role, and a chart
    without a LabelStyle or AxisStyle draws its labels and axes in
    muted. A colour or style the user set still wins, and without a theme
    the charts keep their own cyan and grey. The legend dots of LineChart
    and PieChart now sit on the chart's background; under a theme they
    left a gap in the surface colour.

  • ToastManager draws its cards in the frame's theme (#97): the card on
    the surface role, the message and the close mark in muted, and the
    border, badge and time-left bar of info, success, warning and error
    toasts in primary, success, warning and error. The badge keeps a
    tint of its colour over the card. Without a theme, toasts keep their own
    dark colours.

  • Select and Slider draw in the frame's theme (#97). A focused field
    or thumb without a FocusedStyle takes the theme's focus role, as
    Button and the text inputs do, and so does the selected option of an
    open Select without a SelectedStyle. A slider's track and filled
    part without styles take muted and primary. An explicit style still
    wins, and without a theme they draw as before.

  • Popup and StatusBar draw in the frame's theme (#97). A popup menu's
    border without a BorderStyle takes the theme's border role, as
    Block does, and with Style unset its selected item takes focus and
    its disabled items muted. A status bar's keys without a KeyStyle or
    Style take primary. An explicit style still wins, and without a
    theme both draw as before.

  • Dialog draws in the frame's theme (#97). With its styles unset, the
    body takes the theme's surface role, the title and message its text
    colour and the sub-message muted; the border runs from the border
    role to the focus colour, which also fills the focused button, and the
    other buttons sit on the surface tinted towards the border colour. An
    explicit style still wins, and without a theme the dialog keeps its own
    dark slate and red-to-magenta border.

  • Calendar and Autocomplete draw in the frame's theme (#97). With a
    calendar's Style unset, the month line and today take the theme's
    primary role and the weekday names muted, unless their own styles
    are set, and the selected day without a SelectedStyle is reversed in
    the focus colour. So is an autocomplete's highlighted suggestion
    without a SelectedStyle or SuggestionStyle. An explicit style still
    wins, and without a theme both draw as before.

  • FilePicker and SplitPane draw in the frame's theme (#97). With a
    picker's Style unset, directories take the theme's primary role, the
    path row and file sizes muted (the path error after a failed
    Load), unless their own styles are set, and the selected entry without
    a SelectedStyle is reversed in the focus colour, its size included.
    A split pane's divider without a DividerStyle takes border, as
    Block does, and focus while the pane is focused and no
    FocusedDividerStyle is set. An explicit style still wins, and without
    a theme both draw as before.

  • CommandPalette draws in the frame's theme (#97). With its styles
    unset, the panel takes the theme's surface role and the search box
    background. The border and separator take border, as Block does.
    The title, the selection marker and the matched letters take primary,
    and the placeholder, details and result count take muted. The
    selected row is the surface tinted towards the focus colour. An
    explicit style still wins, and without a theme the palette keeps its own
    dark slate and cyan.

Fixed

  • Slider: its Style and FocusedStyle reached the track, the filled
    part and the thumb only when the frame had no style of its own, so
    inside a styled block or a themed frame they were dropped and a slider
    with a FocusedStyle showed no focus.

  • Select: under a frame style, the option under the mouse lost its
    highlight; without a HoverStyle it now looks selected, as it did
    without one.

  • Dialog draws a border in an ANSI colour in that colour. The colour's
    code was read as RGB channels, so BorderStyle{Fg: cell.NewColorANSI(2)}
    faded from near black to magenta instead of drawing green.

  • ProgressBar with ShowPercent no longer allocates for its label on
    every frame.

  • Control characters read outside the kitty keyboard protocol are keys, not
    text. Ctrl+Space (NUL) is Space with Ctrl, Ctrl+\ ] ^ _ (and Ctrl+/, which
    most terminals send as Ctrl+_) are those runes with Ctrl, and an ESC prefix
    adds Alt to the same key: ESC DEL is Alt+Backspace, not the rune DEL. A
    text input typed NUL and 0x1C–0x1F into its text, and Alt+Backspace never
    reached a binding for it.

  • LogView: with nothing selected, Down (or j) selects the first line on
    screen, as Up (or k) selects the last. It selected the second line and
    skipped the first.

  • On the Linux console (TERM=linux), F1–F5 are function keys. The console
    sends them as ESC [ [ A … E; the parser skipped the second [ and read
    F1–F4 as the arrow keys, and dropped F5.

  • LogView: End (or setting Follow again) after scrolling with the mouse
    wheel follows the log once more. The wheel's offset was taken for a new
    scroll on the next frame and turned following straight back off.

  • termimg: the clear parts of a picture take a translucent terminal's
    opacity when termimg starts with the terminal's window (alacritty -e termimg, or its own Xwayland relaunch): it read the window before it was
    on screen and drew an opaque square. go install builds of termimg had
    the square everywhere: they were pinned to a Limoni without the fix.

  • termimg: pictures move with the text when the terminal shows its
    scrollback (the wheel, Shift+PgUp). The terminal tells no program it has
    scrolled, so the pictures stayed where they were over other lines; termimg
    now reads the terminal's window, finds how many rows the text moved and
    moves the pictures by as many. A picture pushed off the top by the next
    one is kept above the screen and comes back into view as the scrollback
    is scrolled up to it, a screen or more away; one jump of more than a
    screen hides them until they can be placed again. Pictures nearly as large
    as the window are followed too: the text that comes into view between them
    is found among the rows seen when it was output.
    Where that cannot be told for certain (a run of the same output, or
    nothing beside the pictures to go by), they are hidden rather than put in
    the wrong place; a window made taller or shorter keeps them, one made
    wider or narrower lays its text out anew and drops those above the screen.

  • termimg: termimg command kept the pictures only as long as the command
    ran, so one that printed a picture and ended (gowall --preview) showed
    it for a moment. When pictures are left on the screen, they now stay, on
    the screen as the command left it, until a key is pressed; a command that
    is a shell itself still ends termimg at once.

  • termimg: a terminal made shorter scrolls its lines up to keep the cursor
    on screen, and the pictures now go up with them; resizing no longer
    leaves the pictures hidden until a key is typed.

  • testkit.DiffSnapshot compares two snapshots cell by cell and reports the
    column the differing cell starts at, the column a cursor would move to. It
    compared rune by rune, and a cell that holds a multi-rune cluster writes all
    of its runes, so one cell that differed after an emoji or an accented letter
    was reported as a handful of cells that shifted the rest of the row. This is
    the message a failing AssertSnapshot prints.

  • An inline band survives a terminal that reflows on a width change
    (kitty, and others): the cursor waits at the end of the band's last row,
    where the reflow leaves it findable, and the next frame climbs back by
    the rows the band takes at the new width. Each inline row also erases
    what an earlier, wider frame left to its right.