sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.14k stars 207 forks source link

AI Assistant Modal -- SIX significant usability issues #7549

Open williamstein opened 2 months ago

williamstein commented 2 months ago

See #7539. Things are now even worse from my point of view.

  1. Click the AI Assistant button

  2. Now it always displays the text "Fix all errors in" with no focus:

    image
  3. This is really, really bad for numerous reasons:

    • If I click the button then start typing my question, nothing happens because there's no focus
    • Once I click to focus, and I have to delete "Fix all errors in", because that's NEVER what I want to do
    • When I click this while using a Terminal (my most common use case), Fix all errors really makes no sense
    • If I start typing a question, close the modal to see under it for context or to copy something, when I re-open the modal, the contents I typed are gone.
    • Defaulting to "Fix all errors" doesn't even make sense -- what if that isn't what you want to do? There's no need to have anything in the input box to show the context info (i.e., the fix for #7539 is to just include the context info even if the input is blank -- instead just grey out the submit button).
williamstein commented 2 months ago

There's another really major SIXTH usability problem, which is that I often just want to ask a question about the code. E.g., below NONE of the selected boxes make any sense -- I just want to ask a question about the code.

image
williamstein commented 2 months ago

WORKAROUND/HACK -- if you clear the input then you get back into a state where no radio button is selected and can ask a question. Otherwise, there is no way to just 'ask a question'.

Basically https://github.com/sagemathinc/cocalc/pull/7543 somehow fundamentally kind of misunderstood this very important and central modal.

williamstein commented 1 month ago

PROBLEM 7: Typing into the input box is laggy again, due to counting the tokens (for computing costs). Use debounce to fix this AND also just make the token computation fast.