graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
fix(anim): smoother ensō spinner — six poses at 100ms
Rach Pradhan1d4bb3d6bb7f
diff --git a/src/anim.zig b/src/anim.zigindex 56c84619..88942e5d 100644--- a/src/anim.zig+++ b/src/anim.zig@@ -32,7 +32,7 @@ pub const Anim = struct {};pub const anims = [_]Anim{- .{ .name = "enso", .desc = "quiet brush-circle turn (default)", .frame_ms = 160, .frame = animEnso },+ .{ .name = "enso", .desc = "quiet brush-circle turn (default)", .frame_ms = 100, .frame = animEnso },.{ .name = "braille", .desc = "classic braille spinner", .frame_ms = 80, .frame = animBraille },.{ .name = "pulse", .desc = "pulsing star", .frame_ms = 100, .frame = animPulse },.{ .name = "orbit-dots", .desc = "dot orbiting a ring", .frame_ms = 100, .frame = animOrbit },@@ -173,9 +173,12 @@ fn animThinking(w: *Io.Writer) Io.Writer.Error!void {}fn animEnso(w: *Io.Writer, i: usize) Io.Writer.Error!void {- // A deliberately small, unhurried brush-circle. Each pose holds for two- // frames so it reads as breathing rather than a busy loading indicator.- const frames = [_][]const u8{ "◜", "◜", "◝", "◝", "◞", "◞", "◟", "◟" };+ // A deliberately small, unhurried brush-circle. Six stroke poses (the four+ // quadrant arcs bridged by the top/bottom semicircles) stepping at 100ms+ // read as a smooth turn — the old doubled four-pose cycle visibly jumped+ // (~3 poses/sec). Unicode has no left/right semicircle outline, so the+ // rotation's one seam hides on the left edge.+ const frames = [_][]const u8{ "◜", "◠", "◝", "◞", "◡", "◟" };try w.print("{s}{s}{s}", .{ style.accent, frames[i % frames.len], style.reset });try animThinking(w);}@@ -363,7 +366,7 @@ test "spinner pool is exactly the expected 10 animations (no silent additions)"try std.testing.expectEqual(expected.len, anims.len);for (anims, 0..) |a, k| try std.testing.expectEqualStrings(expected[k], a.name);try std.testing.expectEqualStrings("enso", anims[0].name);- try std.testing.expectEqual(@as(u16, 160), anims[0].frame_ms);+ try std.testing.expectEqual(@as(u16, 100), anims[0].frame_ms);}/// Check .harness/settings.json for "dev_spinner": if truthy, thediff --git a/src/cli.zig b/src/cli.zigindex 635e4b9b..7188281b 100644--- a/src/cli.zig+++ b/src/cli.zig@@ -23,6 +23,7 @@ pub const changelog_text =\\──────────\\0.0.243\\ • The terminal palette now matches codegraff.com: the identity accent is the site's emerald (#059669) — spinner, prompt, headings, tool-call lines, and attached-file chips — so a routine ⚙ bash line no longer reads as error red+ \\ • The ensō spinner actually turns now: six brush poses stepping at 100ms instead of four doubled poses every 320ms — the ~3fps stutter is gone\\\\0.0.242\\ • MCP tool schemas load on demand: a 13-tool server's catalog drops 64.8%, about 1,700 input tokens off every request; small servers stay eager and unchangeddiff --git a/src/repl.zig b/src/repl.zigindex 4cbfbd7d..ed0857e9 100644--- a/src/repl.zig+++ b/src/repl.zig@@ -118,7 +118,7 @@ pub const ultracode_palette = [_]zz.Color{zz.Color.fromRgb(0x9B, 0x6A, 0x35), zz.Color.fromRgb(0xA5, 0x65, 0x3B),};-pub const enso_frames = [_][]const u8{ "◜", "◝", "◞", "◟" };+pub const enso_frames = [_][]const u8{ "◜", "◠", "◝", "◞", "◡", "◟" };pub const braille_frames = [_][]const u8{ "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" };pub const dragon_frames = [_][]const u8{ "🐉 ", "🐉 ✦", "🐉 ✧", "🐉 ✦" };diff --git a/src/repl_model_render.zig b/src/repl_model_render.zigindex 41b73785..492f4490 100644--- a/src/repl_model_render.zig+++ b/src/repl_model_render.zig@@ -17,7 +17,7 @@ const tailPreview = util.tailPreview;pub fn spinnerFrame(self: *const Model, now_ms: u64) []const u8 {return switch (self.anim) {- .enso => repl.enso_frames[(now_ms / 160) % repl.enso_frames.len],+ .enso => repl.enso_frames[(now_ms / 100) % repl.enso_frames.len],.braille => repl.braille_frames[(now_ms / 80) % repl.braille_frames.len],.dragon => repl.dragon_frames[(now_ms / 220) % repl.dragon_frames.len],};