Skip to content

feat: Chat UI, agent panel, model settings, and AI onboarding - #1024

Merged
malibio merged 1 commit into
mainfrom
feature/issue-1003-frontend-chat-ui
Apr 3, 2026
Merged

malibio merged 1 commit into
mainfrom
feature/issue-1003-frontend-chat-ui

Conversation

@malibio

@malibio malibio commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Complete frontend for AI agent interaction with mock backends
  • ChatPanel with streaming messages, AgentSelector, AiOnboardingDialog
  • ModelManager settings, reactive Svelte 5 stores (chat, agents, models)
  • Keyboard shortcuts (Enter send, Shift+Enter newline)

Closes #1003

Co-Authored-By: Claude [email protected]

…1003)

Implements the complete frontend for interacting with local and external
AI agents. Includes ChatPanel with streaming messages, AgentSelector,
AiOnboardingDialog, ModelManager settings, and reactive Svelte 5 stores
for chat, agents, and models (with mock backends for now).

Co-Authored-By: Claude <[email protected]>
@malibio
malibio merged commit 556e053 into main Apr 3, 2026
@malibio
malibio deleted the feature/issue-1003-frontend-chat-ui branch April 3, 2026 22:55
@malibio

malibio commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator Author

Post-Merge Code Review: PR #1024 (Chat UI, agent panel, model settings, AI onboarding)

Verdict: Clean -- no critical issues found. Well-structured UI code with mock data.

Findings

[Improvement] ToolCallDisplay.svelte -- $derived used as function instead of value

File: packages/desktop-app/src/lib/components/chat/ToolCallDisplay.svelte (lines ~1210-1230 in the diff)

argsPreview and resultPreview are defined with $derived(() => { ... }) -- this makes them derived functions, not derived values. They're called as argsPreview() and resultPreview() in the template. This works but is unconventional in Svelte 5 -- typically $derived(expression) yields a value and $derived.by(() => expression) is used for computed values via function. Verify this is intentional; if the getter is expensive, consider memoizing with $derived.by.

[Improvement] ChatStore streaming mock mutates assistantMessage.content directly

File: packages/desktop-app/src/lib/stores/chat-store.svelte.ts (line ~2047 in the diff)

The streaming mock does assistantMessage.content += separator + words[i] then reassigns the array. The direct mutation of assistantMessage.content before the array spread is fine for the mock, but when wiring to the real backend, ensure the pattern uses only immutable updates for Svelte 5 reactivity correctness.

Notes

  • Good separation of concerns: stores (agent-store, chat-store, model-store) are cleanly separated from UI components.
  • All stores use createLogger per project standards.
  • Proper ARIA attributes on all interactive elements (combobox role, aria-expanded, role=listbox, etc.).
  • Mock data is clearly labeled and follows the pattern described in CLAUDE.md.
  • Tab system correctly extended with 'chat' type.
  • Navigation sidebar properly handles AI Chat tab creation/activation.
  • 4 test files covering keyboard behavior, store logic, and chat message rendering.
  • formatBytes utility is well-tested and exported for reuse.

No follow-up fixes required. The $derived pattern is a minor readability nit.

malibio added a commit that referenced this pull request Jun 22, 2026
…1003) (#1024)

Implements the complete frontend for interacting with local and external
AI agents. Includes ChatPanel with streaming messages, AgentSelector,
AiOnboardingDialog, ModelManager settings, and reactive Svelte 5 stores
for chat, agents, and models (with mock backends for now).

Co-authored-by: Michael Libio <[email protected]>
Co-authored-by: Claude <[email protected]>
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.

Frontend: Chat UI, agent panel, model settings, and AI onboarding

1 participant