Key changes:
- **src/config.rs** – `LiveVueConfig` (server host/port, brotli quality +
window size), loaded from `livevue.toml`. A notify-based file watcher
reloads the config on any file change; a SIGHUP handler does the same on
demand. Falls back to compiled-in defaults when the file is absent.
- **src/brotli_layer.rs** – `BrotliBody`, a custom `http_body::Body` wrapper
that streams brotli-compressed data through a single persistent
`brotli::CompressorWriter`. The encoder survives across SSE event flushes,
so its sliding window accumulates context from all prior events —
progressively better compression as the stream grows. Both quality (0–11)
and window size (lgwin 10–24, i.e. 1 KB – 16 MB) are taken from config.
`brotli_compression` is an axum `from_fn_with_state` middleware that
activates only when the client sends `Accept-Encoding: br`.
- **src/server.rs** – `AppState` gains a `config: SharedConfig` field.
`AppState::new` takes the config; `AppState::new_default` is a zero-config
convenience constructor.
- **livevue.toml** – documented example config with inline comments
explaining each field and the brotli window-size tradeoff table.
- **examples/todo** – loads config via `load_and_watch_config`, derives the
bind address from `config.server`, and applies `brotli_compression` as a
router layer.
https://claude.ai/code/session_01UnQQkkwts64FPUsSzFfdQb
- Add `publish_key()` default method to `Query` trait (returns `None`)
- Add `mutation_exec!` macro for SQLite INSERT/UPDATE/DELETE ops; overrides
`publish_key()` so the mutation carries its own invalidation key
- Add `Store::exec()` which runs a mutation and auto-publishes its key —
action handlers no longer need a separate `store.publish()` call
- Add `PgQuery` trait + `pg_query_one!` / `pg_query_all!` macros
(feature-gated on `pg_replication`) mirroring the SQLite Query API
- Add `cx.run_pg(pool, query)` to `RenderContext` which executes a PgQuery
and auto-subscribes its cache key — no more manual `cx.subscribe()` calls
- Update todo example: replace plain mutation fns with `mutation_exec!` structs
and `store.exec()` calls; remove `action_then_publish` helper
- Update pg_replication example: add `ListMessages` via `pg_query_all!` and
replace manual subscribe + raw query with `cx.run_pg()`
https://claude.ai/code/session_01HXe8rAZPweU9j2piBo9MdG
Two bugs that caused signals to not work on the frontend:
1. data-on-signal-change → data-on-signal-patch
The data-on-signal-change attribute was removed in RC8.
The replacement is data-on-signal-patch.
2. data-bind-newTodo="" → data-bind="newTodo"
HTML normalises attribute names to lowercase at parse time, so
data-bind-newTodo becomes data-bind-newtodo in the DOM. DataStar
would then bind to signal $newtodo instead of $newTodo, breaking
the two-way binding. The value syntax data-bind="newTodo" preserves
the camelCase name correctly.
https://claude.ai/code/session_01JThiQbp3Bn9J1VhBpRuz4u