Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 17 Aug 00:51
· 83 commits to main since this release
ecad6da

The features the first real user's coverage study asked for, in the
order it ranked them, plus the terminal-query work that lets
capability-probing applications run against termlens unmodified.

Changed

  • Scroll gained Left and Right variants and is now
    #[non_exhaustive]. Exhaustive match on it needs a wildcard arm;
    marking it non-exhaustive means later additions won't break code
    again.

Added

  • Writes now respect the terminal's deadline. send, send_str,
    paste, click and scroll used to block indefinitely if the
    application stopped reading its input and the PTY buffer filled — the
    one place the crate's own "no unbounded waits" rule wasn't applied.
    They now fail at the deadline with the screen attached and a message
    naming the real cause, instead of hanging a CI job.
  • A fuller mouse API: click_with(button, col, row) for middle and
    right buttons, drag(button, from, to), modifier chords
    (MouseButton::Left.ctrl(), mirroring Key::Right.ctrl()), and
    horizontal wheel via Scroll::Left / Scroll::Right. Everything
    stays mode-aware: encoded for the tracking mode and encoding the
    application enabled, and refused with a typed error when the mode
    cannot express the gesture — a drag under X10, which reports no
    release, is an error rather than a misleading half-gesture.
  • termlens answers DECRQM ("is private mode n set?"), so an
    application that probes before using synchronized output enables it
    against termlens — wait_frame works against programs nobody
    modified for the harness. Replies are truthful or absent: modes whose
    state the emulator holds exactly report set/reset, everything else
    reports "not recognized" rather than a guess. DECRQSS, OSC 4
    palette reads and OSC 52 clipboard reads are now recognized too, so
    an application blocked on one is named in the timeout instead of
    hanging silently.
  • TerminalBuilder::foreground_rgb configures the OSC 10 answer,
    which was hardcoded white. Applications that pick a theme by
    comparing foreground and background luminance can now be tested
    against both.
  • Every wait now takes a per-call deadline: wait_frame_for,
    wait_idle_for and wait_exit_for join wait_until_for. One
    known-slow step no longer forces the builder timeout up for every
    other wait in the suite — which is what made a genuinely stuck
    application burn the long timeout on its first failure. Timeout errors
    report the deadline that actually applied.
  • wait_frame retains the last 8 completed frames and evaluates
    them oldest first, so a burst of frames arriving in a single read is
    observable step by step — a progress counter ticking 1, 2, 3 in
    one write used to be visible only at 3. The retention bound and its
    two consequences (a longer burst drops its oldest frames; a retained
    frame stays matchable, so a predicate satisfied earlier resolves at
    once) are documented on wait_frame and in docs/DESIGN.md §2.