Skip to content

feat: Use eye-declare for more performant and flexible TUI#3343

Merged
ellie merged 6 commits intomainfrom
mkt/ai-declare
Mar 27, 2026
Merged

feat: Use eye-declare for more performant and flexible TUI#3343
ellie merged 6 commits intomainfrom
mkt/ai-declare

Conversation

@BinaryMuse
Copy link
Copy Markdown
Member

@BinaryMuse BinaryMuse commented Mar 24, 2026

This PR replaces the mess of custom rendering code in Atuin AI with eye-declare, and updates the TUI to feel more terminal-native: output appears inline and persists in scrollback, so you can scroll up and look at previous conversations for reference.

The "review" state — which used to exist between the LLM generating a response and the user either executing or following up — has been removed; just start typing to follow up with the LLM, or press enter at the empty input box to execute the suggested command.

image

This removes a large amount of messy rendering code from Atuin AI,
making it much easier to reason about the application. This commit
also significantly redesigns Atuin AI to feel more terminal native.
@BinaryMuse BinaryMuse marked this pull request as ready for review March 26, 2026 23:51
ellie
ellie previously approved these changes Mar 26, 2026
Copy link
Copy Markdown
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

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

dude I love this so much, let's go!

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 27, 2026

Greptile Summary

This PR replaces Atuin AI's custom rendering stack with eye-declare, moving to an inline terminal-native TUI where conversation output persists in scrollback. The "review" state is removed — users type to follow up or press Enter on an empty input to execute the suggested command.

Key issues found:

  • on_commit event eviction is too granular: events are removed one at a time as content scrolls into scrollback, but events_to_messages() requires them to stay in semantically valid pairs/turns. A single eviction can leave an assistant Text event as the first entry, producing an invalid conversation (assistant-first) sent to the API on follow-up.
  • --keep flag is a silent no-op: the flag is visible in --help output but the underlying functionality was removed; the parameter is just prefixed with _ in inline::run.
  • Stale doc comments in events.rs still reference the removed "Review mode".

Important Files Changed

Filename Overview
crates/atuin-ai/src/commands/inline.rs Full TUI rewrite using eye-declare; has two issues: on_commit evicts events one-at-a-time (breaks conversation pair integrity), and --keep flag is silently ignored despite being visible in --help
crates/atuin-ai/src/commands.rs Removes debug_render command; --keep flag is still advertised in help but has no effect in the new implementation
crates/atuin-ai/src/tui/events.rs Semantic event enum; doc comments reference the removed "Review mode" in three places
crates/atuin-ai/src/tui/state.rs Domain state types; well-structured with clear lifecycle methods; no issues found
crates/atuin-ai/src/tui/view/mod.rs New eye-declare view function; clean declarative layout with proper handling of all turn types
crates/atuin-ai/src/tui/view/turn.rs TurnBuilder converts conversation events to UI turns; graceful fallback for unknown danger/confidence values (no panics)
crates/atuin-ai/src/tui/components/input_box.rs Bordered tui-textarea wrapper; correctly bubbles Esc/Tab/Ctrl+C and handles paste events
crates/atuin-ai/src/tui/components/atuin_ai.rs Top-level key event translator; correctly maps mode-specific keys to semantic AiTuiEvents

Reviews (2): Last reviewed commit: "Cleanup" | Re-trigger Greptile

@BinaryMuse
Copy link
Copy Markdown
Member Author

@greptileai

@BinaryMuse BinaryMuse requested a review from ellie March 27, 2026 00:25
Copy link
Copy Markdown
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

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

:shipit: :shipit: :shipit: :shipit: :shipit:

