Fix custom endpoint modal button not updating on model name edit#10987
Draft
warp-dev-github-integration[bot] wants to merge 1 commit into
Draft
Fix custom endpoint modal button not updating on model name edit#10987warp-dev-github-integration[bot] wants to merge 1 commit into
warp-dev-github-integration[bot] wants to merge 1 commit into
Conversation
The 'Add endpoint' / 'Save' button remained disabled after entering a valid model name because handle_model_editor_event was missing an EditorEvent::Edited handler. Without ctx.notify(), the view never re-rendered to re-evaluate is_valid(), so the button stayed disabled until some other event triggered a re-render. All other editor event handlers (endpoint name, URL, API key) already called ctx.notify() on Edited events — this brings the model editors in line. Co-Authored-By: Oz <oz-agent@warp.dev>
800525f to
b1ea128
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The "Add endpoint" / "Save" button in the custom endpoint modal remained disabled for a noticeable delay after entering a valid model name. The root cause was that
handle_model_editor_eventwas missing anEditorEvent::Edited(_)handler — unlike all other editor event handlers in the modal (endpoint name, URL, API key), it never calledctx.notify()on edits. Without that notification, the view never re-rendered to re-evaluateis_valid(), so the button stayed disabled until some unrelated event triggered a re-render.The fix adds
EditorEvent::Edited(_) => { ctx.notify(); }tohandle_model_editor_event, consistent with the other handlers.Linked Issue
N/A
Testing
./script/runAgent Mode
Conversation: https://staging.warp.dev/conversation/5f6a03fd-63fb-4f88-bd09-f0cbdfc0c21b
Run: https://oz.staging.warp.dev/runs/019e2a89-2c01-7130-b10f-43b0e72ea21c
This PR was generated with Oz.