Skip to content

Agent UI: terminal animations, pixelated cursor, and docs fixes#568

Merged
kovtcharov merged 16 commits intomainfrom
kalin/fix-agent-ui-docs
Mar 19, 2026
Merged

Agent UI: terminal animations, pixelated cursor, and docs fixes#568
kovtcharov merged 16 commits intomainfrom
kalin/fix-agent-ui-docs

Conversation

@kovtcharov
Copy link
Collaborator

@kovtcharov kovtcharov commented Mar 18, 2026

Summary

  • Terminal-style welcome page: Typewriter effect types out "GAIA Agent UI" and subtitle with hacker-style randomized timing (bursts, pauses, micro-stutters). "GAIA" text pulses with a subtle red glow. Content cascades in sequentially after typing completes.
  • Feature card hover interaction: Fixed-height cards show thematic code hints (> encrypt --local, > npu.accelerate(), etc.) that get erased by the cursor on hover, replaced by expanded descriptions typed out hacker-style with inline cursor tracking.
  • Pixelated red cursor: Consistent 8px blocky AMD red cursor with glow, used across welcome page, chat streaming, typing indicator dots, and input cursor. Sharp-edged (border-radius: 0, image-rendering: pixelated).
  • Smooth view transitions: Crossfade animation between welcome screen and chat view (250ms opacity + translateY). Session switching also smoothly transitions.
  • Elegant agent activity animations: Tools and thinking slide in/out with staggered delays instead of harsh appear/disappear. Thinking text slides from left, tool cards scale up with cascade.
  • Chat view polish: Bouncing mini-cursor typing indicator, scroll-to-bottom button slide animation, staggered empty-state chips, input focus glow pulse, smoother message entrance with subtle scale.
  • Global animation infrastructure: Theme transition CSS utility, toast exit with slide, modal exit keyframes, sidebar content fade on collapse. All animations respect prefers-reduced-motion.
  • Docs fixes: Corrected CLI commands, API method names, and missing model fields in Agent UI documentation.

Test plan

  • Open http://localhost:4200 and verify the typewriter boot sequence plays correctly
  • Hover over each feature card — verify code hint erases, expanded text types with inline cursor
  • Click "Start a New Task" — verify smooth crossfade transition from welcome to chat
  • Send a message — verify pixelated red cursor follows streamed text
  • Observe agent activity during tool use — verify smooth slide-in transitions
  • Switch between sessions — verify crossfade transition
  • Test on mobile viewport — verify responsive behavior
  • Enable prefers-reduced-motion — verify animations are disabled

kovtcharov and others added 2 commits March 18, 2026 11:07
…g model fields

- Troubleshooting: show both npm (gaia-ui) and Python CLI (gaia --ui-port) commands
- Fix RAG SDK method: index_file() -> index_document(), chunk_count -> num_chunks
- Add missing indexing_status field to DocumentResponse
- Add missing agent_steps field to MessageResponse
- Update npm package section: gaia -> gaia-ui CLI command name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…config update

- Add self-hosted fonts (DM Sans, JetBrains Mono, Space Mono) for consistent rendering
- Refine UI styling across ChatView, Sidebar, WelcomeScreen, MessageBubble,
  DocumentLibrary, SettingsModal, and ConnectionBanner
- Update eval config: default model to claude-sonnet-4-6 with pricing
- Add agent-ui eval benchmark plan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added documentation Documentation changes eval Evaluation framework changes electron Electron app changes performance Performance-critical changes labels Mar 18, 2026
@kovtcharov kovtcharov requested a review from itomek-amd March 18, 2026 18:52
@kovtcharov kovtcharov self-assigned this Mar 18, 2026
- Welcome page: typewriter effect for title and subtitle with hacker-style
  randomized timing, sequential content reveal, GAIA text pulsating glow
- Feature cards: fixed-height with code hints that get erased by cursor on
  hover, replaced by expanded descriptions typed out hacker-style
- Pixelated red cursor: consistent 8px blocky design with AMD red glow
  across welcome page, chat streaming, typing indicator, and input cursor
