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 CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Before changing any interaction, consult the keybinding matrix and overlay specs
- **Phase 29 — Release v1.2.0 & version plumbing** — cut the release covering everything since the (never-published) `v1.1.0` tag: the 24.x sudo account flows, Phase 26 mock mode + VHS demo, the 26.2 privacy pass, Phase 27's Omarchy 4 theme support, and Phase 28's CI. **Version plumbing fix**: `.goreleaser.yaml` stamps `-X main.version={{.Version}}`, but `main.go` had **no `version` var** and `appVersion` was a `const` in `internal/tui/view.go` — so the ldflag silently did nothing (Go ignores `-X` on a missing symbol) and a tagged build would have shipped whatever was hardcoded. Now `main.go` declares `var version string` (empty for `go build`/`go run`) and calls **`tui.SetVersion(version)`** first thing in `main`; `appVersion` became a **var** (dev-build literal `v1.2.0`) and `SetVersion` ignores an empty value and normalizes a bare `1.2.0` → `v1.2.0`, since goreleaser's `{{.Version}}` drops the prefix. `appVersion` remains the single definition — set it there, never duplicate it. Added `internal/tui/version_test.go` (normalization table incl. prerelease + empty, plus a render test asserting the stamped version actually reaches the footer while staying flush). `.gitignore` was rewritten to cover the compiled `/tailtui` binary (previously **committed**, ~6.5 MB, removed from history in the same cycle), test/coverage output, and editor/OS noise, while preserving the existing `_designs/` allow-list. README gained a `ci` status badge under the tagline and a "What's New in v1.2.0" section above the v1.1.0 one. No layout / state / keybinding changes.
- **Phase 30 — tailTUI theme schema, Omarchy template & live theme reload** — closed the one gap Phase 27 could not: some mappings are genuinely undecidable in code. `osaka-jade` defines `yellow = #459451` (a green), so mapping `yellow`→Warning makes exit-node markers nearly indistinguishable from the online green — but preferring `orange` breaks `retro-82`, where orange *is* the accent. **(1) tailTUI's own schema**: a third wire struct `tailtuiTheme` with one key per `Theme` field, tried **before** both Omarchy schemas, and probed as `tailtui.toml` **ahead of** `colors.toml` inside each theme directory. Keys are disjoint from the Omarchy vocabularies so detection stays key-based; `mode`/`background` are shared and therefore excluded from `hasMarkers()`. **(2) Omarchy template**: `contrib/tailtui.toml.tpl`, installed by the user into `~/.config/omarchy/themed/`. Omarchy's `omarchy-theme-set-templates` renders every `*.tpl` there into the **active theme directory** (`$NEXT_THEME_DIR/<name>`, which becomes `~/.local/state/omarchy/current/theme/`) on every theme switch — i.e. straight into the directory the loader already probes, so no new path was needed. Templates get the full palette (semantic slots, `color0`–`color15`, `mode`, `bright_`/`dark_`/`light_` variants) plus `_strip`/`_rgb` modifiers and a `{{ mix a b 30% }}` blend. **(3) Live reload**: `styles.ThemeStamp()` (path+mtime) plus `checkThemeCmd`, batched onto the **existing** `refreshInterval` tick — no fsnotify, no new dependency — so switching the desktop theme re-colors a running tailTUI within one tick. The critical constraint: the command **returns** the parsed `Theme` and never calls `styles.Apply` itself, because `Apply` rewrites package-level vars `View` reads; applying happens in `Update`, on the Elm goroutine. The handler records the stamp even on no-change (so a file appearing/vanishing is caught) and rebuilds viewport-backed overlays via `resizeOverlay()`, whose content would otherwise keep stale ANSI colors. Zero-config behavior is untouched: with no template installed, `colors.toml` is read exactly as before. **Tests**: own-schema mapping, light mode, three-way detection non-ambiguity, `tailtui.toml`-over-`colors.toml` precedence, fallback when no template exists, `ThemeStamp` change tracking and empty state (`theme_test.go`); palette applied + stamp recorded + logged, unchanged-is-quiet, overlay rebuilt (forcing TrueColor, since a TTY-less test strips every SGR and both renders would otherwise compare equal), and `New()` stamp seeding (`theme_reload_test.go`).
- **Phase 31 — Release v1.3.0** — bumped `appVersion` `v1.2.0` → `v1.3.0` (still the single definition in `view.go`) for Phase 30's live theme switching + tailTUI theme schema. **Packaging gap closed**: the README told users to `cp contrib/tailtui.toml.tpl …`, which is wrong for anyone who installed from the AUR / `.deb` / `.rpm` — they have a binary package, not a checkout. The template is now installed to **`/usr/share/tailtui/tailtui.toml.tpl`** by the packaging, and the README gives both paths. Any future user-facing file added under `contrib/` needs the same treatment, or the docs silently break for package users. Also decoupled `version_test.go` from the real version string (it now asserts on an obviously-arbitrary literal), so a release bump no longer looks like it requires a test edit — the test exercises `SetVersion`'s normalization, not the current version. README gained a "What's New in v1.3.0" section; the theming docs and the Phase 30 entry shipped with the feature itself, which is the rule: **docs ride in the feature PR, and the release PR carries only version, changelog, and phase log**.
- **Phase 32 — Install documentation for every distribution route** — the README's Installation section still offered only `go install` and a source build, despite v1.2.0/v1.3.0 publishing `.tar.gz`/`.deb`/`.rpm` for amd64+arm64 and an AUR package existing since v1.1.0 — the recommended path for most users was undocumented. Rewrote it into four routes (AUR, `.deb`/`.rpm`, prebuilt tarball, from source), leading with the packaged ones since they need no Go toolchain. **The rule this enforces**: every install route must be able to follow every other instruction in the README. The live-theme-switching section previously offered `/usr/share/tailtui/…` (packages) or `contrib/…` (clone), which strands anyone who ran `go install` — they have neither, so a third `curl` line fetching the template from `raw.githubusercontent.com` was added. Also documented the two `go install` caveats: the binary lands in `$GOBIN`/`$GOPATH/bin`, which is not necessarily on `PATH`, and a source build installs the binary alone. Docs-only — no Go, test, or packaging changes, and no version bump (nothing user-facing changed in the program itself).
- **Upcoming (next major cycle — see the README Roadmap)** —
- **Tailscale Serve & Funnel management**: visual port forwarding to securely expose local services to the tailnet (`tailscale serve`) or the public internet (`tailscale funnel`), driven from keyboard overlays in the existing modal style.
- **Connection diagnostics**: deep-dive into peer connection health — DERP-relay vs. direct routing and the signals to debug a flaky link (likely from `tailscale status --json` endpoints + `tailscale ping`/`netcheck`).
Expand Down
61 changes: 57 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,51 @@ distribution** — Ubuntu, Debian, Fedora, Arch, NixOS, openSUSE, Alpine — wit
no packaging tweaks, service hooks, or distro-specific patches. If
`tailscale` is on your `PATH` and the daemon is running, `tailTUI` works.

