Commit Graph

15 Commits

Author SHA1 Message Date
Nicolas Varrot
2b1ca2d0c8 feat: add collapse/expand all tool calls toggle button
Adds a floating button in the chat area that lets users collapse or expand
all tool call details at once. Useful for long conversations with many tool
calls where scrolling through expanded results is tedious.

- New ToolCollapseContext provides global collapse/expand state
- ToolCall components react to global state changes via version tracking
- Toggle button appears only when conversation has tool calls
- Supports EN/FR i18n
2026-02-12 19:36:53 +00:00
Nicolas Varrot
8ef1b428a3 fix: mobile viewport overflow — prevent horizontal clipping on iPhone
- Add overflow-x: hidden on html/body and max-width: 100vw
- Add overflow-x: hidden on root app container
- Add overflow-x: hidden on chat scroll container
- Make markdown tables scrollable with display: block + overflow-x: auto
- Add overflow-hidden + min-w-0 on expanded tool call content
- Fix tool result summary max-width from max-w-md to max-w-full

Fixes #26
2026-02-12 12:42:20 +00:00
Nicolas Varrot
f2038a2022 feat: auto-focus chat input on session switch and connection 2026-02-12 10:17:05 +00:00
Nicolas Varrot
cb882f5ead feat: add loading indicator when switching sessions
Show a spinner with 'Loading messages…' text while chat history
is being fetched during session switches, instead of briefly
flashing the empty welcome screen. Includes EN/FR i18n.
2026-02-12 05:52:06 +00:00
Nicolas Varrot
29482e377a fix: resolve ESLint errors for React compiler rules
- Chat.tsx: replace mutable variable in render IIFE with useMemo+reduce
  to satisfy react-hooks/immutability rule
- ConnectionBanner.tsx: move setState calls into a useCallback to avoid
  synchronous setState in effect body (react-hooks/set-state-in-effect)
- useGateway.ts: suppress set-state-in-effect for legitimate mount init
2026-02-12 01:42:40 +00:00
Nicolas Varrot
375bd102d4 feat: add date separators between messages from different days
Shows a subtle horizontal line with the date label (Today, Yesterday, or
full date) when messages span multiple days. Helps orient users when
scrolling through long conversation histories.

Includes i18n support (EN/FR) for the date labels.
2026-02-12 00:40:03 +00:00
Nicolas Varrot
5b2f3a340d feat: add retry/resend button on user messages
Hover over any user message to reveal a retry button (↻) that resends
the message text. Disabled while a response is generating.
Includes EN/FR i18n strings.
2026-02-11 21:56:48 +00:00
Nicolas Varrot
b56c80a454 feat: add scroll-to-bottom button when scrolled up in chat
Floating button appears when user scrolls away from the bottom of the
conversation, making it easy to jump back to the latest messages.
Includes i18n labels (EN/FR) and smooth scroll animation.
2026-02-11 17:56:09 +00:00
Nicolas Varrot
9b3aed4adc feat: add runtime language selector in header (EN/FR toggle)
- Add LanguageSelector component with globe icon + cycle button
- Refactor i18n to support reactive locale switching via useSyncExternalStore
- Locale priority: localStorage > VITE_LOCALE > navigator.language > 'en'
- All components now use useT() hook for reactive re-rendering on locale change
- Persists choice to localStorage (key: pinchchat-locale)
- No page reload needed — instant switch
2026-02-11 16:18:22 +00:00
Nicolas Varrot
3e7a5969e0 fix: smart auto-scroll — only scroll to bottom when user is near bottom
Previously, every message update forced a scroll to bottom, which was
disruptive when reading older messages in the history. Now the chat only
auto-scrolls if the user is within 150px of the bottom, or if they just
sent a message. This preserves scroll position when browsing history
while still following new streaming content.
2026-02-11 14:47:11 +00:00
Nicolas Varrot
99b7db9793 feat: add i18n support with VITE_LOCALE env var (en/fr)
- Lightweight i18n system in src/lib/i18n.ts (no external deps)
- All UI strings extracted to translation keys
- English (default) and French locales included
- Set VITE_LOCALE=fr in .env for French UI
- Fallback to English for unknown locales
2026-02-11 13:19:20 +00:00
Nicolas Varrot
8834b2ac36 fix: filter out NO_REPLY messages from chat display
NO_REPLY is an internal agent response that should not be visible
to users. Messages with content exactly matching 'NO_REPLY' are
now hidden from the chat view.
2026-02-11 12:31:07 +00:00
Nicolas Varrot
3370916931 fix: localize UI to English and add ARIA accessibility attributes
- Replace all French UI strings with English (Connected, Thinking, Result, Send, etc.)
- Add role="log" + aria-live="polite" to chat message area
- Add role="form" + aria-label to message input area
- Add aria-label to sidebar toggle, attach file, send, and textarea
- Add role="banner" to header, role="navigation" to sidebar
- Add role="application" to app root
2026-02-11 12:17:54 +00:00
Nicolas Varrot
d58c34fbd7 feat: rename ClawChat → PinchChat across entire project
- Update package.json name and repo URL
- Update README.md, CONTRIBUTING.md branding and links
- Update UI components (Header, Chat) display names
- Update gateway user-agent string
- Rename GitHub repo via API
- Mark FEEDBACK.md item #1 as done
2026-02-11 11:16:19 +00:00
Nicolas Varrot
1f8ff9ae0a Initial commit — ClawChat v1.0.0 2026-02-11 00:48:43 +00:00