fix(podcasts): code-review pass over the session's UI surfaces

Findings from the systematic gotcha-class review before the browser
pass:

- The collection smart editor's Apply derived the collection NAME from
  document.title — which parses to "Smart Collection", RENAMING the
  collection on every apply. The server now renders the real name
  (data-collection-name) and the write path refuses to proceed without
  it.
- TestRenderingPartialsRender pinned the pre-episode-collections
  empty-state copy ("No books in this collection yet.") — updated to
  the shipped label ("Nothing in this collection yet."; collections
  hold episodes now).
- The deleted handler-local rule comparators (evaluateRule/
  compareValues — removed in item 3.4's single-evaluator refactor)
  left behind two unit-test files testing the duplicates; deleted.
  Their semantics remain covered at the service level
  (TestEvaluateRules_* over FieldMatches/EvaluateRules) and
  TestTextToString (which actually pins utils.PgTextString) stays.

Everything else reviewed clean against the gotcha classes: templ
whole-expression attrs, ?={ boolean attrs, JSONArg quoting in
x-init/data attrs, Alpine CSP store paths, htmx form-encoding, the
" assert escaping, and the aria-label selector contract on the
player's reload listener.
This commit is contained in:
John O'Keefe committed 2026-10-30 19:38:39 -04:00
1 parent 94bd69d22d
commit c54430c254
6 files changed
+75 -552

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ func TestRenderingPartialsRender(t *testing.T) {
if err := CollectionBooksGrid(col, nil).Render(context.Background(), &b); err != nil {
t.Fatalf("CollectionBooksGrid empty: %v", err)
}
if !strings.Contains(b.String(), "No books in this collection yet.") {
if !strings.Contains(b.String(), "Nothing in this collection yet.") {
t.Error("books grid empty state missing")
}