Remove the TUI; the web app is the frontend

money serve covers every screen the TUI had, so keeping both meant every
behaviour change landing twice. internal/tui goes, and with it bubbletea,
bubbles and lipgloss. `money` with no command now runs serve, the way it
used to open the TUI, and `money tui` is an unknown command.

Three invariants in CLAUDE.md were covered only by TUI tests. Two already
had web counterparts; TestPairedLegsAreNotUntagged is ported to the API:
a paired leg is neither listed as untagged nor offered to the rule
builder, while an unpaired one still is.

README's screen sections now describe the browser, which kept the
behaviour and changed only the controls. CLAUDE.md names the web
equivalents of the TUI functions its invariants pointed at, drops the tab
completion rule that only bubbles' textinput needed, and says how to test
the web app instead of how to drive a terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 18:51:54 +02:00
co-authored by Claude Opus 5.5
parent 8e4df08f43
commit ec8a844441
11 changed files with 228 additions and 5437 deletions
+6 -6
View File
@@ -1,8 +1,8 @@
// Package web serves the TUI's screens over HTTP: a JSON API over the index
// Package web is money's interactive frontend: a JSON API over the index
// and rules.toml, and a single page that drives it. It holds no logic of its
// own about money — every number is formatted, every glob matched and every
// pair decided by the same packages the TUI and the CLI use, so the browser
// never does arithmetic on an amount or re-implements the matcher.
// pair decided by the same packages the CLI uses, so the browser never does
// arithmetic on an amount or re-implements the matcher.
package web
import (
@@ -32,9 +32,9 @@ import (
//go:embed static
var static embed.FS
// Server is the long-lived counterpart of the TUI's Model.
// Server holds the index and the engines derived from rules.toml.
//
// Unlike the TUI it outlives any one edit of rules.toml by hand, so retag and
// It outlives any one edit of rules.toml by hand, so retag and
// import re-read that file (and import the account folders) before running,
// exactly as a fresh `money retag` or `money import` would. Between those, the
// engines are what the index was last derived from, which is what every screen
@@ -576,7 +576,7 @@ type descGroup struct {
Claimed bool
}
// rulePreview is the TUI builder's right-hand panel: what the glob would claim
// rulePreview is the rule builder's right-hand panel: what the glob would claim
// among everything still waiting for a rule, plus — when editing — what the
// rule claims already, since those are tagged and an untagged-only preview
// would be empty for a rule that works. Matching runs here rather than in the