20 Commits

Author SHA1 Message Date
Ken 11b3bc2bbf fix: chat functionality and extended thinking handling
Deploy Research Workbench / deploy (push) Failing after 14m1s
- bundle/bundle.md: Add provider-anthropic with source URL and orchestrator config override
  to disable extended_thinking (foundation enables it by default, causes empty text
  responses for simple queries)
- Dockerfile: Add amplifier-module-provider-anthropic pip install for container
- backend/agui_adapter.py: Fix thinking block handling and empty text block rendering
  - Thinking blocks no longer fall through to text handler
  - Text blocks only emit START when actual content arrives
  - Handle amplifierd wire format (block_index/block_type, complete text in content_block:end)
- frontend/src/hooks/useChat.ts: Reset assistantId on TEXT_MESSAGE_END to prevent stale
  message IDs across turns
- tests/test_agui_adapter.py: Add extended thinking test coverage

Chat functionality now works end-to-end. Verified: login -> create session -> send message -> receive AI response visible in chat UI.

Generated with Amplifier
2026-05-27 01:42:52 +00:00
Ken 389a8fb655 refactor: extract parseA2UIBlocks to lib/a2ui.ts; remove unused import re
- Extract parseA2UIBlocks() from A2UIRenderer.tsx into its own
  frontend/src/lib/a2ui.ts module to satisfy react-refresh/only-export-
  components ESLint rule (A2UIRenderer should only export React components)
- Update ChatPanel.tsx and test files to import from lib/a2ui
- Split ChatPanel.test.tsx mock: separate vi.mock for lib/a2ui
  (parseA2UIBlocks) and A2UIRenderer (component only)
- Remove unused 'import re' from tests/test_runtime_html.py (ruff F401)

All 216 frontend tests and 242 bash tests still pass. TypeScript and
Vite builds are clean. Remaining ESLint warnings (react-hooks/set-state-
in-effect in MCPAppRenderer and useSessions) are pre-existing patterns
not introduced by Phase 3.
2026-05-26 21:14:10 +00:00
Ken 2c3cfdbedc fix: resolve code review issues — schema mismatch, test fixes, pop-out render
- Fix a2ui-format.md schema to match renderer: rename 'options' → 'filters' in
  filters block, replace 'active: boolean' with 'value: string' in filter options,
  update form select options from string[] to {label, value}[] objects (Critical #1)
- Fix 3 failing tests in test_researcher_agent.sh to use @mention paths without .md
  extension (Important #2)
- Complete pop-out feature in VisualBlock.handlePopOut() by posting render message
  to popup window after 500ms initialization delay (Important #3)
- Update test_context_files.sh to match new a2ui-format.md schema (filters array
  key check, value field check)
2026-05-26 20:54:58 +00:00
Ken b895a1c94b feat: wire RightPanel with Browser + Artifacts, add A2UI rendering to chat
- RightPanel: replace placeholder content with BrowserPanel + ArtifactsPanel
  components, routing sessionId to whichever tab is active
- ChatPanel: import A2UIRenderer + parseA2UIBlocks; render A2UI blocks between
  markdown and tool-call cards in assistant messages; onAction sends
  '[action] {json}' back via onSend
- ChatPanel: add parseVisualBlocks() helper, VisualBlock wrapper component
  (loads runtime.html via MCPAppRenderer, view-source toggle, pop-out),
  rendered after A2UI blocks in assistant messages
- MCPAppRenderer: on ui/initialize route runtime='visual-artifact' data to a
  render dispatch instead of tool/input; add render forwarding case
- Fix pre-existing TS6133 unused-import errors in A2UIRenderer + BrowserPanel test
- All 216 tests pass; npm run build succeeds
2026-05-26 20:43:28 +00:00
Ken ab99259bcc feat: A2UI renderer for filters, tables, cards, forms 2026-05-26 20:29:42 +00:00
Ken a3635a9eb7 feat: artifacts panel with tabbed markdown rendering 2026-05-26 20:24:12 +00:00
Ken c1533fe25c feat: browser panel with noVNC iframe 2026-05-26 20:19:39 +00:00
Ken b2a278762b fix: remove unused refresh destructure from App.tsx after review fix
The prior review fix (#4) removed the redundant `await refresh()` call from
the onCreate handler, but left `refresh` in the useSessions() destructure.
TypeScript (noUnusedLocals) flagged it as an error, breaking the build.

Remove the unused binding to restore a clean build.
2026-05-26 19:48:40 +00:00
Ken 8e69ac185e fix: address code review findings from Phase 2 final review
- ChatPanel: add 'chat-message ${role}' CSS classes to message wrappers
  so .chat-message.user and .chat-message.assistant rules apply correctly
- LoginPage: rename className 'login-error' -> 'error' to match the
  .login-card .error selector in globals.css
- MCPAppRenderer: verify event.source matches iframe contentWindow before
  processing postMessage to close cross-window injection vector
- App: remove redundant await refresh() after createNew() since
  createNew() already calls refresh() internally
- useArtifacts: wrap listArtifacts call in try/catch with console.error,
  matching the error-handling pattern already used in useSessions
2026-05-26 19:46:38 +00:00
Ken 9d118d60ce feat: wire MCPAppRenderer into ChatPanel for MCP App tool results 2026-05-26 19:39:34 +00:00
Ken 12d1df417f feat: MCPAppRenderer for inline MCP App iframes with JSON-RPC postMessage bridge 2026-05-26 19:36:28 +00:00
Ken 3723c5bf93 feat: App shell with login, session sidebar, chat panel, right panel
- Create RightPanel component with browser/artifacts tab switching
- Replace App.tsx with 3-column layout (auth loading/login/app states)
- Replace main.tsx with globals.css import (remove index.css)
- Remove Vite template files (App.css, index.css, assets/react.svg)
- Fix LoginPage.tsx FormEvent type-only import for verbatimModuleSyntax
- Fix vite.config.ts to use vitest/config for proper test property typing
- Add tests: RightPanel (10 tests), App rendering states (7 tests)
2026-05-26 19:34:07 +00:00
Ken 3b01753336 feat: chat panel with SSE streaming and tool call cards 2026-05-26 19:28:12 +00:00
Ken c24fd11f03 feat: session sidebar component with create, select, logout 2026-05-26 19:20:37 +00:00
Ken 77fe2bafd4 feat: login page component 2026-05-26 19:17:16 +00:00
Ken c24fd035eb feat: API client and hooks for auth, sessions, chat SSE, artifacts 2026-05-26 19:13:46 +00:00
Ken 5069676914 feat: global styles with Tabler dark theme, 3-column layout 2026-05-26 19:08:49 +00:00
Ken e1e001c7e0 feat: TypeScript types for sessions, artifacts, A2UI, tool calls, auth 2026-05-26 19:06:01 +00:00
Ken 64b18613e1 feat: scaffold Vite + React + TypeScript frontend 2026-05-26 19:03:56 +00:00
Ken 04ae443207 chore: remove old car-help files, prepare new structure 2026-05-26 18:16:07 +00:00