Commit Graph

62 Commits

Author SHA1 Message Date
Jorge Manrubia 6437e7fef0 Add help entry 2025-06-26 17:22:42 +02:00
Jorge Manrubia 74c97aac01 Update help 2025-06-26 01:07:47 +02:00
Jorge Manrubia dbd4d166e5 Hide after selecting "undo" 2025-06-26 00:41:46 +02:00
Jorge Manrubia c1ebbb6255 Add help 2025-06-25 23:33:10 +02:00
Jorge Manrubia c319c49345 Add search command 2025-06-25 07:48:02 +02:00
Jason Zimdars be3b28fc39 Only display shortcut hints on desktop 2025-06-18 11:39:08 -05:00
Jorge Manrubia 37fd2b248d Revamp filters menu (WIP)
- Make them navigable by keyboard (UP, DOWN, ENTER to activate option).
- Filter based on the actual text in the element, use containment condition instead of CSS selector on value prefix.
- Make all the elements in the filter searchable and reachable by keyboard.
2025-06-02 14:51:03 +02:00
Kevin McConnell 880e3d98b2 Prevent default when handling keyboard shortcuts
Without this, any default action would still happen. With Chrome on
Linux, that causes browser features to be triggered with our CTRL+J and
CTRL+K actions.
2025-05-28 08:18:49 +01:00
Jason Zimdars d17134cb5c Detect platform and label the correct hotkey shortcut
Yes, Platform Agent is overkill for just this but there isn't a one-size JS solution for updating both input placeholders and other HTML text and we're likely to need it later for other things like displaying platform-specific PWA prompts.
2025-05-27 12:14:24 -05:00
Jason Zimdars efeee8deca Fix extra space when there is no AI output 2025-05-21 11:01:01 -05:00
Jason Zimdars 84b6a1291f Fizzy do with AI polish 2025-05-19 17:08:00 -05:00
Jorge Manrubia 339810862e Not used 2025-05-16 13:29:18 +02:00
Jorge Manrubia aa7a92c448 Move terminal output outside of the frame so that it doesn't gets erased when reloading the frame 2025-05-16 13:29:18 +02:00
Jorge Manrubia 87b4643946 Fix: navigation not working after adding new commands 2025-05-16 13:29:18 +02:00
Jorge Manrubia 09f5efc100 Reflect new commands in the history 2025-05-16 13:29:18 +02:00
Jorge Manrubia 7c55dd3a09 Make the input permanent
We need to command history to update
2025-05-16 13:29:18 +02:00
Jorge Manrubia 2510c1e0ac Major rework of the command/ai abstractions
- Big simplification of the overall workflow.
- Composite commands store their commands properly, these are undoable now.
- Child commands are excluded from history
2025-05-16 13:29:18 +02:00
Jorge Manrubia 81dcb715bd Add a busy class to the terminal 2025-05-16 13:29:18 +02:00
Jorge Manrubia 378f5e5891 Handle terminal output as a proper target 2025-05-16 13:29:18 +02:00
Jorge Manrubia f2c80726a3 Handle redirecting in commands that require no confirmation 2025-05-16 13:29:18 +02:00
Jorge Manrubia cd53ef59eb Better foundation for chat responses 2025-05-16 13:29:18 +02:00
Jorge Manrubia 9d7438ba25 Use similarity searches and refined prompt 2025-05-16 13:29:18 +02:00
Jorge Manrubia 007492add0 Primitive insight queries 2025-05-16 13:29:18 +02:00
Jorge Manrubia 413dfce5aa PoC running commands 2025-05-16 13:29:18 +02:00
Jorge Manrubia b7ee0b284d Chat responses 2025-05-16 13:29:18 +02:00
Jason Zimdars b1cd10afe7 Nudge people that / is for commands 2025-05-08 13:07:41 -05:00
Jason Zimdars d02501e008 Show help if you arrow-up but don't have any previous commands yet
- @jorgemanrubia this is a little fragile because it relies on CSS `:empty` which fails if any whitespace is present, which is why I needed to make the `<ul>` a one-liner. If we like this we may want to implement something more robust
2025-05-08 13:03:47 -05:00
Jorge Manrubia 1662a8af82 Hide terminal menu when pressing ESC
This was only working when the focus was on the input
2025-05-08 11:37:30 +02:00
Jorge Manrubia 5cd71a7699 Don't dismiss on any key, only with N or ESC
Also, this reworks the system to rely on stimulus event handling. This cover cases like unbinding events automatically when the controller get disconnected and such.