- View transitions: smooth crossfade between welcome and chat views
- Agent activity: elegant slide-in/out transitions for tools and thinking
- Chat polish: bouncing typing indicator, scroll button slide, staggered
  chips, input focus glow, smoother message entrance animations
- Global: theme transition CSS, toast exit slide, modal exit keyframes,
  sidebar content fade on collapse, prefers-reduced-motion support
@kovtcharov kovtcharov changed the title Agent UI: docs fixes, UI polish, and eval config update Agent UI: terminal animations, pixelated cursor, and docs fixes Mar 18, 2026
@github-actions github-actions bot added the agents Agent system changes label Mar 18, 2026
kovtcharov and others added 11 commits March 18, 2026 15:53
… refinements

- Smooth streaming exit: streaming bubble fades out with content snapshot
  before completed message appears (no duplicate flash or jarring vanish)
- Stop button: AMD red accents for immediate visual priority during streaming
- User messages: removed contradictory left border for cleaner asymmetry
- GAIA avatar: subtle red glow in dark mode ties into accent system
- Copy confirmation: green background tint flash for clearer feedback
- Agent activity: stronger thinking bar glow, visible collapsed summary
- Input area: inset shadow depth, higher placeholder contrast
- Text selection: AMD red tint across entire app for brand cohesion
- Scrollbars: unified 5px themed scrollbars across all panels and modals
- Glassmorphism: consistent backdrop-blur on all floating surfaces
- Button active states: tactile press feedback on all button types
- Hover accents: doc pills, attachments, tool cards use AMD red consistently
- Transition timing: unified to design system variables throughout
…shell whitelist

The suggested "What hardware is in my PC?" query was completely broken due to:
- Missing system info commands (systeminfo, wmic, powershell, lscpu, lspci, etc.)
- LLM defaulting to Linux commands on Windows (no platform awareness in prompt)
- PowerShell pipe commands broken by shlex.split stripping quotes
- Windows /flags (e.g., findstr /i) misidentified as file paths
- Piped commands not validated against whitelist (security gap)

Changes:
- shell_tools.py: Add cross-platform system info commands to whitelist, add
  PowerShell/wmic with read-only cmdlet validation, fix command execution to
  preserve quoting on Windows, add pipe pipeline validation, block dangerous
  shell operators (>, &&, ||, ;), fix Windows flag path detection
- agent.py: Add dynamic platform detection to system prompt so LLM uses the
  correct OS-specific commands (Windows/macOS/Linux)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…URLs

- AnimatedPresence wrapper: delays unmount for CSS exit animations on all
  modals (Documents, File Browser, Settings, Mobile Access)
- Modal exit: overlay fades out + panel slides down (reverse of entrance)
- Session delete: slides left + shrinks + fades (250ms) before removal,
  sessions below smoothly reflow
- Message delete: fades + scales down + shrinks (250ms) before removal
- Session URL routing: sessions linkable via #hash in URL bar, auto-updates
  on session switch with getSessionHash/findSessionByHash utilities
- Default model updated from Qwen3-Coder-30B to Qwen3.5-35B-A3B across
  ChatAgent config, effective model selection, and database defaults
- Added network query guidance: prefer ipconfig, identify primary adapter
  by real Default Gateway, ignore virtual adapters unless asked
Replace count-based session polling with fingerprint comparison that
detects any change (new/deleted sessions, title edits, timestamp
updates). Add guard against empty server responses wiping the sidebar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Increase Lemonade health check timeout from 3s to 10s and soften the
banner message to acknowledge the server may be busy rather than down.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…hardening, and test plan

Thinking/cursor display:
- Stream LLM reasoning_content as <think> tags through SSE handler
- FlowThought component shows thinking text with red cursor in AgentActivity
- Single cursor rule: only one red cursor visible at any time
- LoadingMessage with sequential red glowing dots while waiting for LLM
- Auto-collapse AgentActivity panel when thinking completes
- Separated thinking events from status events (start_progress -> status type)

Lemonade integration:
- Model badge shows live model from Lemonade health API (not stale session DB)
- Settings modal shows model size, device, context window, GPU, inference speed
- Inference stats (tok/s, TTFT, token counts) on each assistant message
- Model override: custom HuggingFace model with status indicators (found/downloaded/loaded)
- Settings persistence via SQLite settings table

