Skip to content

Chat UX: streaming feedback, remove Action Timeline, fix history leak#13

Open
davewaring wants to merge 6 commits intomainfrom
fix/hide-action-timeline
Open

Chat UX: streaming feedback, remove Action Timeline, fix history leak#13
davewaring wants to merge 6 commits intomainfrom
fix/hide-action-timeline

Conversation

@davewaring
Copy link
Copy Markdown
Contributor

Summary

  • Remove Action Timeline card (D33) — internal tool call lifecycle display removed; no user value, made UI feel frozen during onboarding
  • Show typing feedback throughout entire AI response — "Thinking..." and tool status ("Reading/Writing from your library...") now visible for the full duration the AI is working, not just before text starts streaming
  • Hide typing indicator during approval wait — the AI isn't thinking while waiting for user input
  • Show tool status after approval — "Writing to your library..." instead of "Approval approved"
  • Fix conversation history leaking between projects — previous project's history no longer briefly appears when switching projects

Files changed

  • client_web/src/components/chat/ChatPanel.tsx — removed Action Timeline section, updated typing indicator logic
  • client_web/src/api/useGatewayChat.ts — fixed conversation history isolation, improved approval status feedback

Test plan

  • Switch between all projects — verify each shows only its own conversation history
  • Send a message that triggers tool calls — verify no Action Timeline card appears
  • During AI processing — verify "Thinking..." or tool status shows throughout
  • When approval card appears — verify no typing indicator below it
  • After approving a write — verify "Writing to your library..." shows (not "Approval approved")
  • Verify streaming text still appears normally

🤖 Generated with Claude Code

davewaring and others added 6 commits March 29, 2026 08:38
Two UX fixes for the chat experience:

1. Remove the Action Timeline card entirely — it shows operational
   detail (tool calls, approval results) that has no user value and
   makes the UI feel frozen during onboarding.

2. Keep tool status feedback ("Reading from your library...",
   "Writing to your library...") visible even after text has started
   streaming. Previously, the typing indicator disappeared once the
   first text-delta arrived, leaving the user with no feedback during
   subsequent tool calls (like writing the spec/plan).

Before: isTyping = isLoading && !hasStartedAssistantReply
After:  isTyping = isLoading && (!hasStartedAssistantReply || !!toolStatus)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When switching to a project with no saved conversation (draft mode),
use empty messages instead of externalMessages, which may be stale
from the previous project's history that hasn't cleared yet.

This fix was on the onboarding-flow-updates branch but was lost when
we created the clean fix/hide-action-timeline branch from main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous fix only handled draft projects (null conversationId).
Projects WITH saved conversations had the same race condition:
when the cacheKey effect runs, externalMessages still holds the
previous project's history because setHistoryMessages([]) hasn't
re-rendered yet.

Fix: always start with empty messages on conversation switch.
The secondary effect at line 199 applies the correct history
once the async fetch completes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously, the typing indicator disappeared once text started
streaming. If the AI paused between text and tool calls (e.g.,
deciding to write spec/plan), the UI showed nothing — felt frozen.

Now shows "Thinking..." or tool status ("Writing to your library...")
for the entire duration the AI is loading. Composer stop button
behavior preserved (only shows before text starts).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Don't show "Thinking..." when the AI is blocked on a pending
approval card — the AI isn't thinking, it's waiting for the user.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After user approves a tool call, show the friendly tool status
("Writing to your library...") instead of "Approval approved".
The user cares about what's happening, not the approval mechanics.

- resolveApproval: captures tool name before removing approval,
  sets toolStatus to the tool name (not "Approval {decision}")
- approval-request event: sets toolStatus to tool name directly
  (not "Approval required: tool_name") so formatToolStatus works
- approval-result event: no longer sets toolStatus (resolveApproval
  already handled it)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant