Skip to content

Feat/261#213

Open
conradmugabe wants to merge 39 commits into
mainfrom
feat/261
Open

Feat/261#213
conradmugabe wants to merge 39 commits into
mainfrom
feat/261

Conversation

@conradmugabe

@conradmugabe conradmugabe commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • Tests were added/updated according to the feature/bugfix/change made
  • Version was rolled according to semver requirements
  • API endpoints openapi schema was updated if applicable

Changes

  • Added tool streaming to the chat
Screencast.from.2026-06-01.04-45-52.mp4

conradmugabe and others added 29 commits April 1, 2026 02:40
Wire the existing MentorSettings.show_reasoning API field into the agent
Settings tab as a Switch, mirroring the forkable/Copies toggle (form field,
default from mentor?.show_reasoning, and submit payload). Includes unit tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…already streaming

The 'Just a sec...' LoadingMessage gate only checked the current stream's
content, so a flaky socket that retries/duplicates a generation rendered it
next to a bubble already streaming (or finished). Add a single
showLoadingMessage gate that also hides it when the current stream has
reasoning/tool output or the last assistant message already shows any output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy/feedback/share/report/retry only make sense on a finished response.
Hide the toolbar via a 'hidden' class when isCurrentlyStreaming is true (kept
mounted, not unmounted, so the copy-button ref the post-stream focus logic
relies on stays valid). Buttons reappear once the message completes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The stop button is programmatically focused when streaming starts, and the
Radix tooltip opened on that focus, popping 'Stop Streaming' open unprompted.
Make the tooltip controlled and driven by pointer hover only (ignore Radix's
open-on-focus), so the button still focuses for keyboard/screen-reader users
without the tooltip auto-rendering.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	.claude/settings.json
#	components/chat/stop-streaming-button.tsx
#	components/modals/edit-mentor-modal/tabs/settings-tab.tsx
#	e2e/COVERAGE.md
#	e2e/page-objects/chat.page.ts
User-facing label only — the show_reasoning API field is unchanged. Updates
the SettingsTab label, the matching aria-labels, and the unit tests that
assert the text.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AuthProvider from @iblai/web-utils@1.9.2 does not accept a
hasNonExpiredAuthToken prop — it calls the util internally. Passing it
broke `tsc --noEmit` (TS2322). The Tauri-offline guard it wrapped is
already covered by the existing `skip` prop, which short-circuits the
provider before any auth check runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@conradmugabe conradmugabe requested a review from sonegillis1 June 1, 2026 01:40

@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 7 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 409 checkpoints (+7)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

The "Verbose Reasoning" (show_reasoning) per-mentor setting now acts as
the master switch for both verbose surfaces in AI messages. When it is
off, neither the reasoning section ("Thinking/Thought") nor the
tool-call indicator ("Used N tools") renders.

- useMentorSettings exposes showReasoning (reads show_reasoning from
  mentor/public settings, defaults to false)
- Chat threads it through ChatMessages -> AIMessageBubble, which gates
  both <ReasoningSection> and <ToolCallIndicator>
- e2e journey 46 enables the toggle (new SettingsTab.setVerboseReasoning
  page-object helper) before asserting the verbose UI, plus a new
  checkpoint verifying the UI stays hidden when the toggle is off
- unit tests updated for the gating in ai-message-bubble,
  chat-messages, and use-mentor-settings suites

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mamigot

mamigot commented Jun 2, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing PR #213 for e2e test coverage requirements.

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from bot (none found)
  • Identify what changed (no new page.tsx routes, has new e2e spec + coverage updates)
  • Run mechanical coverage check (PASSED - coverage improved 402 → 410 checkpoints)
  • Read current coverage state (coverage files updated by developer)
  • Apply decision logic and post GitHub review (APPROVED)

Analysis:

  • No new page.tsx routes added
  • New e2e spec: e2e/journeys/46-tool-call-indicator-and-reasoning.spec.ts
  • Coverage files updated: e2e/coverage.json and e2e/COVERAGE.md
  • Changes are primarily to chat components and tool functionality
  • Mechanical check: ✅ PASSED (coverage improved +8 checkpoints)
  • Coverage mapping: All 24 app pages mapped (100%)

Decision: This falls under Case C - new feature added, e2e spec added, AND coverage files already updated by developer. Coverage files are correctly updated and all checks passed.

GitHub Review: ✅ APPROVED - New tool streaming functionality is covered and coverage files are up to date.


@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 8 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 410 checkpoints (+8)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

With Verbose Reasoning off, the reasoning section and tool-call indicator
are hidden. While a response was still streaming (no text yet) this left
the assistant bubble rendering as an empty gray box, and the hidden
reasoning/tool-call stream also suppressed the typing indicator — so the
user saw an empty bubble and no loading dots.

- AIMessageBubble returns null when it has nothing visible to show (no
  text, no visible reasoning/tool surface, no actions, no artifact preview)
