Skip to content

feat: add assistant chat button and fix random assistant issue#7750

Merged
Vanalite merged 35 commits intojanhq:mainfrom
markmehere:feat/assistant-chat-button
Mar 24, 2026
Merged

feat: add assistant chat button and fix random assistant issue#7750
Vanalite merged 35 commits intojanhq:mainfrom
markmehere:feat/assistant-chat-button

Conversation

@markmehere
Copy link
Copy Markdown
Contributor

@markmehere markmehere commented Mar 17, 2026

Describe Your Changes

This adds an assistant button when you start a new chat. The button does not appear in projects or in threads (in threads, the assistant menu returns under the plus button).

screenshot

Elaborate On Your Changes

  1. This PR now includes feat: add default assistant setting #7725
  2. This PR isolates the assistant menu to a new component AssistantMenu.tsx file
  3. This PR sets the current assistant only on submission not merely switching to a thread
  4. This PR adds a loading state to the AssistantState fixing "jan" being selected because no other assistants are loaded
  5. This PR fixes an issue where the assistant selected after loading in new chats was the first assistant
  6. This PR fixes a bug where the strings from Tauri/Rust were being strictly compared to JavaScript strings and been found to be non-equal because new String('id') !== 'id'
  7. This PR fixes a CSS bug in settings/assistant.tsx where it was not possible to view all assistants in long list of assistants
  8. This PR fixes a bug so that the "None" assistant can be remembered as the active assistant
  9. This PR fixes a bug where the "None" selection was not appearing checked
  10. A greying is applied to the assistant avatar so it does not dominate the chat visually
  11. The PR now shows deleted assistants based on available information
  12. The PR allows changing model in-thread and includes some unit tests

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@urmauur
Copy link
Copy Markdown
Contributor

urmauur commented Mar 17, 2026

hey @markmehere merged my #7725 into main can u rebase main?

@urmauur urmauur self-assigned this Mar 17, 2026
@urmauur urmauur added this to the v.0.7.9 milestone Mar 17, 2026
@urmauur urmauur moved this to Needs Review in Jan Mar 17, 2026
@urmauur urmauur added needs: comms Major issue - we should inform users needs: designs Needs UI/UX designs labels Mar 17, 2026
@markmehere
Copy link
Copy Markdown
Contributor Author

@urmauur

  • The merge is done and looks good.
  • I liked your changes. They work well in this PR too.
  • The killer bug I want to sort with this one, is that when the ChatInput loads for the first time assistant choice can be unpredictable (on my Mac anyway) for this reason.
  • I'm possibly able to write some unit tests, I'm guessing we want them light and quick and eventually the aim is to have the whole project unit tested even though it's not at the moment - I'll see what I can do here - it's an area I'm not sure what the project's expectations are.

@urmauur
Copy link
Copy Markdown
Contributor

urmauur commented Mar 18, 2026

@urmauur

  • The merge is done and looks good.
  • I liked your changes. They work well in this PR too.
  • The killer bug I want to sort with this one, is that when the ChatInput loads for the first time assistant choice can be unpredictable (on my Mac anyway) for this reason.
  • I'm possibly able to write some unit tests, I'm guessing we want them light and quick and eventually the aim is to have the whole project unit tested even though it's not at the moment - I'll see what I can do here - it's an area I'm not sure what the project's expectations are.

@markmehere I have discuss with our UI/UX designer and we have a concern regarding the information architecture in this change.

Currently, all tools are grouped under the “+” menu, but the assistant is being surfaced outside of that structure. This creates an inconsistency in how features are organized and may be confusing from a user experience perspective.

would be more coherent to keep the assistant within the “+” menu alongside the other tools, rather than separating it out.

Could we move the assistant back inside the “+” menu to maintain a more consistent and predictable structure?

@urmauur urmauur self-requested a review March 18, 2026 07:46
@markmehere
Copy link
Copy Markdown
Contributor Author

The problem is that's not going to solve #7513. A number of users have no idea what assistant they are using when they start a new chat. Same for https://discord.com/channels/1107178041848909847/1474119257465028700/1474119257465028700. One option is to make the separate button an option in the settings? That said I really do think even that isn't great - some users do use the assistants a lot and a setting they might never find is not going to help.

@markmehere
Copy link
Copy Markdown
Contributor Author

Here's another idea what if we hide the button for users who only have one assistant?

It's not great UX - because it's not entirely consistent or predictable. But it makes sense from the perspective if the user has never added an assistant they probably don't care about assistants but if they have added an assistant, they probably do care and want the ability to switch it up.

Alternatively, if we put the separate button option in the assistant settings below the default assistant. Users who want this feature are more likely to find it. But it would be great to get a solution to #7513 either way.

@urmauur
Copy link
Copy Markdown
Contributor

urmauur commented Mar 18, 2026

Nice I'll make that change. I've lost access to my dev, because the code requires Tahoe and I'm not on that yet. But I should be back in a few hours.

take ur time

@markmehere
Copy link
Copy Markdown
Contributor Author

@urmauur I've made it so the button only shows when starting new chats with more than two assistants installed. I've also added some unit tests. Have a look and approve/merge if you're happy with the results.

@Vanalite
Copy link
Copy Markdown
Contributor

Vanalite commented Mar 19, 2026

Hi @markmehere, I think we can improve this PR with the followings:

Add tooltip when hovering on the assistant icon, just say "Assistant" would suffice. Otherwise users will not understand what that icon on the screen is about

The color of the icon in chatInput is different from the original color, some background color has blended the foreground color

Screenshot 2026-03-19 at 10 26 25 AM

The assistant icon is displaying from the home screen only. Within an ongoing convo, this icon disappear.

Screenshot 2026-03-19 at 10 31 54 AM Screenshot 2026-03-19 at 10 31 49 AM

@markmehere
Copy link
Copy Markdown
Contributor Author

@Vanalite,

I've made those adjustments as requested - they all look fine and the PR is hopefully now ripe and ready to merge.

cc: @urmauur @louis-jan

@Vanalite Vanalite merged commit 1949ed4 into janhq:main Mar 24, 2026
17 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to QA in Jan Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs: comms Major issue - we should inform users needs: designs Needs UI/UX designs

Projects

Status: QA

3 participants