Commit graph

17 commits

Author SHA1 Message Date
88c1f0f158
commands/list: full TUI rewrite for better perf
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I49009a89542fdeeea31d3755108b53d06a6a6964
2026-02-26 12:06:17 +03:00
2e555ee043
commands/list: add include_expired parameter for filtering
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia1ab13345cfa5e2cf9a92f8b32a6a9826a6a6964
2026-01-22 16:56:43 +03:00
3165543580
commands: prevent usize underflow when navigating empty entry list
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0432dcc88b22226772f6bb6e05cc64d36a6a6964
2026-01-22 13:41:57 +03:00
59423f9ae4
list: add content_hash and last_accessed tracking with de-duplication
Adds a `content_hash` column and index for deduplication, and a
`last_accessed` column & index for time tracking. We now de-duplicate on
copy by not copying if present, but instead bubbling up matching entry.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icbcdbd6ac28bbb21324785cae30911f96a6a6964
2026-01-22 13:41:54 +03:00
c2182d21dc
chore: bump dependencies; fix lifetime warnings for Rust 1.90+
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If755ceefb970311c7660118cb2019c2c6a6a6964
2025-12-22 16:59:12 +03:00
f8440926b1
list: log clipboard copy errors and update notification message
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69649bdd37a44f254d520e33a54634958ada
2025-10-09 11:45:37 +03:00
d8b1ac1f37
list: properly error notification if clipboard copy fails
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696459d7fbc344545daeead6164cad5cde6f
2025-10-09 11:45:36 +03:00
4c0782f80e
list: add clipboard actions for delete and copy; notify
This adds an optional dependency on notify-rust, which we use to display
notifications when an entry is deleted or copied. If the user thinks a
TUI using desktop notifications is *not* desirable, it can be disabled
with the `notifications` feature flag.

We now support copying entries to the clipboard with `Enter` and
deleting entries with `Shift+D`. Both of those will show notifications.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69642d0c13a1359b3b51125cc4b691cd5679
2025-10-09 11:08:50 +03:00
a41d72fb6b
stash: refactor error handling and entry deduplication
This includes breaking changes to the database entries, where we have
started deduplicating based on hashes instead of full entries. Entry
collisions are possible, but highly unlikely.

Additionally we use `Box<str>` for error variants to reduce allocations.
This is *yet* to give me a non-marginal performance benefit but doesn't
hurt to be more correct.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964d0a33392da61372214ca3088551564ac
2025-09-19 14:08:15 +03:00
c9a73b462d
commands: more consistent error propagation
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69647a0eb8de028e4251465fbb94f0a14cef
2025-08-20 18:38:05 +03:00
6a5cd9b95d
treewide: format with rustfmt
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69642c2865f41a4b141ddf39a198a3fc2e09
2025-08-20 09:57:44 +03:00
7c26947437
commands/list: resolve clippy warnings
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964e1bb8c22b5026ce65889e3aec1b90a71
2025-08-15 08:04:35 +03:00
83d45c6414
list: if we're in a TTY, output data in a TUI
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696493f2e7ca911b6c1e2692b67f357a4b6b
2025-08-15 08:04:24 +03:00
4f725425fc
db: switch to sqlite as the primary backend
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69648f81d0d094e11a3e0f0a19d3b8eccd5d
2025-08-12 19:07:38 +03:00
6e21021306
treewide: improve logging; custom error types with thiserror
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696464e4123d15cfaedf4727776e55948369
2025-08-12 17:34:41 +03:00
254c288111
treewide: improve logging; get rid of unwrap()s
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696442ff25c3f65bb2d5f68e0d78a569fd76
2025-08-12 15:03:41 +03:00
b0820a1940
modularize codebase
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69648ea836bfeb539450db14a666c623412e
2025-08-12 15:01:32 +03:00