Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Tightbeam is private chat between two people on the same LAN: a Rust backend (Ta
## Done

- A change is done when the checks in `.github/workflows/ci.yml` pass locally: the UI check from the project root, and fmt, clippy and tests in `src-tauri/`.
- A protocol change gets a test in `src-tauri/src/chat/protocol_tests.rs`, which runs two engines on an in-memory network with paused time.
- A change people will notice also gets a line under `## Unreleased` in `CHANGELOG.md`. That section becomes the release text.
- Commit messages and PR titles follow Conventional Commits (`feat:`, `fix:`, `refactor:`, `docs:`, `chore:` …). PRs squash-merge, so the title becomes the commit on `main`.

Expand Down
20 changes: 20 additions & 0 deletions GLOSSARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ Private chat between two paired peers on the same network. Each person's history

## Language

### Peers

**Peer**:
The one other person's app this one is paired with. Before pairing, the apps nearby are just nearby.
_Avoid_: contact, friend, remote

**Pairing**:
Two apps agreeing to trust each other's key, after both screens show the same code. Each app pairs with one peer at a time.
_Avoid_: linking, connecting

**Session**:
One connected stretch between two paired peers: from their greetings until the connection drops. A newer session replaces an older one.
_Avoid_: connection (for the stretch of chat), call

**Catch-up**:
The entries a peer is missing, sent at the start of each session, before anything live.
_Avoid_: sync (for this step), backfill

### Logs

**Log**:
One author's history: an append-only, gap-free sequence of entries numbered from 1.
_Avoid_: history, timeline (for the stored sequence)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ ui/src/store.ts app state (TanStack Store), fed by events from Rust; h
ui/src/commands.ts slash commands
ui/src/components/ the screens: Setup, Pair, Chat, Search, Files, PairDialog, Notice
ui/src/components/ui/ shadcn/ui components (generated; update with the shadcn CLI)
src-tauri/src/chat.rs the engine: discovery, pairing, protocol, sync
src-tauri/src/chat.rs the engine: pairing, protocol, sync
src-tauri/src/chat/protocol_tests.rs the protocol between two engines, on the in-memory network
src-tauri/src/net.rs the network the engine runs on: iroh and mDNS, or in memory for tests
src-tauri/src/clock.rs wall-clock time, which tests move with tokio's paused clock
src-tauri/src/entry.rs log entries: each kind, its wire form, admission of a peer's
src-tauri/src/db.rs SQLite storage and history paging
src-tauri/src/lib.rs Tauri commands and events
src-tauri/src/desktop.rs tray, unread count, notifications
src-tauri/src/updates.rs automatic updates
src-tauri/tests/ two real engines chatting; paging through 50,000 messages
src-tauri/tests/ two real engines on the real network; paging through 50,000 messages
src-tauri/examples/seed.rs fills two test profiles with a long synthetic history
```

Expand All @@ -59,7 +62,7 @@ Needs Rust (via rustup) and bun. The Tauri CLI comes with `bun install`.
bun install # once
bun tauri dev # run the app; the UI hot-reloads as you edit
bun tauri build # make an installer in src-tauri/target/release/bundle/
cd src-tauri; cargo test # run the two-peer test (about 5 seconds)
cd src-tauri; cargo test # run the tests (about 5 seconds, mostly the real-network one)
```

`bun run dev` alone starts only Vite. The UI needs the Tauri bridge, so it won't work in a regular browser.
Expand Down
2 changes: 2 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ windows-sys = { version = "0.61", features = [
] }

[dev-dependencies]
# Paused time for the protocol tests.
tokio = { version = "1.54", features = ["full", "test-util"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Loading
Loading