feat(pipeline): add InputBar, ChatBubble, AvatarStatusIndicator, PipelineStepper and ObjectiveValidationCard

Shell and Agent 1 UI components per docs/Max_Composants_Frontend.md:

- InputBar: send on Enter, newline on Shift+Enter, mic toggle (STT
  itself stays in the main process).
- ChatBubble: max/user variants reusing the existing chat-bubble
  design-system classes, simple Markdown via react-markdown+remark-gfm.
- AvatarStatusIndicator: purely visual, no status computed here.
- PipelineStepper + utils/pipelineSteps.ts: the stepper itself only
  renders the `steps` prop as given (never computes status); the
  session.status -> step list derivation lives in a separate pure
  function the store/App call, per the doc's explicit rule that the
  component must never calculate status itself.
- ObjectiveValidationCard: single-field-at-a-time editing, locked and
  irreversible once onConfirm resolves.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-10-31 21:58:38 +01:00
co-authored by Claude Sonnet 5
parent ed32c21f24
commit 309db80add
14 changed files with 831 additions and 0 deletions
@@ -0,0 +1,32 @@
import { describe, it, expect } from 'vitest'
import { render, screen } from '@testing-library/react'
import ChatBubble from '../../../src/renderer/src/components/ChatBubble'
describe('<ChatBubble />', () => {
it('should render a Max message with the max variant class', () => {
const { container } = render(<ChatBubble role="max" content="Bonjour !" />)
expect(screen.getByText('Bonjour !')).toBeInTheDocument()
expect(container.querySelector('.chat-bubble--max')).toBeInTheDocument()
})
it('should render a user message with the user variant class', () => {
const { container } = render(<ChatBubble role="user" content="Salut" />)
expect(container.querySelector('.chat-bubble--user')).toBeInTheDocument()
})
it('should render simple markdown (bold, code)', () => {
const { container } = render(<ChatBubble role="max" content="**gras** et `code`" />)
expect(container.querySelector('strong')?.textContent).toBe('gras')
expect(container.querySelector('code')?.textContent).toBe('code')
})
it('should display the timestamp when provided', () => {
render(<ChatBubble role="max" content="x" timestamp={new Date('2026-01-01T10:30:00')} />)
expect(screen.getByText('10:30')).toBeInTheDocument()
})
it('should not render a time element when no timestamp is given', () => {
const { container } = render(<ChatBubble role="max" content="x" />)
expect(container.querySelector('time')).not.toBeInTheDocument()
})
})