Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 11, 2025

This PR attempts to address Issue #9163 by removing the redundant UI controls that appear when editing messages.

Problem

When editing a message, duplicate controls (ModeSelector, ApiConfigSelector, AutoApproveDropdown) appeared directly below the editing area, while the same controls already exist at the bottom of the chat UI.

Solution

  • Wrapped the bottom controls section in ChatTextArea.tsx with a conditional check {!isEditMode && (...)}
  • This ensures the controls are only shown in the main chat input area, not in the edit mode
  • The main controls at the bottom of the chat UI remain available for overall control

Changes

  • Modified webview-ui/src/components/chat/ChatTextArea.tsx to conditionally render bottom controls based on isEditMode prop

Testing

  • Build completed successfully
  • All tests passed (976 passed, 6 skipped)
  • TypeScript checks passed
  • Linting passed

Fixes #9163

Feedback and guidance are welcome!


Important

Fixes duplicate controls in ChatTextArea.tsx during message editing by conditionally rendering based on isEditMode.

  • Behavior:
    • Fixes duplicate controls (ModeSelector, ApiConfigSelector, AutoApproveDropdown) appearing during message editing in ChatTextArea.tsx.
    • Controls are now conditionally rendered based on isEditMode prop.
  • Testing:
    • Build and tests passed (976 passed, 6 skipped).
    • TypeScript checks and linting passed.

This description was created by Ellipsis for ca177cc. You can customize this summary. It will automatically update as commits are pushed.

- Hide ModeSelector, ApiConfigSelector, and AutoApproveDropdown when isEditMode is true
- Prevents redundant UI elements from appearing below the message editing area
- Keeps main controls at the bottom of the chat UI for overall control

Fixes #9163
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 11, 2025 16:24
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Nov 11, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 11, 2025

Rooviewer Clock   See task on Roo Cloud

Review completed. Found 1 issue that needs attention:

  • TTS stop button and utility controls are hidden during edit mode, preventing users from stopping audio playback while editing

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines +1213 to +1263
{!isEditMode && (
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 min-w-0 overflow-clip flex-1">
<ModeSelector
value={mode}
title={t("chat:selectMode")}
onChange={handleModeChange}
triggerClassName="text-ellipsis overflow-hidden flex-shrink-0"
modeShortcutText={modeShortcutText}
customModes={customModes}
customModePrompts={customModePrompts}
/>
<ApiConfigSelector
value={currentConfigId}
displayName={displayName}
disabled={selectApiConfigDisabled}
title={t("chat:selectApiConfig")}
onChange={handleApiConfigChange}
triggerClassName="min-w-[28px] text-ellipsis overflow-hidden flex-shrink"
listApiConfigMeta={listApiConfigMeta || []}
pinnedApiConfigs={pinnedApiConfigs}
togglePinnedApiConfig={togglePinnedApiConfig}
/>
<AutoApproveDropdown triggerClassName="min-w-[28px] text-ellipsis overflow-hidden flex-shrink" />
</div>
<div className={cn("flex flex-shrink-0 items-center gap-0.5", cloudUserInfo ? "" : "pr-2")}>
{isTtsPlaying && (
<StandardTooltip content={t("chat:stopTts")}>
<button
aria-label={t("chat:stopTts")}
onClick={() => vscode.postMessage({ type: "stopTts" })}
className={cn(
"relative inline-flex items-center justify-center",
"bg-transparent border-none p-1.5",
"rounded-md min-w-[28px] min-h-[28px]",
"text-vscode-foreground opacity-85",
"transition-all duration-150",
"hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]",
"focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder",
"active:bg-[rgba(255,255,255,0.1)]",
"cursor-pointer",
)}>
<VolumeX className="w-4 h-4" />
</button>
</StandardTooltip>
)}
<IndexingStatusBadge />
{cloudUserInfo && <CloudAccountSwitcher />}
</div>
</div>
</div>
)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hiding all bottom controls in edit mode removes access to the TTS stop button when isTtsPlaying is true. If a user is editing a message while TTS is playing, they won't be able to stop the audio playback. Consider moving the TTS stop button, IndexingStatusBadge, and CloudAccountSwitcher outside the !isEditMode conditional, or create a separate conditional that keeps these utility controls visible during edit mode.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Remove redundant double options when editing a message

3 participants