To install the latest version directly via Go, run:
### Arch Linux (AUR)

```bash
yay -S tailtui # or: paru -S tailtui
```

### Debian / Ubuntu / Fedora / openSUSE

Grab the `.deb` or `.rpm` for your architecture from the
[latest release](https://github.com/Phundahl/tailtui/releases/latest):

```bash
sudo dpkg -i tailtui_*_linux_amd64.deb # Debian, Ubuntu
sudo rpm -i tailtui_*_linux_amd64.rpm # Fedora, openSUSE
```

### Any distribution (prebuilt binary)

```bash
# resolves the current release, so this stays correct across versions
VER=$(curl -fsSL https://api.github.com/repos/Phundahl/tailtui/releases/latest |
sed -n 's/.*"tag_name": *"\(.*\)".*/\1/p')
curl -fsSL -o tailtui.tar.gz \
"https://github.com/Phundahl/tailtui/releases/download/${VER}/tailtui_${VER#v}_linux_amd64.tar.gz"
tar xzf tailtui.tar.gz
sudo install -Dm755 tailtui /usr/local/bin/tailtui
```

Or just download it from the [releases
page](https://github.com/Phundahl/tailtui/releases/latest) and unpack it.

`arm64` builds are published alongside `amd64`. These are the recommended
install methods: they need no Go toolchain, and they ship the Omarchy theme
template to `/usr/share/tailtui/` so the [live theme
switching](#live-theme-switching-optional) instructions work as written.

### From source

Needs the Go toolchain. Useful for tracking `main` or hacking on `tailTUI`:

```bash
go install github.com/Phundahl/tailtui@latest
```

Or build from source:
Or from a clone:

```bash
git clone https://github.com/Phundahl/tailtui
Expand All @@ -155,7 +193,18 @@ go build -o tailtui .
./tailtui
```

**Requirements:** Go 1.26+ (to build), a working
Two caveats when building yourself. `go install` places the binary in `$GOBIN`
(or `$GOPATH/bin`), which is not always on your `PATH` — check with
`go env GOBIN` if the command isn't found afterwards. And a source build
installs only the binary, so the theme template has to be fetched separately:

```bash
mkdir -p ~/.config/omarchy/themed
curl -fsSL -o ~/.config/omarchy/themed/tailtui.toml.tpl \
https://raw.githubusercontent.com/Phundahl/tailtui/main/contrib/tailtui.toml.tpl
```

**Requirements:** Go 1.26+ (only to build from source), a working
[Tailscale](https://tailscale.com) install (the `tailscale` CLI on your
`PATH`, daemon running), and a terminal with a
[Nerd Font](https://www.nerdfonts.com/) for the node glyphs. TrueColor
Expand Down Expand Up @@ -252,8 +301,12 @@ mkdir -p ~/.config/omarchy/themed
# installed from a package (AUR, .deb, .rpm)
cp /usr/share/tailtui/tailtui.toml.tpl ~/.config/omarchy/themed/

# or from a clone of this repository
# from a clone of this repository
cp contrib/tailtui.toml.tpl ~/.config/omarchy/themed/

# built with `go install` (no template on disk — fetch it)
curl -fsSL -o ~/.config/omarchy/themed/tailtui.toml.tpl \
https://raw.githubusercontent.com/Phundahl/tailtui/main/contrib/tailtui.toml.tpl
```

Omarchy renders the template into the active theme directory on every switch,
Expand Down
Loading