mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 15:26:09 +00:00
chore: .deb packaging, phase 3/5 docs, lessons, env example
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8e118c90ba
commit
fcc0ea1f12
8 files changed
+129
-6
No files matched your search
@@ -82,3 +82,9 @@ exclusion of `refs/sync/*` on this Gitea (needs a mirror target and credentials)
|
||||
|
||||
Observed UX noise: a stale snapshot from another machine is reported as "not applied" on every
|
||||
pass until that machine syncs again.
|
||||
|
||||
## Bug found later (Phase 5 tests)
|
||||
|
||||
`clone_bare_layout` created worktrees without upstream tracking, so `Diverged` and `Behind` were
|
||||
reported as `Synced` on repos cloned by grove itself. Fixed: every local branch with an `origin/<br>`
|
||||
counterpart gets `--set-upstream-to` before worktrees are materialized (asserted in `tests/registry.rs`).
|
||||
@@ -0,0 +1,55 @@
|
||||
# Phase 3: GUI
|
||||
|
||||
## Layout
|
||||
|
||||
| Part | Where | Status |
|
||||
|---|---|---|
|
||||
| Frontend (plain HTML/CSS/JS, no build step) | `gui/ui/` | Implemented, exercised in a browser against a live daemon |
|
||||
| Dev bridge (`grove-bridge`, std-only HTTP server on 127.0.0.1) | `crates/grove-bridge/` | Implemented, unit-tested, exercised end to end |
|
||||
| Tauri v2 shell with tray | `gui/src-tauri/` | **Written but never compiled** (see below) |
|
||||
|
||||
The frontend talks to a backend through one adapter in `gui/ui/app.js`: `window.__TAURI__` commands
|
||||
(`ipc`, `cli`, `config`) when running inside Tauri, otherwise `fetch('/api/...')` against the bridge.
|
||||
The GUI contains no sync logic: state comes from the daemon over its Unix socket, and every action
|
||||
(new, import, resolve, login, secrets, bootstrap) shells out to the allow-listed `grove` subcommands.
|
||||
|
||||
## Screens
|
||||
|
||||
Repositories (aggregate pill: all synced / syncing / paused / needs attention / daemon offline),
|
||||
repository detail (per-worktree state and what the next pass will do, resolve panel for `Diverged`),
|
||||
Activity (live log, filter), New repository, Import, Settings (config, token login, config repo,
|
||||
secrets), and onboarding when no config exists. Toasts (and browser notifications when permitted)
|
||||
fire on a transition into `Diverged` or `Error`.
|
||||
|
||||
Resolve actions (save as branch / take remote / keep mine) always ask for confirmation and write a
|
||||
backup ref first. Comparing both sides stays in the CLI (`grove resolve --compare`).
|
||||
|
||||
## Dev bridge safety
|
||||
|
||||
Binds 127.0.0.1 only, rejects non-local `Host` headers (DNS rebinding) and POSTs without
|
||||
`X-Grove: 1` (cross-site forms cannot set it). Only these subcommands are forwarded: `init login new
|
||||
import config-repo-init bootstrap resolve secrets sync status`. Verified: a POST without the header gets 403.
|
||||
|
||||
```bash
|
||||
cargo run -p grove-bridge -- --ui gui/ui # then open http://127.0.0.1:4780
|
||||
```
|
||||
|
||||
## Tauri shell: not verified
|
||||
|
||||
Needs system packages that were missing on the dev machine and no root was available:
|
||||
|
||||
```bash
|
||||
sudo dnf install webkit2gtk4.1-devel libsoup3-devel librsvg2-devel # Fedora
|
||||
cd gui/src-tauri && cargo install tauri-cli --locked && cargo tauri dev
|
||||
```
|
||||
|
||||
The shell is ~80 lines: three commands reusing `grove-bridge`, a tray (open / pause-resume / quit),
|
||||
and close-to-tray. The CSP allows only `self`; the capability file grants `core:default` only.
|
||||
Expect small compile fixes on the first build. It is intentionally outside the workspace so that
|
||||
`cargo test` works without webkit installed.
|
||||
|
||||
## Not done
|
||||
|
||||
- Screenshots/visual QA inside the real Tauri window.
|
||||
- Side-by-side compare view for `Diverged` (CLI only).
|
||||
- Native notifications from the Tauri side (the web Notification API is used).
|
||||
@@ -0,0 +1,26 @@
|
||||
# Phase 5: resolve, safety, packaging
|
||||
|
||||
## Done
|
||||
|
||||
- **Resolve** (`grove resolve <worktree> --take-remote | --keep-local | --save-as BRANCH | --compare`,
|
||||
also in the GUI). Every choice writes a backup ref first (`refs/sync-backup/<machine>/<stamp>/resolve-local/<branch>`
|
||||
or `resolve-remote/<branch>`). `--keep-local` uses force-with-lease on the observed upstream tip.
|
||||
`--take-remote` and `--save-as` refuse on a dirty worktree or when ignored files would be overwritten.
|
||||
`--save-as` needs the bare + worktrees layout. `status --plan` explains what the next pass will do.
|
||||
Covered by `crates/grove-core/tests/resolve.rs` (4 tests).
|
||||
- **Size limit**: `sync.max_file_mb` (default 50, 0 = unlimited). Oversized changed files are left out of
|
||||
the snapshot (reset to their HEAD version, or absent), reported in the pass result and the daemon log.
|
||||
Covered by `tests/size_limit.rs`.
|
||||
- **Encrypted files** (`grove secrets init|push|pull|rekey`, age x25519): see `phase4.md`.
|
||||
- **Packaging**: `cargo build --release --workspace && cargo deb -p grove --no-build` produces
|
||||
`target/debian/grove_*.deb` (CLI, daemon, systemd *user* unit `/usr/lib/systemd/user/groved.service`).
|
||||
The package was built; it was **not installed or run**. `dpkg-shlibdeps` is unavailable here, so `$auto`
|
||||
dependencies were not computed.
|
||||
|
||||
## Not done
|
||||
|
||||
- AppImage (no `appimagetool`) and Flatpak: not attempted. The Tauri bundle config requests `deb` and
|
||||
`appimage`, untested.
|
||||
- Daemon-side mirroring fallback for GitHub (GitHub has no push mirrors; `configure_mirror` returns `Unsupported`).
|
||||
- Syncing agent sessions (optional item in the plan): not implemented.
|
||||
- A real two-PC run, a real cross-forge mirror, Secret Service on a desktop, github.com: unverified.
|
||||
Reference in new issue
Block a user