Files
buzz/desktop
npub1cc3ha7z055mu0rwwu7806t2wt8mj3pvu0uv5mfp2c50dahaqhczshdalg6andtlongwell-block a1e2a9b113 fix(terminal): pin the DOM->engine sign at the boundary it lives on
Wren caught that the one negation was executed by everything and
asserted by nothing. The frontend test proved a wheel delta reaches IPC
as `lines: -2`; the engine tests proved `scroll(+2)` goes back into
history. Neither ran the conversion between them, so deleting `-lines`
from `terminal_scroll` left both suites green and reversed the terminal
on a real trackpad. Reproduced before fixing: that mutant SURVIVED the
full `buzz-terminal` and `buzz-desktop --lib` suites.

The negation becomes `engine_scroll_lines`, a named function rather than
a `-` in an argument list, because a conversion with no name has nowhere
to hang an assertion. Three tests: the arithmetic with the direction in
the test name, an end-to-end pass that drives a real `SharedTerminal`
through the helper and asserts on the text that lands on screen -- the
unit alone would still pass if the engine read the sign the other way --
and the `i32::MIN` case.

`saturating_neg` rather than unary negation, also Wren's: `lines`
arrives over IPC, and `-i32::MIN` panics in debug and wraps back to
`i32::MIN` in release. The release case is the dangerous one, silently
scrolling the wrong way on a crafted command. Saturating keeps the
direction the caller asked for and lets the engine clamp.

Co-authored-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
Signed-off-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
2026-08-02 17:52:24 -04:00
..
…

Buzz

Desktop chat shell with:

  • Tauri + React + TypeScript + Vite
  • Tailwind CSS
  • shadcn/ui-ready shared components
  • Biome (lint/format/check)
  • Feature-driven frontend structure

Scripts

  • pnpm dev - run the web frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm format - Biome format (write)
  • pnpm check - Biome check

Structure

  • src/shared - reusable app-wide code (ui, lib, styles)
  • src/features - feature modules (vertical slices)
  • src/app - top-level app composition