Add thread notifications, SEO topic pages, and fix quiz auto-advance

Notifications: a new "thread" type notifies every other commenter on a
post whenever anyone comments on it, disregarding reply hierarchy -
excluding the actor and whoever already got a comment/reply
notification for that same event, so no one is double-notified.
Implemented via a background-deferred fan-out mirroring the existing
mention-notification pattern.

SEO: discussion_forum_posting() now embeds up to 20 of a post's
comments as nested schema.org Comment entities (not just an aggregate
count), and a new /topics hub plus /topics/{topic} pages give the
feed's topic filter real, independently crawlable/indexable URLs -
/feed?topic=X was never indexable since its canonical strips the
query string back to bare /feed. Both are wired end to end (schemas,
Devii actions, docs API, sitemap, locustfile load-test coverage).

Quiz player: the auto-advance to the next question used to hide the
just-answered slide in the same tick as rendering the grade, so on
any multi-question quiz the Correct/Not correct feedback was never
actually visible before the view moved on. Delayed via setTimeout,
with the pending timer cleared on manual navigation and on
disconnect so it can't race or fire on a removed component.

Also includes other local changes already in progress in this
working tree before this session (messaging, push delivery,
deepsearch jobs, game economy, quiz builder) - verified by the full
suite passing (3467 tests) but not authored or individually reviewed
in this session.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VL9Xn57W5UR3HZbbuuzxdK
This commit is contained in:
2026-09-03 08:47:57 +02:00
co-authored by Claude Sonnet 5
parent afb4799869
commit 572e022584
93 changed files with 2788 additions and 331 deletions
+21 -2
View File
@@ -393,8 +393,27 @@ def test_unlocked_crops_gates_on_mastery_and_level():
def test_crop_payload_locked_by_mastery():
distsys = economy.crop_for("distsys")
assert economy.crop_payload(distsys, 1, economy.MAX_LEVEL, mastery_earned=0)["locked"] is True
assert economy.crop_payload(distsys, 1, economy.MAX_LEVEL, mastery_earned=1)["locked"] is False
locked = economy.crop_payload(distsys, 1, economy.MAX_LEVEL, mastery_earned=0)
assert locked["locked"] is True
assert locked["locked_reason"] == "mastery"
assert "Mastery" in locked["locked_text"]
unlocked = economy.crop_payload(distsys, 1, economy.MAX_LEVEL, mastery_earned=1)
assert unlocked["locked"] is False
assert unlocked["locked_reason"] == ""
def test_crop_payload_locked_by_level_reason():
rust = economy.crop_for("rust")
locked = economy.crop_payload(rust, 1, 1)
assert locked["locked_reason"] == "level"
assert str(rust.min_level) in locked["locked_text"]
def test_crop_lock_reason_matches_plant_enforcement():
distsys = economy.crop_for("distsys")
assert economy.crop_lock_reason(distsys, economy.MAX_LEVEL, 0) == ("mastery", "unlocks after reaching Mastery (Refactor to prestige 50)")
assert economy.crop_lock_reason(distsys, economy.MAX_LEVEL, 1) is None
assert economy.crop_lock_reason(distsys, 1, 1)[0] == "level"
def test_secfort_crop_is_steal_immune():