Skip to content

Visual overhaul, Pages site, and fixes for #3 and the web UI dropping tokens - #7

Merged
Mattbusel merged 1 commit into
mainfrom
shine-visuals
Sep 25, 2026
Merged

Mattbusel merged 1 commit into
mainfrom
shine-visuals

Conversation

@Mattbusel

Copy link
Copy Markdown
Owner

Makes the repo look like what it is (a token-stream tool), and fixes the bugs that showed up while capturing real output.

Fixes #3.

Bugs fixed

  • Web UI and --json-stream lose the spaces between words for real providers #3, spaces lost in web UI and --json-stream: whitespace between words is now carried onto the next token's text and original. Index, counting and transform selection are unchanged. New tests: test_web_events_keep_whitespace, test_web_deleted_token_keeps_whitespace_pending.
  • Web UI showed nothing for fast streams: the [DONE] handler cleared the render queue before it was drawn, so a stream that arrives in one burst (the mock provider, cached replies) rendered zero tokens. It now drains the queue, then finishes.
  • provider=mock in the web UI silently became OpenAI (both /stream and /ab-stream). Fixed, and the provider menu gains Mock (no API key).
  • --json-stream stdout was not valid JSONL: the human header and footer were printed into it. Now suppressed in that mode.
  • New --no-open flag so --web can run without opening a browser tab.
  • Mock fixture: no longer rotated by a prompt hash (it started mid-sentence and glued the prompt onto "The"); the whole prompt is echoed (up to 40 chars, was 20). In the web path the transform now touches the word, not its leading space (" kciuq", not "kciuq ").

Visuals (all from real runs today)

  • assets/hero.svg: animated SVG replaying the real /stream output of the mock provider, token by token, with the confidence of each token. Text is converted to glyph paths (Cascadia Mono) so it renders identically everywhere; respects prefers-reduced-motion.
  • assets/terminal-visual.svg, assets/terminal-table.svg: real ANSI output of --provider mock --visual and cargo run --example mock_stream.
  • assets/web-ui.png: the restyled web UI in split view.
  • docs/index.html: GitHub Pages site with a replay of five real recorded streams (reverse, uppercase, mock, noise, delete).
  • .github/social-preview.png (1280x640).
  • README: hero, one-minute no-key quick start first, feature highlights with visuals, long reference sections collapsed. The three 2025 screenshots in the repo root were removed (early version, no longer matching the CLI). Status section updated (CI is green).

Before / after

Web UI, mock provider, after clicking Stream. Before: nothing rendered (and the menu had no mock option).

Before After
before after

Terminal, before:

EVERY OTHER TOKEN INTERCEPTOR
Provider: mock
...
 response rof prompt: "tahW is sensuoicsnocThe kciuq brown xof jumps revo the yzal dog. This si a kcom
==================================================
Complete! Processed 22 tokens.

After:

terminal

Site:

site

Checks

cargo test: all suites pass locally (lib 1565 passed, 0 failed).

…b UI dropping tokens and spaces

- Fix #3: web UI and --json-stream keep the whitespace between words (carried onto the next token's text and original); tests updated and added
- Web UI: tokens of a fast stream were discarded when [DONE] arrived before the render loop drained; now the queue is flushed first
- Web UI: provider=mock was silently mapped to OpenAI; add Mock (no API key) to the provider menu
- --json-stream no longer prints the human header/footer into its JSONL output
- New --no-open flag for --web
- Mock fixture reads as one sentence and echoes the whole prompt (up to 40 chars) instead of starting mid-sentence
- Terminal header/footer and web UI restyled around one palette; confidence shown as an underline per token
- README: animated SVG hero from real mock output, real terminal captures, collapsible reference; GitHub Pages site in docs/
- Social preview card at .github/social-preview.png
@Mattbusel
Mattbusel merged commit 0517504 into main Sep 25, 2026
4 checks passed
@Mattbusel
Mattbusel deleted the shine-visuals branch September 25, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI and --json-stream lose the spaces between words for real providers

1 participant