Skip to content

Fix input state reset when switching providers in account dialog#17

Merged
JetSquirrel merged 2 commits intomainfrom
claude/fix-ak-input-issue
Feb 12, 2026
Merged

Fix input state reset when switching providers in account dialog#17
JetSquirrel merged 2 commits intomainfrom
claude/fix-ak-input-issue

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Feb 12, 2026

The set_provider function was recreating InputState instances when users switched between cloud providers (AWS/Aliyun/DeepSeek), clearing any values they had already entered.

Changes

  • src/ui/accounts.rs:107-145: Replace InputState::new() recreation with set_placeholder() and set_default_value() method calls to preserve user input

Before:

self.ak_input.update(cx, |state, cx| {
    *state = InputState::new(window, cx).placeholder("Access Key ID");
});

After:

self.ak_input.update(cx, |state, _cx| {
    state.set_placeholder("Access Key ID");
});

Applied to ak_input, sk_input, and region_input fields across all provider branches.

@JetSquirrel JetSquirrel marked this pull request as ready for review February 12, 2026 03:48
Copilot AI review requested due to automatic review settings February 12, 2026 03:48
Copy link

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.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Claude Claude AI changed the title [WIP] Fix issue with ak_input in set_provider Fix input state reset when switching providers in account dialog Feb 12, 2026
@Claude Claude AI requested a review from JetSquirrel February 12, 2026 04:10
@JetSquirrel JetSquirrel merged commit 0dbcc5b into main Feb 12, 2026
1 check passed
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