Skip to content

refactor: updated elevenLabs API module and remove button UX#6781

Merged
Abhijay007 merged 3 commits intoblock:mainfrom
Abhijay007:refactor/elevenLabsModule
Feb 11, 2026
Merged

refactor: updated elevenLabs API module and remove button UX#6781
Abhijay007 merged 3 commits intoblock:mainfrom
Abhijay007:refactor/elevenLabsModule

Conversation

@Abhijay007
Copy link
Collaborator

ref : #6557 (comment), #6557 (comment)

PR Description

updated elevenLabs API module and remove UX

Type of Change

  • Refactor / Code quality

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Tested In Desktop UI

Screenshots/Demos (for UX changes)

updateUXAPI

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the ElevenLabs API key settings UI in the desktop app by simplifying state management and removing some loading/validation UX.

Changes:

  • Simplifies initial key detection to a single useEffect check.
  • Switches save/remove flows to optimistic local state updates (no reload-based recheck).
  • Adjusts the UI to show a dedicated “Remove API Key” action outside edit mode and removes inline validation/error messaging.

@Abhijay007 Abhijay007 changed the title refactor: updated elevenLabs API module and remove UX refactor: updated elevenLabs API module and remove button UX Jan 28, 2026
Copy link
Collaborator

@lifeizhou-ap lifeizhou-ap left a comment

Choose a reason for hiding this comment

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

Thank you @Abhijay007 for this improvement!

@Abhijay007
Copy link
Collaborator Author

@DOsinga, could you please take a look at this as well? I believe it’s ready to be merged. I’m asking since you had initially mentioned the refactor in the other PR

@Abhijay007 Abhijay007 force-pushed the refactor/elevenLabsModule branch from b6ae3ab to aa0da6c Compare February 2, 2026 18:10
@Abhijay007
Copy link
Collaborator Author

Abhijay007 commented Feb 2, 2026

Hi @DOsinga , @lifeizhou-ap I updated this PR as during the recent refactor in this PR : #6844, it broke ElevenLabs by using ApiClient wrapper instead of direct HTTP client so I reverted that and updated remove button UX, which was requested before

@DOsinga
Copy link
Collaborator

DOsinga commented Feb 2, 2026

I'm sorry I refactored the entire way we do this over the weekend - the config now comes from the server, you'll have a terrible merge conflict on your hands

@Abhijay007
Copy link
Collaborator Author

Abhijay007 commented Feb 2, 2026

I'm sorry I refactored the entire way we do this over the weekend - the config now comes from the server, you'll have a terrible merge conflict on your hands

no problem I updated it , you can review it now :) @DOsinga

Copilot AI review requested due to automatic review settings February 2, 2026 18:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

crates/goose-server/src/routes/dictation.rs:270

  • The ElevenLabs multipart part creation discards the underlying reqwest error (map_err(|_| ...)), which makes failures harder to diagnose; preserve the original error message (as is done in transcribe_openai) when constructing the internal ErrorResponse.
    let part = reqwest::multipart::Part::bytes(audio_bytes)
        .file_name(format!("audio.{}", extension))
        .mime_str(mime_type)
        .map_err(|_| ErrorResponse::internal("Failed to create multipart"))?;

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

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

before we continue, can you make sure you merge in main? this looks different and sorry again for changing everything

@Abhijay007 Abhijay007 force-pushed the refactor/elevenLabsModule branch from 5e30bda to 12a3128 Compare February 2, 2026 18:32
@DOsinga
Copy link
Collaborator

DOsinga commented Feb 2, 2026

we have a merge queue now after some incidents, so it might take a tad longer to see the latest in main

@Abhijay007
Copy link
Collaborator Author

we have a merge queue now after some incidents, so it might take a tad longer to see the latest in main

Oh, okay so should we wait ? Like when I am taking pull, it is not reflecting for me

@DOsinga
Copy link
Collaborator

DOsinga commented Feb 2, 2026

hmm, what does your routers/dictation.rs ends on? mine has:

pub fn routes(state: Arc) -> Router {
Router::new()
.route("/dictation/transcribe", post(transcribe_dictation))
.route("/dictation/config", get(get_dictation_config))
.with_state(state)
}

@Abhijay007
Copy link
Collaborator Author

hmm, what does your routers/dictation.rs ends on? mine has:

pub fn routes(state: Arc) -> Router { Router::new() .route("/dictation/transcribe", post(transcribe_dictation)) .route("/dictation/config", get(get_dictation_config)) .with_state(state) }

same for me

@DOsinga
Copy link
Collaborator

DOsinga commented Feb 2, 2026

oh, I am sorry, yes, that is main. I do have another refactor though that changes even more coming up if you can wait on that? that generalizes things even more

@Abhijay007
Copy link
Collaborator Author

Abhijay007 commented Feb 2, 2026

oh, I am sorry, yes, that is main. I do have another refactor though that changes even more coming up if you can wait on that? that generalizes things even more

Yea sure will update the PR once those changes get merged

@DOsinga
Copy link
Collaborator

DOsinga commented Feb 3, 2026

merged

@Abhijay007
Copy link
Collaborator Author

Sure will update it today

Copilot AI review requested due to automatic review settings February 4, 2026 17:52
@Abhijay007 Abhijay007 force-pushed the refactor/elevenLabsModule branch from 12a3128 to cbef4b2 Compare February 4, 2026 17:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +63 to +69
const keyName = providerConfig.config_key!;
await upsert(keyName, trimmedKey, true);
setApiKey('');
setIsEditingKey(false);