Security hardening:
- Block & operator in shell commands (was only blocking &&)
- Remove foreach-object from safe PS cmdlets (allows .NET code execution)
- Add shlex.split ValueError handling for malformed PS commands
- Improved DANGEROUS_SHELL_OPERATORS regex with word-boundary matching

Agent improvements:
- System prompt trimmed from 25K to 13K chars (removed verbose examples, deduplicated tool refs)
- Enhanced list_indexed_documents with per-doc chunks, sizes, types
- Enhanced rag_status with total index size and document type breakdown
- Better index_document messages (skip/cache/re-index/new)
- Improved read_file error with parent dir context and search_file suggestion
- Friendlier error messages from GAIA's perspective (not technical stack traces)

Test infrastructure:
- Comprehensive 56-case conversational test plan (tests/agent_ui_test_plan.md)
- Test fixture files: CSVs, YAML, Python, empty file for data analysis tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cursor consolidation:
- ThinkingIndicator in message header types/erases "Thinking..." next to GAIA name
- Cursor only renders when ThinkingIndicator is active (no dual cursor with FlowThought)
- RenderedContent cursor gated on !agentStepsActive (no overlap with thinking cursor)
- Removed dead cursorRef from FlowThought, renamed wasActiveRef2

Message transition fix:
- Skip rendering static DB message during streamEnding phase (return null)
- Removed stream-ending fade/blur/translate animation (caused visible flash)
- Streaming bubble stays in place until unmounted, static message takes over seamlessly

Thinking panel:
- Auto-collapse immediately when thinking completes (no 300ms delay)
- Removed red border from active summary bar
- Removed erase animation from FlowThought (was invisible due to collapse)
- start_progress emits status type instead of thinking (prevents cursors on status lines)

CSS cleanup:
- Consolidated .thinking-dots animation to single global rule in index.css
- Removed duplicate rules from AgentActivity.css and MessageBubble.css
- Removed dead .flow-thought-spinner CSS and reduced-motion override
- Removed dead .loading-message, .thinking-display, .thinking-cursor CSS
- Slower dot animation: 2.4s cycle with ease-in-out for relaxed pulse

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove orphaned .msg-entering CSS class (no longer referenced after transition fix)
- Use var(--text-muted) for thinking indicator color (was hardcoded white, invisible in light theme)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The default model was changed from Qwen3-Coder-30B-A3B-Instruct-GGUF
to Qwen3.5-35B-A3B-GGUF in database.py but the test wasn't updated.
@github-actions github-actions bot added llm LLM backend changes tests Test changes labels Mar 19, 2026
kovtcharov and others added 2 commits March 18, 2026 23:32
The implementation was changed to emit {"type": "status", "message": ...}
instead of {"type": "thinking", "content": ...} but tests weren't updated.
- AgentActivity panel always starts collapsed (thinking text in header instead)
- Summary bar uses stable step count label (no THINKING → 1 STEP text swap)
- Consistent Zap icon always (no spinner → icon swap on transition)
- Removed active/done CSS differences (no padding/font/border/margin changes)
- Immediate auto-collapse when thinking completes (no 300ms delay)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kovtcharov kovtcharov added this pull request to the merge queue Mar 19, 2026
@kovtcharov kovtcharov removed this pull request from the merge queue due to a manual request Mar 19, 2026
@kovtcharov kovtcharov added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit 25c6d25 Mar 19, 2026
37 checks passed
@kovtcharov kovtcharov deleted the kalin/fix-agent-ui-docs branch March 19, 2026 15:24
itomek added a commit that referenced this pull request Mar 23, 2026
PR #566 squash-merged a stale branch that had resolved merge conflicts by
keeping older file versions, reverting 3 previously-merged PRs from main:
- PR #564: TOCTOU upload locking security fix
- PR #565: Tool execution guardrails with confirmation popup
- PR #568: Agent UI overhaul (CSS design system, animations, UX polish)

Follow-up PRs #593/#604/#605 partially restored functionality. This PR
restores all remaining missing changes while preserving those follow-ups.

