Skip to content

Suite 46 + 47: broadcast client feedback, tags & filters, docs refresh - #44

Merged
aryavenkatesan merged 7 commits into
mainfrom
suite-47-tags-and-filters
Aug 4, 2026
Merged

Suite 46 + 47: broadcast client feedback, tags & filters, docs refresh#44
aryavenkatesan merged 7 commits into
mainfrom
suite-47-tags-and-filters

Conversation

@aryavenkatesan

Copy link
Copy Markdown
Collaborator

Lands suites 46 and 47 together, plus a docs refresh. main had no commits absent from this branch, so this is a clean merge.

What's in here

  • Suite 46 — broadcast client-feedback round 2 (46.1–46.10) and follow-up fixes.
  • Suite 47 — tags and filters: a new /facets endpoint with counts that survive pagination, useFacets on the frontend, and a reworked Sidebar that absorbs the old TagsBar.
  • Docshuman-docs/ refreshed now that the Docker cutover is settled fact; containerization.md loses its "provisional" marker.

Fix made while prepping

events/tests/test_facets_api_db.py created Category rows for music and art, but migration 0012 already seeds both slugs — create() hit the unique-slug constraint and failed the db tier. Switched to get_or_create. Test-only; no product behavior changed.

Verification

All CI-mirroring checks green locally:

Check Result
ruff check / format clean, 263 files
mypy no issues, 263 files
backend --tag=fast 300 passed
backend --tag=db 485 passed
theCommonsWeb lint / build 0 errors (9 pre-existing warnings)
theCommonsWeb fast / db 28 / 7 passed
broadcastWeb build clean
broadcastWeb fast / db 70 / 22 passed

No new migrations in this branch.

🤖 Generated with Claude Code

aryavenkatesan and others added 7 commits August 3, 2026 16:46
Root-caused three tickets live before building; their stated premises
were wrong.

46.1 (P0): categories/tags shipped empty for two independent reasons,
neither the one the ticket blamed. The select2 search never filters, so
the dropdown always renders the full 62-term vocabulary and the 1200ms
sleep waited on a query that never fires. More importantly our search
terms did not exist on the destinations: only 4 of 11 Triangle Weekender
terms and 0 of 16 ABC11 terms were real labels. Rewrote both maps against
the live vocabularies and added exact->prefix ranked matching. Rejected
the ticket's proposed length guard, which would have blocked
"Food" -> "Food & Drink"; anchoring keeps "Market" out of "Art Market and
Exhibition" without penalizing length. Unmatched terms now surface in the
review banner instead of being dropped silently.

46.9: #eventStartDate-label is a Fluent UI <input>, not a <label> — the
selector was always correct, and the retry logic already shipped in suite
31. Corrected the misleading hint and comment.

46.4: form-dim already covered the locked state; only the "Make changes"
hint was missing.

46.3: refresh-on-401/403 with single-flight de-duplication. Discriminates
by token identity, because views.py overloads 403 for both stale JWTs and
legitimate access-code denials — blanket refreshing swallowed real
business errors.

Also: SECURE_PROXY_SSL_HEADER so upload URLs are https (46.2), numeric
cost normalization at the adapter boundary (46.5), "Image URL" copy fix
(46.6), contact-summary edit affordance (46.7), ABC11 image field (46.8),
and docs/broadcast.md access-code correction (46.10).

Backend 265 tests OK + ruff clean; broadcastWeb 92/92 + build clean.
Manual live-form QA still outstanding for 46.1, 46.8, 46.9.

Co-Authored-By: Claude <noreply@anthropic.com>
Drop the "provisional" caveat from containerization.md now that prod has
run on Docker Compose since 2026-08-02 (PR #41), and add per-doc
"Last updated" lines naming the commit each was checked against.

Co-Authored-By: Claude <noreply@anthropic.com>
test_category_filter_narrows_counts_consistently_with_list created
Category rows for "music" and "art", but migration 0012 already seeds
both slugs, so the create() raised IntegrityError on the unique slug
constraint and failed the db tier. Use get_or_create instead.

Test-only change; no product behavior touched.

Co-Authored-By: Claude <noreply@anthropic.com>
47.2: new events/tagging.py derives weekends/evenings/daytime from
Event.date in America/New_York, replacing LLM-guessed day-part tags.
Wired into all three write paths (bulk publish, both direct-submission
branches, EventSerializer.create) via an apply_tags helper that strips
incoming day-part slugs so the computed value always wins. Removed the
three slugs from VALID_TAGS and dropped the obsolete prompt rule.

USE_TZ=True stores datetimes in UTC regardless of TIME_ZONE, so the
conversion to ET is load-bearing: without it any event after 8pm ET
lands on the next UTC day and tags wrong. Regression test asserts
2026-08-15T01:00:00Z (Fri 9pm ET) -> {evenings, weekends}.

47.3: retag_events management command (re-runnable, --dry-run)
backfills every existing event, preserving non-day-part tags, and
flushes the events cache — which also covers facet counts, since they
share the same version counter. Plus migration 0025 deleting the
retired lgbtq-friendly/speaks-spanish and orphaned *-only Tag rows,
with an explicit no-op reverse (event links can't be reconstructed).

Prod run order: retag_events BEFORE migrate, else the command's
"collapsed" count reads 0 (harmless; tags recompute from event.date).

Backend 807 tests green, ruff clean, no missing migrations.

Co-Authored-By: Claude <noreply@anthropic.com>
Formatting only — no behavior change. Unblocks CI's
`ruff format --check` gate.

Co-Authored-By: Claude <noreply@anthropic.com>
@aryavenkatesan
aryavenkatesan merged commit 7cfab5d into main Aug 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant