Recently, it seems, the socket location for the daemon moved and this
caused me to scratch my head briefly since I saw errors from the client
connecting to the daemon, but the daemon was clearly running and the
socket seemed to exist.
This patch includes more context when the client fails to connect to the
daemon. The path is included to help the user understand where the
client was looking, and `wrap_err_with()` is used to show the user the
cause of the error. This changes the error message from:
Error: failed to connect to local atuin daemon. Is it running?
to:
Error: failed to connect to local atuin daemon at /run/user/1001/atuin.sock. Is it running?
Caused by:
0: transport error
1: No such file or directory (os error 2)
2: No such file or directory (os error 2)
In the event there are no results and up is pressed, saturating_sub()
should be used to avoid underflowing the usize. This was already present
on scroll_down().
fixes#2393
* test: add env ATUIN_TEST_LOCAL_TIMEOUT to control test timeout of SQLite
This make it possible to control the timeout of SQLite operations in
test. And ATUIN_TEST_LOCAL_TIMEOUT defaults to the default local_timeout,
which is actually used in the client. Instead of a small timeout (0.1),
this change makes the test less likely to fail and better imitate the
default behavior.
SQLite operation timeout was first introduced from #1590, including
connection and store timeout. The env ATUIN_TEST_SQLITE_STORE_TIMEOUT
which added by #1703 only specify the store timeout. This commit doesn't
deprecate ATUIN_TEST_SQLITE_STORE_TIMEOUT, but control it by setting its
default to the new env ATUIN_TEST_LOCAL_TIMEOUT.
* test!: replace ATUIN_TEST_SQLITE_STORE_TIMEOUT with ATUIN_TEST_LOCAL_TIMEOUT
This deprecate ATUIN_TEST_SQLITE_STORE_TIMEOUT for simplicity as the new
env ATUIN_TEST_LOCAL_TIMEOUT can control both connection and store
timeout of SQLite in test. Details see 4d88611.
Revert: #1703.
* fix(theme): let the base colour remain unchanged
* fix(theme): split out default
* fix(theme): make base theme 'default' not an empty string
* wip(theme): return styles, not colors
* wip(theme): tidy up module structure a little
* wip(theme): removed unhandled references to foreground_color
* chore: fix cargo fmt
* feat(theme): allow crossterm-deserializable colors
* wip: add theme
* feat(theme): basic theming approach
* feat(theme): adds theming support
* fix: split out palette without compact inspector
* fix(theme): tidy up implementation
* fix(theme): correct yaml to toml
* fix(theme): typo in comments
* chore: cheer up clippy
* fix(themes): ensure tests cannot hit real loading directory
* chore: rustfmt
* chore: rebase
* feat(themes): add rgb hexcode support
* fix(theme): add tests
* fix(theme): use builtin log levels and correct debug test
* feat(theme): adds the ability to derive from a non-base theme
* fix(theme): warn if the in-file name of a theme does not match the filename
* chore: tidy for rustfmt and clippy
* chore: tidy for rustfmt and clippy
* feat(gui): use fancy new side nav
* compact only sidebar, no expand-collapse
* custom drag region, remove titlebar
* add user popup
* wire up login/logout/register, move user button to bottom and add menu
* link help and feedback to forum
* feat: allow advertising a fake version to clients
The server usually runs unstable Atuin, and is well monitored. But let's
not advertised the unstable version to clients, as they will notify
users there is an update available.
* fix test build
* perf: add idx cache
* Update crates/atuin-server-postgres/migrations/20240614104159_idx-cache.sql
* indentation
* remove trigger - for each row is too much, should be once per transaction
- OAuth access tokens
- refresh token
- app installation token
- PAT v2
Additionally, added support for having >1 value for testing, for cases
where the pattern for a secret has alternative formats (GitHub PAT v2
does this)
* add verified column to users table
* add database functions to check if verified, or to verify
* getting there
* verification check
* use base64 urlsafe no pad
* add verification client
* clippy
* correct docs
* fix integration tests