Commit graph

10 commits

Author SHA1 Message Date
Breadway
967fd9f1b7 breadclip-core: history DB hardening + user config + pin/primary schema
Persistence layer changes, all backward-compatible with existing
databases via in-place column migration:

- WAL journal mode + a 5s busy timeout so overlapping `--capture-once`
  writers and the popup reader stop dropping captures on SQLITE_BUSY.
- `HistoryError` replaces bare `rusqlite::Error` so a filesystem failure
  while writing an image file surfaces instead of leaving a row that
  points at a file that was never written.
- Image files are created 0600 from the first syscall (O_CREAT|O_EXCL,
  mode 0600) — no world-readable window before a chmod. Data and images
  dirs are forced to 0700 on every open. `gc_orphaned_images` sweeps
  image files no row references (older than 1h, to spare in-flight
  writes).
- `pinned` and `is_primary` columns. Pinned rows are exempt from trim
  and sort first; `list_entries` breaks timestamp ties by `id DESC` so
  ordering (and which rows trim keeps) is deterministic within a second.
- `Retention` caps are now a field on `HistoryDb` (`open_with`), and
  `0` is a legal value ("keep no unpinned entries of this kind").

New `config` module: optional TOML at
`$XDG_CONFIG_HOME/breadclip/config.toml`, every key defaulted and
clamped, unparseable file backed up once (bread-utils tomlcfg
discipline). Keys: retention.text/images, panel.width, capture.primary.
2026-08-31 15:07:04 +08:00
Breadway
cf9293bbf3 Bump version to v0.2.4
All checks were successful
beta (rc) release / build (push) Has been skipped
dev release / build (push) Successful in 47s
release / build (push) Successful in 1m2s
2026-08-16 14:09:21 +08:00
Breadway
999b73bf33 Bump version to v0.2.2
Some checks failed
dev release / build (push) Failing after 1s
beta (rc) release / build (push) Has been skipped
release / build (push) Failing after 1s
2026-08-15 23:05:47 +08:00
Breadway
fe8ea86c87 Pin bread-ecosystem crates to v0.7.2
Some checks failed
dev release / build (push) Failing after 1s
Repoint bread-theme, bread-utils, and bread-screenshots at tag v0.7.2
on git.breadway.dev. Drop the 69ce2d67 rev pin now that screenshots
is on a tagged release.
2026-08-15 22:53:46 +08:00
Breadway
8456424f1a Pin bread-theme/utils to bread-ecosystem v0.7.1; add single-trunk CLAUDE.md
Some checks failed
check / check (push) Failing after 1s
Popup, daemon, and core were split across git.breadway.dev v0.3.0 and
GitHub v0.3.1. Point every bread-theme / bread-utils dep at the same
Forgejo tag. bread-screenshots is not in v0.7.1 (the crate landed after
that tag) so it stays on that remote's main until the next ecosystem
release.

CLAUDE.md now documents the single-trunk model. EVENTS.md is unchanged
— no pin/select verbs.
2026-08-15 21:38:49 +08:00
Breadway
83b1fd7c23 Fix unswapped bread-utils path dep and stale bread-theme URL; bump to v0.2.1
Some checks failed
Mirror to GitHub / mirror (push) Successful in 2s
release / build (push) Failing after 1s
2026-07-19 04:02:53 +08:00
Breadway
4c21cc3f71 Switch to tag-pinned bread-ecosystem deps; bump version to v0.2.0 2026-07-19 03:52:27 +08:00
Breadway
7634af0b4f Switch to tag-pinned bread-ecosystem deps; bump version to v0.2.0
Some checks failed
Mirror to GitHub / mirror (push) Successful in 2s
release / build (push) Failing after 1s
2026-07-19 03:42:05 +08:00
Breadway
e16c1b461c Migrate to bread-utils: Hyprland IPC, single-instance lock, popup scaffold, XDG paths
Mirrors tonight's breadbox migration (same shared crate, same duplicated
patterns):

- position.rs's raw socket1 client -> bread_utils::hypr (file removed
  entirely, its logic now lives in the shared crate)
- toggle_or_continue's TOCTOU-prone PID-file dance -> bread_utils::singleton
- the layer-shell window setup, Up/Down visible-row navigation, and
  click-outside-close gesture -> bread_utils::gtk_popup
- breadclip-core's data_dir(): replaced the buggy
  `dirs::data_local_dir().unwrap_or_else(|| PathBuf::from("~/.local/share"))`
  fallback (flagged but never fixed in tonight's earlier audit pass —
  PathBuf never expands `~`) with bread_utils::xdg::data_dir, which
  resolves a real $HOME before ever falling back.

Builds and tests clean across the whole breadclip workspace.
2026-07-17 09:24:38 +08:00
Breadway
69bc67e29a Initial commit 2026-07-02 20:59:21 +08:00