const audioConfig = await getDictationConfig();
setProviderStatuses(audioConfig.data || {});
} catch (error) {
console.error('Error saving API key:', error);
setKeyValidationError('Failed to save API key');
}
const audioConfig = await getDictationConfig();
setProviderStatuses(audioConfig.data || {});
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

handleSaveKey no longer catches failures from upsert/getDictationConfig, so a network/backend error will surface as an unhandled promise rejection and the user gets no feedback. Please restore error handling (e.g., try/catch with a toast or inline error) and keep the UI in a sensible state on failure.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@DOsinga should we consider these try/catch blocks?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I generally think that the AIs are too eager with their catching errors and logging them. in this case we show the user, Failed to save API key, but that doesn't help them at all. this is just updating preferences in the backend, so I think just letting the error bubbling up seems ok

Comment on lines +77 to +83
const keyName = providerConfig.config_key!;
await remove(keyName, true);
setApiKey('');
setIsEditingKey(false);

const audioConfig = await getDictationConfig();
setProviderStatuses(audioConfig.data || {});
} catch (error) {
console.error('Error removing API key:', error);
setKeyValidationError('Failed to remove API key');
}
const audioConfig = await getDictationConfig();
setProviderStatuses(audioConfig.data || {});
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

handleRemoveKey now has no error handling around remove/getDictationConfig, so failures will result in an unhandled promise rejection and no user-visible error. Please wrap this in try/catch and surface a failure state (toast/inline) without leaving the UI ambiguous.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same here

@Abhijay007 Abhijay007 force-pushed the refactor/elevenLabsModule branch from cbef4b2 to be89613 Compare February 5, 2026 16:42
Comment on lines +63 to +69
const keyName = providerConfig.config_key!;
await upsert(keyName, trimmedKey, true);
setApiKey('');
setIsEditingKey(false);

const audioConfig = await getDictationConfig();
setProviderStatuses(audioConfig.data || {});
} catch (error) {
console.error('Error saving API key:', error);
setKeyValidationError('Failed to save API key');
}
const audioConfig = await getDictationConfig();
setProviderStatuses(audioConfig.data || {});
Copy link
Collaborator

Choose a reason for hiding this comment

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

I generally think that the AIs are too eager with their catching errors and logging them. in this case we show the user, Failed to save API key, but that doesn't help them at all. this is just updating preferences in the backend, so I think just letting the error bubbling up seems ok

@Abhijay007 Abhijay007 added this pull request to the merge queue Feb 11, 2026
Merged via the queue into block:main with commit 4571c3a Feb 11, 2026
18 checks passed
@Abhijay007 Abhijay007 deleted the refactor/elevenLabsModule branch February 11, 2026 11:03
tlongwell-block added a commit that referenced this pull request Feb 11, 2026
* origin/main: (107 commits)
  feat: Allow overriding default bat themes using environment variables (#7140)
  Make the system prompt smaller (#6991)
  Pre release script (#7145)
  Spelling (#7137)
  feat(mcp): upgrade rmcp to 0.15.0 and advertise MCP Apps UI extension capability (#6927)
  fix: ensure assistant messages with tool_calls include content field (#7076)
  fix(canonical): handle gcp_vertex_ai model mapping correctly (#6836)
  Group dependencies in root Cargo.toml (#6948)
  refactor: updated elevenLabs API module and `remove button` UX (#6781)
  fix: we were missing content from langfuse traces (#7135)
  docs: update username in authors.yml (#7132)
  fix extension selector syncing issues (#7133)
  fix(acp): per-session Agent for model isolation and load_session restore (#7115)
  fix(claude-code): defensive coding improvements for model switching (#7131)
  feat(claude-code): dynamic model listing and mid-session model switching (#7120)
  Inline worklet source (#7128)
  [docs] One shot prompting is dead - Blog Post (#7113)
  fix: correct spelling of Debbie O'Brien's name in authors.yml (#7127)
  docs: GCP Vertex AI org policy filtering & update OnboardingProviderSetup component (#7125)
  feat: replace subagent and skills with unified summon extension (#6964)
  ...

# Conflicts:
#	Cargo.lock
#	Cargo.toml
zanesq added a commit to Abhijay007/goose that referenced this pull request Feb 11, 2026
* upstream/main: (109 commits)
  [docs] Skills Marketplace UI Improvements (block#7158)
  More no-window flags (block#7122)
  feat: Allow overriding default bat themes using environment variables (block#7140)
  Make the system prompt smaller (block#6991)
  Pre release script (block#7145)
  Spelling (block#7137)
  feat(mcp): upgrade rmcp to 0.15.0 and advertise MCP Apps UI extension capability (block#6927)
  fix: ensure assistant messages with tool_calls include content field (block#7076)
  fix(canonical): handle gcp_vertex_ai model mapping correctly (block#6836)
  Group dependencies in root Cargo.toml (block#6948)
  refactor: updated elevenLabs API module and `remove button` UX (block#6781)
  fix: we were missing content from langfuse traces (block#7135)
  docs: update username in authors.yml (block#7132)
  fix extension selector syncing issues (block#7133)
  fix(acp): per-session Agent for model isolation and load_session restore (block#7115)
  fix(claude-code): defensive coding improvements for model switching (block#7131)
  feat(claude-code): dynamic model listing and mid-session model switching (block#7120)
  Inline worklet source (block#7128)
  [docs] One shot prompting is dead - Blog Post (block#7113)
  fix: correct spelling of Debbie O'Brien's name in authors.yml (block#7127)
  ...
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.

3 participants