Import shows the commands, but doesn't complete them

New install on my nas, and I figured I’d run atuin import auto. All the history shows up in the tui and can be selected with up/down arrows, but can’t be completed by typing. Is this intentional, or a bug?

atuin 18.23.0 (78366dca8c4941731e06a2f81c0980cc2ccc3836) (musl version)

oof sorry about that!

could I get the contents of atuin doctor please?

oof sorry about that!

no probs - it’s not a big deal, just I wasn’t sure if it was an intentional thing

{
  "atuin": {
    "version": "18.23.0",
    "commit": "78366dca8c4941731e06a2f81c0980cc2ccc3836",
    "sync": null,
    "sqlite_version": "3.46.0",
    "daemon_enabled": true
  },
  "shell": {
    "name": "zsh",
    "default": "unknown",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "unknown",
    "arch": "x86_64",
    "version": "unknown",
    "disks": [
      <snip irrelevant - ext4 / configfs / btrfs / ecryptfs volumes>
    ]
  }
}

Synology, running musl version installed via mise (as the glibc version on synology is 2.36).

Could I also get your config file and the result of

atuin daemon status

please?

I suspect it’s because mise doesn’t run our setup script so something isn’t configured right

Daemon running
PID:      15859
Version:  18.23.0

Protocol: 3
Healthy:  true
Socket:   /tmp/atuin-1026/atuin.sock

I manually ran atuin setup (after mise use --global --force 'atuin[libc=musl]@latest and started the daemon. Then I manually added the init to zshrc (eval "$(atuin init zsh)") and sourced it. I was surprised that atuin setup didn’t modify my zshrc file.

ok cool, thank you!

Yeah… for several historical reasons, that work is split between the bash script and the setup command. In future releases, the command will handle everything.

Final question; if you start typing (and it freezes or shows nothing?) does it eventually show results if you wait for 10s of seconds?

I’m wondering if the indexing is taking a while and blocking somehow. Do you have a lot of history?

Ah sorry - it’s possible that I’m not being clear. New commands that I run get added the the history. E.g. type foobar, When I hit ctrl+r, type foo, I see foobar in the filtered list. Commands that were imported from history do not get completed. But they are visible

typing source:

typing atuin:

Final question; if you start typing (and it freezes or shows nothing?) does it eventually show results if you wait for 10s of seconds?

I’m wondering if the indexing is taking a while and blocking somehow. Do you have a lot of history?

no - it never completes. not a huge amount

➜  ~ atuin stats
[▮▮▮▮▮▮▮▮▮▮] 158 ll
[▮▮▮▮▮▮▮   ] 124 cd
[▮▮▮       ]  51 vim
[▮▮        ]  42 for
[▮▮        ]  39 docker compose
[▮▮        ]  37 ls
[▮▮        ]  35 cat
[▮▮        ]  35 dcpull;dcupd;dclf
[▮▮        ]  33 chmod
[▮         ]  26 ..
Total commands:   916
Unique commands:  425

Actually, what’s worse is that running one of the commands previously imported still doesn’t add it to the completable commands, so some state is preventing all imported commands from ever being complted (they can be selected but not typed).

restarting the daemon fixed it.

Codex suggests:

Yes. This looks like a daemon-index invalidation bug.

atuin setup enables search_mode = "daemon-fuzzy". The import command writes entries directly to history.db, but it never tells the running daemon to reload its in-memory search index. The daemon only builds that index at startup, or when certain daemon-owned operations rebuild it.

That matches the report closely: imported entries appear in the initial TUI list from SQLite, but typing queries the stale daemon index.

and gave me atuin daemon restart to run. Problem solved, bug possibly still there. But that suggests a possible repro check - install setup, daemon, import, see what happens.

ahhh yes that makes sense! will get a fix released asap, thank you so much :folded_hands: