I'm an atuin user and if this feature exists, I have not seen it and would love to have it. Could you expand on how to get per-directory history as something separate from global shell history?
https://docs.atuin.sh/reference/search/#examples
You could also make "directory" the default filter mode or bind it to up-arrow:
https://docs.atuin.sh/configuration/config/#filter_mode
https://docs.atuin.sh/configuration/key-binding/#custom-up-a...