From 8456424f1ab77cc0179e898ad0eb2997cc1e20de Mon Sep 17 00:00:00 2001 From: Breadway Date: Sat, 15 Aug 2026 21:38:49 +0800 Subject: [PATCH] Pin bread-theme/utils to bread-ecosystem v0.7.1; add single-trunk CLAUDE.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .gitignore | 3 -- CLAUDE.md | 62 +++++++++++++++++++++++++++++++++++++++ Cargo.lock | 26 +++++----------- breadclip-core/Cargo.toml | 3 +- breadclip/Cargo.toml | 10 +++---- breadclipd/Cargo.toml | 2 +- 6 files changed, 77 insertions(+), 29 deletions(-) create mode 100644 CLAUDE.md diff --git a/.gitignore b/.gitignore index 8d2803a..36f7f5b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,3 @@ logs/ # Runtime files *.sock *.pid - -# Local hygiene notes (not for commit) -CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..cb27ea1 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,62 @@ +# CLAUDE.md — Repo hygiene + +Scope: this file covers *repo hygiene* — branching, remotes, CI — plus a +short map of the binaries. It is not user-facing project documentation. + +This repo follows the branch/release workflow documented in `CONTRIBUTING.md` +— read and follow it for any git, branch, or release work here (the +single-trunk model, `feature/x`/`fix/x` branch naming, how RC tags work, +etc). Don't improvise a different workflow. The short version: there is one +long-lived branch, `main` — no `dev` or `beta` branch exists. `main` +auto-publishes a dev-track build on every push. "Beta" and "stable" are both +just tags, not branches: push a `vX.Y.Z-rc.N` tag to publish a beta-track +build, push a plain `vX.Y.Z` tag to cut the signed stable release. +"Freezing" for stabilization means pausing pushes to `main`, not moving a +branch. This replaced an earlier three-branch (`dev`/`beta`/`main`) model +after `main` was found to have silently rotted out of sync with `dev`/`beta` +across most repos in this ecosystem. + +When starting work on a new feature, create branch `feature/`. +When working on a bug or issue, create branch `fix/`. + +## Remotes +- `origin` — Forgejo (`git.breadway.dev` via Hestia, SSH) — authoritative. +- `github` — GitHub mirror. Push `origin` only; GitHub auto-mirrors. + +## CI +- `check.yml` — clippy + test, triggers on push to `feature/**`/`fix/**`. +- `dev-release.yml` — triggers on push to `main`. +- `rc-release.yml` — triggers on `vX.Y.Z-rc.N` tag push. +- `release.yml` — triggers on any other `v*` tag push. + +All four run on a self-hosted runner (`hestia`) inside a pinned Arch +container — not the host's native environment. The Containerfile/build +script are shared across bread-ecosystem products and live in +`bread-ecosystem/ci/`; this repo's `ci/build.sh` clones that repo at the +sha in `ci/bread-ecosystem.rev` (deliberately pinned, not `main`) and +delegates to it. Nothing runs automatically on plain commits or PRs +beyond what's listed. + +## Architecture + +Three crates: + +| Crate | Role | +|---|---| +| `breadclipd` | Clipboard-watch daemon; persists history to SQLite | +| `breadclip` | GTK4 Layer Shell popup (thin UI over the same DB) | +| `breadclip-core` | Shared history schema / DB access | + +`--screenshot` (`breadclip/src/screenshot.rs`) captures the history panel +through `bread-screenshots`; do not rewrite it just to retarget the crate pin. + +`EVENTS.md` is the bread-event contract. App id `clip`. Implemented: +`bread.clip.copied`, `bread.clip.clear.done`/`.failed`, and command +`bread.command.clip.clear`. There is no pin/select — the history schema has +no pinned column and the popup has no pin UI. Do not invent +`bread.command.clip.pin`/`.select` (or matching events) ahead of a real +product feature. + +## Don't +- Don't embed credentials in remote URLs — SSH or a credential helper only. +- Don't invent pin/select on the event bus. See `EVENTS.md`. diff --git a/Cargo.lock b/Cargo.lock index fbda1c7..7b6ca6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,8 +114,8 @@ dependencies = [ [[package]] name = "bread-theme" -version = "0.3.0" -source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.3.0#8e82d2d833e992ce939a5b836f910ee109f2e939" +version = "0.3.1" +source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.1#db2fa3c4b4c1e6933bc5cf62a236d05972fdc886" dependencies = [ "dirs", "gtk4", @@ -123,25 +123,15 @@ dependencies = [ "serde_json", ] -[[package]] -name = "bread-utils" -version = "0.3.0" -source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.3.0#8e82d2d833e992ce939a5b836f910ee109f2e939" -dependencies = [ - "dirs", - "gtk4", - "gtk4-layer-shell", - "serde", - "serde_json", -] - [[package]] name = "bread-utils" version = "0.3.1" -source = "git+https://github.com/Breadway/bread-ecosystem?tag=v0.3.1#157ed6e3782ac2facd8b517d7c247713f36854ed" +source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.1#db2fa3c4b4c1e6933bc5cf62a236d05972fdc886" dependencies = [ "bread-shared", "dirs", + "gtk4", + "gtk4-layer-shell", "serde", "serde_json", ] @@ -163,7 +153,7 @@ dependencies = [ "anyhow", "bread-screenshots", "bread-theme", - "bread-utils 0.3.0", + "bread-utils 0.3.1 (git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.1)", "breadclip-core", "clap", "gtk4", @@ -175,7 +165,7 @@ dependencies = [ name = "breadclip-core" version = "0.2.1" dependencies = [ - "bread-utils 0.3.0", + "bread-utils 0.3.1 (git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.1)", "dirs", "hex", "rusqlite", @@ -187,7 +177,7 @@ dependencies = [ name = "breadclipd" version = "0.2.1" dependencies = [ - "bread-utils 0.3.1 (git+https://github.com/Breadway/bread-ecosystem?tag=v0.3.1)", + "bread-utils 0.3.1 (git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.1)", "breadclip-core", "serde_json", "tempfile", diff --git a/breadclip-core/Cargo.toml b/breadclip-core/Cargo.toml index fabdf67..c57a76c 100644 --- a/breadclip-core/Cargo.toml +++ b/breadclip-core/Cargo.toml @@ -8,8 +8,7 @@ rusqlite = { version = "0.31", features = ["bundled"] } sha2 = "0.10" hex = "0.4" dirs = "5" -# (Path corrected: previously pointed at a since-cleaned-up "bread-ecosystem-fix-worktree" checkout that no longer exists on disk.) -bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.3.0" } +bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.1" } [dev-dependencies] tempfile = "3" diff --git a/breadclip/Cargo.toml b/breadclip/Cargo.toml index 17edafd..1a7ef05 100644 --- a/breadclip/Cargo.toml +++ b/breadclip/Cargo.toml @@ -9,11 +9,11 @@ path = "src/main.rs" [dependencies] breadclip-core = { path = "../breadclip-core" } -bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.3.0", features = ["gtk"] } -# (Path corrected: previously pointed at a since-cleaned-up "bread-ecosystem-fix-worktree" checkout that no longer exists on disk.) -bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.3.0", features = ["gtk"] } -# Capture primitives for `--screenshot` mode — see src/screenshot.rs. Not -# tag-pinned like the deps above since it doesn't have a tagged release yet. +bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.1", features = ["gtk"] } +bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.1", features = ["gtk"] } +# Capture primitives for `--screenshot` mode — see src/screenshot.rs. +# Not in bread-ecosystem v0.7.1 (crate landed after that tag); same remote +# as the tag-pinned deps, floating on main until the next ecosystem release. bread-screenshots = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", branch = "main" } gtk4 = { version = "0.11", features = ["v4_12"] } gtk4-layer-shell = "0.8" diff --git a/breadclipd/Cargo.toml b/breadclipd/Cargo.toml index b384b08..8e4a9b4 100644 --- a/breadclipd/Cargo.toml +++ b/breadclipd/Cargo.toml @@ -9,7 +9,7 @@ path = "src/main.rs" [dependencies] breadclip-core = { path = "../breadclip-core" } -bread-utils = { git = "https://github.com/Breadway/bread-ecosystem", tag = "v0.3.1", features = ["bread-client"] } +bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.1", features = ["bread-client"] } serde_json = "1" [dev-dependencies]