@ellie ellie merged commit b649a7a into main Mar 27, 2026
22 checks passed
@ellie ellie deleted the mkt/ai-declare branch March 27, 2026 02:19
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Apr 2, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [atuinsh/atuin](https://github.com/atuinsh/atuin) | patch | `v18.13.5` → `v18.13.6` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>atuinsh/atuin (atuinsh/atuin)</summary>

### [`v18.13.6`](https://github.com/atuinsh/atuin/releases/tag/v18.13.6): 18.13.6

[Compare Source](atuinsh/atuin@v18.13.5...v18.13.6)

#### Release Notes

##### Bug Fixes

- *(powershell)* Handle non-FileSystem drives ([#&#8203;3353](atuinsh/atuin#3353))
- Remove unnecessary arboard/image-data default feature ([#&#8203;3345](atuinsh/atuin#3345))
- Use printf to append fish shell init block ([#&#8203;3346](atuinsh/atuin#3346))
- Set WorkingDirectory in PowerShell Invoke-AtuinSearch ([#&#8203;3351](atuinsh/atuin#3351))

##### Features

- Use eye-declare for more performant and flexible AI TUI ([#&#8203;3343](atuinsh/atuin#3343))

##### Miscellaneous Tasks

- *(ci)* Switch most workflows to depot ci ([#&#8203;3352](atuinsh/atuin#3352))

### atuin 18.13.6

#### Install atuin 18.13.6

##### Install prebuilt binaries via shell script

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-installer.sh | sh
```

##### Install prebuilt binaries via powershell script

```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-installer.ps1 | iex"
```

#### Download atuin 18.13.6

| File                                                                                                                                           | Platform            | Checksum                                                                                                               |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [atuin-aarch64-apple-darwin.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-aarch64-apple-darwin.tar.gz)             | Apple Silicon macOS | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-aarch64-apple-darwin.tar.gz.sha256)       |
| [atuin-x86\_64-pc-windows-msvc.zip](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-x86_64-pc-windows-msvc.zip)              | x64 Windows         | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-x86_64-pc-windows-msvc.zip.sha256)        |
| [atuin-aarch64-unknown-linux-gnu.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-aarch64-unknown-linux-gnu.tar.gz)   | ARM64 Linux         | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-aarch64-unknown-linux-gnu.tar.gz.sha256)  |
| [atuin-x86\_64-unknown-linux-gnu.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-x86_64-unknown-linux-gnu.tar.gz)    | x64 Linux           | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-x86_64-unknown-linux-gnu.tar.gz.sha256)   |
| [atuin-aarch64-unknown-linux-musl.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-aarch64-unknown-linux-musl.tar.gz) | ARM64 MUSL Linux    | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-aarch64-unknown-linux-musl.tar.gz.sha256) |
| [atuin-x86\_64-unknown-linux-musl.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-x86_64-unknown-linux-musl.tar.gz)  | x64 MUSL Linux      | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-x86_64-unknown-linux-musl.tar.gz.sha256)  |

#### Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the [GitHub CLI](https://cli.github.com/manual/gh_attestation_verify):

```sh
gh attestation verify <file-path of downloaded artifact> --repo atuinsh/atuin
```

You can also download the attestation from [GitHub](https://github.com/atuinsh/atuin/attestations) and verify against that directly:

```sh
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>
```

### atuin-server 18.13.6

#### Install atuin-server 18.13.6

##### Install prebuilt binaries via shell script

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-installer.sh | sh
```

##### Install prebuilt binaries via powershell script

```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-installer.ps1 | iex"
```

#### Download atuin-server 18.13.6

| File                                                                                                                                                         | Platform            | Checksum                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [atuin-server-aarch64-apple-darwin.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-aarch64-apple-darwin.tar.gz)             | Apple Silicon macOS | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-aarch64-apple-darwin.tar.gz.sha256)       |
| [atuin-server-x86\_64-pc-windows-msvc.zip](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-x86_64-pc-windows-msvc.zip)              | x64 Windows         | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-x86_64-pc-windows-msvc.zip.sha256)        |
| [atuin-server-aarch64-unknown-linux-gnu.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-aarch64-unknown-linux-gnu.tar.gz)   | ARM64 Linux         | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-aarch64-unknown-linux-gnu.tar.gz.sha256)  |
| [atuin-server-x86\_64-unknown-linux-gnu.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-x86_64-unknown-linux-gnu.tar.gz)    | x64 Linux           | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-x86_64-unknown-linux-gnu.tar.gz.sha256)   |
| [atuin-server-aarch64-unknown-linux-musl.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-aarch64-unknown-linux-musl.tar.gz) | ARM64 MUSL Linux    | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-aarch64-unknown-linux-musl.tar.gz.sha256) |
| [atuin-server-x86\_64-unknown-linux-musl.tar.gz](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-x86_64-unknown-linux-musl.tar.gz)  | x64 MUSL Linux      | [checksum](https://github.com/atuinsh/atuin/releases/download/v18.13.6/atuin-server-x86_64-unknown-linux-musl.tar.gz.sha256)  |

#### Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the [GitHub CLI](https://cli.github.com/manual/gh_attestation_verify):

```sh
gh attestation verify <file-path of downloaded artifact> --repo atuinsh/atuin
```

You can also download the attestation from [GitHub](https://github.com/atuinsh/atuin/attestations) and verify against that directly:

```sh
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDIuMTAiLCJ1cGRhdGVkSW5WZXIiOiI0My4xMDIuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlJlbm92YXRlIEJvdCIsImF1dG9tYXRpb246Ym90LWF1dGhvcmVkIiwiZGVwZW5kZW5jeS10eXBlOjpwYXRjaCJdfQ==-->
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.

2 participants