Skip to content

🎨 Palette: Synchronize action buttons with model selection - #228

Open
dieterolson wants to merge 1 commit into
mainfrom
palette-action-buttons-sync-12792685632261870015
Open

🎨 Palette: Synchronize action buttons with model selection#228
dieterolson wants to merge 1 commit into
mainfrom
palette-action-buttons-sync-12792685632261870015

Conversation

@dieterolson

Copy link
Copy Markdown
Contributor

What: Dynamically update the primary action buttons ("Launch in Terminal", "Chat Here") based on the selected model state by connecting the model_changed signal and calling it on __init__.
Why: The action buttons could become desynchronized with the selection state if they were only updated during specific events (like user clicks or interactions), allowing users to click actions that would lead to error dialogs if no valid model was selected or ready.
Accessibility: This prevents confusing UI behavior and ensures the UI properly guides the user's expectations through appropriate button disabled states and tooltips before an action is even attempted.


PR created automatically by Jules for task 12792685632261870015 started by @dieterolson

Connect the model_changed signal to _update_action_buttons and initialize the state on startup to prevent users from triggering actions when no model is selected.

Co-authored-by: dieterolson <198168927+dieterolson@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a74b329d38

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

self.resize(900, 680)
self._build_ui()
self.setStyleSheet(build_stylesheet())
self._update_action_buttons()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refresh action buttons when Setup returns

When the app starts before llama-cli has been built, this new initialization call disables both model actions. If the user then builds the executable through _open_setup_dialog(), closing that dialog never reruns _update_action_buttons(), and the selected model does not change to trigger the new signal connection; consequently, the buttons remain disabled until another model is selected or the application is restarted. Refresh the action state after the Setup dialog returns.

Useful? React with πŸ‘Β / πŸ‘Ž.

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.

1 participant