- the loading-message logic only counts reasoning/tool-call streams as
  output when Verbose Reasoning is enabled, so the typing indicator shows
  during the thinking phase when the toggle is off
- adds an "empty bubble suppression" unit-test suite

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mamigot

mamigot commented Jun 2, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing PR #213 for e2e test coverage requirements.

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from bot (none found)
  • Identify what changed (no new page.tsx routes, has new e2e spec + coverage updates)
  • Run mechanical coverage check (PASSED - coverage improved 402 → 410 checkpoints)
  • Read current coverage state (coverage files updated by developer)
  • Apply decision logic and post GitHub review (APPROVED)

Analysis:

  • No new page.tsx routes added
  • New e2e spec: e2e/journeys/46-tool-call-indicator-and-reasoning.spec.ts
  • Coverage files updated: e2e/coverage.json and e2e/COVERAGE.md
  • Changes are primarily to chat components and tool functionality
  • Mechanical check: ✅ PASSED (coverage improved +8 checkpoints)
  • Coverage mapping: All 24 app pages mapped (100%)

Decision: This falls under Case C - new feature added, e2e spec added, AND coverage files already updated by developer. Coverage files are correctly updated and all checks passed.

GitHub Review: ✅ APPROVED - New tool streaming functionality is covered and coverage files are up to date.


@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 8 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 410 checkpoints (+8)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

@mamigot

mamigot commented Jun 2, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing PR #213 for e2e test coverage requirements.

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from bot (none found)
  • Identify what changed (no new page.tsx routes, has new e2e spec + coverage updates)
  • Run mechanical coverage check (PASSED - coverage improved 402 → 410 checkpoints)
  • Read current coverage state (coverage files updated by developer)
  • Apply decision logic and post GitHub review (APPROVED)

Analysis:

  • No new page.tsx routes added
  • New e2e spec: e2e/journeys/46-tool-call-indicator-and-reasoning.spec.ts
  • Coverage files updated: e2e/coverage.json and e2e/COVERAGE.md
  • Changes are primarily to chat components and tool functionality
  • Mechanical check: ✅ PASSED (coverage improved +8 checkpoints)
  • Coverage mapping: All 24 app pages mapped (100%)

Decision: This falls under Case C - new feature added, e2e spec added, AND coverage files already updated by developer. Coverage files are correctly updated and all checks passed.

GitHub Review: ✅ APPROVED - New tool streaming functionality is covered and coverage files are up to date.


@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 8 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 410 checkpoints (+8)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

@conradmugabe conradmugabe added run-tests Trigger PR validation pipeline and removed run-tests Trigger PR validation pipeline labels Jun 2, 2026
@conradmugabe conradmugabe removed the run-tests Trigger PR validation pipeline label Jun 3, 2026
@mamigot

mamigot commented Jun 3, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing PR #213 for e2e test coverage requirements.

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from bot (none found)
  • Identify what changed (no new page.tsx routes, has new e2e spec + coverage updates)
  • Run mechanical coverage check (PASSED - coverage improved 402 → 410 checkpoints)
  • Read current coverage state (coverage files updated by developer)
  • Apply decision logic and post GitHub review (APPROVED)

Analysis:

  • No new page.tsx routes added
  • New e2e spec: e2e/journeys/46-tool-call-indicator-and-reasoning.spec.ts
  • Coverage files updated: e2e/coverage.json and e2e/COVERAGE.md
  • Changes are primarily to chat components and tool functionality
  • Mechanical check: ✅ PASSED (coverage improved +8 checkpoints)
  • Coverage mapping: All 24 app pages mapped (100%)

Decision: This falls under Case C - new feature added, e2e spec added, AND coverage files already updated by developer. Coverage files are correctly updated and all checks passed.

GitHub Review: ✅ APPROVED - New tool streaming functionality is covered and coverage files are up to date.


@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 8 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 410 checkpoints (+8)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

@conradmugabe conradmugabe added the run-tests Trigger PR validation pipeline label Jun 3, 2026
conradmugabe and others added 3 commits June 3, 2026 23:40
…e completes

isCurrentlyStreaming was derived solely from
`message.id === currentStreamingMessageId`, but currentStreamingMessageId keeps
pointing at the last assistant message after the stream ends. As a result the
tool-call indicator's bounce dots animated indefinitely and the action toolbar
(copy/retry/rating) stayed hidden once a response completed. Gate
isCurrentlyStreaming on the isStreaming flag so it is only true while a stream
is actually active.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Implement LlmTab.selectProviderAndModel (the reasoning/combined specs
  referenced it but it did not exist); match the model button by exact name
  since model names are prefixes of one another (gpt-5 vs gpt-5.1), and drop
  the broken setProvider/setModel.
- Pin the agent LLM to gpt-5 in the web-search and reasoning tests and to
  gpt-4o in the non-reasoning test. New mentors default to a provider without
  working credentials in this tenant, so the agent never responded.