Changes:
- 24 files: clean restore from pre-revert commit (CSS, components, utils)
- Security: restore per-file asyncio.Lock upload guard (dependencies.py,
  documents.py, server.py)
- SSE handler: restore <think> block state machine, UUID-scoped confirms,
  timeout parameter, friendly error messages
- Frontend: restore AnimatedPresence, session hash badge, smooth streaming
  exit, custom model override UI, terminal typing animation, inference stats
- Backend: restore custom_model DB override, Lemonade stats fetching,
  friendlier user-facing error messages
- Tests: 497 passing, TypeScript build clean (1845 modules)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
itomek added a commit that referenced this pull request Mar 23, 2026
PR #566 squash-merged a stale branch that had resolved merge conflicts by
keeping older file versions, reverting 3 previously-merged PRs from main:
- PR #564: TOCTOU upload locking security fix
- PR #565: Tool execution guardrails with confirmation popup
- PR #568: Agent UI overhaul (CSS design system, animations, UX polish)

Follow-up PRs #593/#604/#605 partially restored functionality. This PR
restores all remaining missing changes while preserving those follow-ups.

Changes:
- 24 files: clean restore from pre-revert commit (CSS, components, utils)
- Security: restore per-file asyncio.Lock upload guard (dependencies.py,
  documents.py, server.py)
- SSE handler: restore <think> block state machine, UUID-scoped confirms,
  timeout parameter, friendly error messages
- Frontend: restore AnimatedPresence, session hash badge, smooth streaming
  exit, custom model override UI, terminal typing animation, inference stats
- Backend: restore custom_model DB override, Lemonade stats fetching,
  friendlier user-facing error messages
- Tests: 497 passing, TypeScript build clean (1845 modules)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
github-merge-queue bot pushed a commit that referenced this pull request Mar 23, 2026
… (#608)

## Summary

PR #566 was accidentally merged with stale conflict resolutions that
reverted 3 previously-merged PRs. Follow-up PRs #593/#604/#605 partially
restored functionality. This PR restores all remaining missing changes.

**Root cause:** During a `git merge origin/main` into the branch (commit
`f07b932`), conflict resolution kept the branch's older file versions,
discarding work from 3 PRs. The squash merge then propagated this to
main.

**Reverted PRs restored by this PR:**
- **#564** — TOCTOU race condition fix: per-file `asyncio.Lock` for
document uploads (`dependencies.py`, `routers/documents.py`,
`server.py`)
- **#565** — Tool execution guardrails: `<think>` block state machine,
UUID-scoped confirms, inference stats, custom model override, friendly
error messages (`sse_handler.py`, `_chat_helpers.py`, `models.py`)
- **#568** — Agent UI overhaul: CSS design system (glassmorphism,
animations), AnimatedPresence, session hash badge, smooth streaming
exit, terminal typing animation, custom model override UI,
`appendThinkingContent`, `format.ts` utilities (`App.tsx`,
`ChatView.tsx`, `AgentActivity.tsx`, `SettingsModal.tsx/css`,
`WelcomeScreen.tsx/css`, `Sidebar.tsx/css`, `MessageBubble.tsx/css`,
`chatStore.ts`, 12 other CSS files, `shell_tools.py`, `database.py`)

**Preserved follow-up PR additions:**
- #593: Device support banners, processor name display, Lemonade hints
- #604: `permission_request` events, `confirmTool` API, `fileList`
pass-through, PermissionPrompt
- #605: RAG indexing guards

## Test plan

- [x] `python -m pytest tests/unit/chat/ui/ --tb=short` — 497 passed
- [x] `python util/lint.py --black --isort` — all checks pass
- [x] `npm run build` in `src/gaia/apps/webui/` — 1,845 modules, no
TypeScript errors
- [ ] Smoke test: `gaia chat --ui` — verify UI loads, settings modal
shows custom model override, welcome screen has typing animation, chat
streams correctly
- [ ] Verify concurrent document uploads use per-file locking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent system changes documentation Documentation changes electron Electron app changes eval Evaluation framework changes llm LLM backend changes performance Performance-critical changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants