Web demo polish: token visualization + portfolio explanations - #17
Conversation
Three threads bundled together since they all touch the same two files. * Visual redesign of index.html. Larger heading with accent on "GPT", card-based prompt+controls panel with elevated shadow, primary-styled generate button with hover/press states, output area as its own card. Light/dark mode polished — warmer backgrounds, better borders, brighter accent in dark mode. * Token visualization. Six soft pastel CSS variables (--tok-c0..c5) applied via .tok-N classes. Each token in both the live prompt preview (under the input) and the generated output gets a colored background that cycles, so token boundaries are visible at a glance. User-typed tokens are additionally underlined in the accent color so the boundary between human prompt and model continuation is obvious. main.js gains a renderPromptPreview() helper wired to the prompt input's "input" event for live updates. * "How it works" portfolio section below the demo. Sections cover the model architecture, what tokens are, browser-side inference via ONNX Runtime Web, lookahead sampling, the plateau LR schedule, and the tech stack. Links to source on GitHub and Karpathy's original repo. Also moved the initial prompt-preview render to fire before the ~10s ONNX model download, so users see colored tokens immediately rather than staring at "(empty)" while the model loads. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe lukasGPT demo receives a comprehensive redesign with a new card-based UI theme and refactored token rendering. Tokens throughout the interface now display as individually colored inline spans instead of plain text, with consistent color cycling across primer tokens and generated output. The prompt input is wired to live-update its tokenized preview on each keystroke. ChangesToken Visualization and UI Redesign
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Visual + content refresh of the static `web/` demo. Single commit (`ecec836`), two files touched.
Three threads
Visual redesign
Token visualization
Portfolio "How it works" section
Loading UX
Test plan
🤖 Generated with Claude Code