See:
https://3.basecamp.com/2914079/buckets/37331921/todos/8617430347
2025-05-08 11:21:39 +02:00
Jorge Manrubia 86db634f7f Fix: selected item not showing up in Safari
It also handles auto selecting when an element is focus. E.g: if you tabulate to the next control in the navigable list, you want selection to update accordingly.
2025-05-08 10:41:51 +02:00
Jorge Manrubia 59303a4628 Merge branch 'main' into fizzy-do-3
* main: (29 commits)
  Ensure that a "reconsidered" card gets an updated timestamp
  Try a fresh activity design
  Log the authenticated user
  Remove leading space when avatar is hidden on pinned cards
  Display card number in notifications and events
  Ensure that cards with an empty title aren't mysterious in notifs
  bin/dev ensures puma runs solid queue
  Adjust selection color to feel more terminal-y
  Eliminate double-tab behavior
  Clear error state when you start editing
  Color terminal text on error
  Don't indicate spelling errors
  The command is lowercase
  Remind 7 days before, not 30
  Make the icon square
  Subtler bubble styles
  Variable bubble shapes
  Bubble CSS
  Rename 'badge' to 'bubble'
  Address PR feedback
  ...

# Conflicts:
#	app/javascript/controllers/terminal_controller.js
#	app/views/commands/_form.html.erb
2025-05-08 10:29:54 +02:00
Jorge Manrubia d10c45772e Add a clear command to clear filters 2025-05-08 10:20:57 +02:00
Jason Zimdars 62b44cbb29 Polish help 2025-05-07 17:32:49 -05:00
Jason Zimdars fe48aecaae Eliminate double-tab behavior 2025-05-07 12:28:09 -05:00
Jason Zimdars 28659c1295 Clear error state when you start editing
- It feels wrong to persist the error state while you're fixing the command
2025-05-07 11:52:20 -05:00
Jason Zimdars 19a7972a46 Don't indicate spelling errors 2025-05-07 11:43:45 -05:00
Jorge Manrubia 2503524b7a Implement help menu command to show a help menu with the commands 2025-05-07 17:32:43 +02:00
Jorge Manrubia 6776e69ed8 Stop propagation so that it doesn't navigate back on ESC 2025-05-07 14:43:11 +02:00
Jorge Manrubia 87484dbca0 Add basic keyboard navigation support for the Fizzy do menu 2025-05-07 13:46:19 +02:00
Jorge Manrubia 0dcc6959da Extract constant to clarify regexp 2025-05-07 13:31:52 +02:00
Jorge Manrubia 4d2f2067ed Format 2025-05-07 12:13:45 +02:00
Jorge Manrubia 181e35b5b2 Restore command when clicking on it 2025-05-07 12:03:02 +02:00
Jorge Manrubia 8697cabbe2 Show confirmation when submitting certain commands
https://3.basecamp.com/2914079/buckets/37331921/todos/8617430347
2025-05-07 10:20:32 +02:00
Jorge Manrubia 6f382b68e0 Rename command controller => terminal controller and name the error class after terminal 2025-05-07 08:53:25 +02:00
Jorge Manrubia 55ea460d3e Handle form errors with a stimulus class
We need to keep the focus in place when submitting the form. We are using a data-turbo-permanent for that. We were rendering the error form with a turbo stream. The problem was that turbo streams ignore permanent elements as per this https://github.com/hotwired/turbo/pull/688, so the system wasn't updating the input field as expected.

Handling this as the stimulus level will also help with managing additional error states (such as the one we need for confirmations).
2025-05-07 08:46:47 +02:00
Jason Zimdars 94e2ab25f9 Make command a button 2025-05-06 17:45:05 -05:00
Jason Zimdars 10890df97f Style undo button 2025-05-06 17:32:45 -05:00
Jason Zimdars 521351da16 Add a keyboard shortcut 2025-05-06 16:15:19 -05:00
Jorge Manrubia 1faaed4a16 Prefer ul 2025-05-06 16:06:47 +02:00
Jorge Manrubia a8d4cbcff0 Keep focus in place when navigating and morphing 2025-05-06 12:14:04 +02:00