- Explicitly turn Verbose Reasoning OFF in the toggle-off test (new mentors
  default it ON).
- Make transient streaming-state assertions robust: only assert the tool-call
  bounce dots while the stream is still active, and measure the reasoning/
  tool-call DOM ordering on the settled "Thought" button after streaming.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mamigot

mamigot commented Jun 3, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing PR #213 for e2e test coverage requirements.

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from bot (none found)
  • Identify what changed (no new page.tsx routes, has new e2e spec + coverage updates)
  • Run mechanical coverage check (PASSED - coverage improved 402 → 410 checkpoints)
  • Read current coverage state (coverage files updated by developer)
  • Apply decision logic and post GitHub review (APPROVED)

Analysis:

  • No new page.tsx routes added
  • New e2e spec: e2e/journeys/46-tool-call-indicator-and-reasoning.spec.ts
  • Coverage files updated: e2e/coverage.json and e2e/COVERAGE.md
  • Changes are primarily to chat components and tool functionality
  • Mechanical check: ✅ PASSED (coverage improved +8 checkpoints)
  • Coverage mapping: All 24 app pages mapped (100%)

Decision: This falls under Case C - new feature added, e2e spec added, AND coverage files already updated by developer. Coverage files are correctly updated and all checks passed.

GitHub Review: ✅ APPROVED - New tool streaming functionality is covered and coverage files are up to date.


@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 8 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 410 checkpoints (+8)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

@conradmugabe conradmugabe removed the run-tests Trigger PR validation pipeline label Jun 5, 2026
@mamigot

mamigot commented Jun 5, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing PR #213 for e2e test coverage requirements.

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from bot (none found)
  • Identify what changed (no new page.tsx routes, has new e2e spec + coverage updates)
  • Run mechanical coverage check (PASSED - coverage improved 402 → 410 checkpoints)
  • Read current coverage state (coverage files updated by developer)
  • Apply decision logic and post GitHub review (APPROVED)

Analysis:

  • No new page.tsx routes added
  • New e2e spec: e2e/journeys/46-tool-call-indicator-and-reasoning.spec.ts
  • Coverage files updated: e2e/coverage.json and e2e/COVERAGE.md
  • Changes are primarily to chat components and tool functionality
  • Mechanical check: ✅ PASSED (coverage improved +8 checkpoints)
  • Coverage mapping: All 24 app pages mapped (100%)

Decision: This falls under Case C - new feature added, e2e spec added, AND coverage files already updated by developer. Coverage files are correctly updated and all checks passed.

GitHub Review: ✅ APPROVED - New tool streaming functionality is covered and coverage files are up to date.

@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 8 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 410 checkpoints (+8)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

@conradmugabe conradmugabe added the run-tests Trigger PR validation pipeline label Jun 5, 2026
The role+name selector (getByRole textbox "Ask anything") races against the
textarea's aria-labelledby briefly failing to resolve during the Redux
re-render after an edit-mentor modal close, blanking the accessible name and
making the locator match nothing (journey 46 after editMentorPage.close()).
Switch chatPage.chatInput to the stable #chat-input-textarea id, matching
journeys 42 and 29.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mamigot

mamigot commented Jun 5, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Review ✅

Reviewing PR #213 for e2e test coverage requirements.

Todo List:

  • Dismiss stale REQUEST_CHANGES reviews from bot (none found)
  • Identify what changed (no new page.tsx routes, has new e2e spec + coverage updates)
  • Run mechanical coverage check (PASSED - coverage improved 402 → 410 checkpoints)
  • Read current coverage state (coverage files updated by developer)
  • Apply decision logic and post GitHub review (APPROVED)

Analysis:

  • No new page.tsx routes added
  • New e2e spec: e2e/journeys/46-tool-call-indicator-and-reasoning.spec.ts
  • Coverage files updated: e2e/coverage.json and e2e/COVERAGE.md
  • Changes are primarily to chat components and tool functionality
  • Mechanical check: ✅ PASSED (coverage improved +8 checkpoints)
  • Coverage mapping: All 24 app pages mapped (100%)

Decision: This falls under Case C - new feature added, e2e spec added, AND coverage files already updated by developer. Coverage files are correctly updated and all checks passed.

GitHub Review: ✅ APPROVED - New tool streaming functionality is covered and coverage files are up to date.


@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ E2E Coverage — All Good

New tool streaming functionality is covered and coverage files are up to date.

What was added:

  • Tool call indicator and reasoning section components
  • New e2e journey spec: 46-tool-call-indicator-and-reasoning.spec.ts
  • 8 new checkpoints covering tool streaming UI behaviors

Coverage check result:

  • ✅ Coverage improved: 402 → 410 checkpoints (+8)
  • ✅ All 24 app routes remain mapped (100% coverage)
  • ✅ No regression detected

The developer correctly updated both e2e/coverage.json and e2e/COVERAGE.md to reflect the new tool streaming test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger PR validation pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants