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
48 lines
1.6 KiB
Python
48 lines
1.6 KiB
Python
# retoor <retoor@molodetz.nl>
|
|
|
|
from devplacepy.database import get_table, init_db
|
|
|
|
FILTERED_COLUMNS = {
|
|
"messages": ("uid", "sender_uid", "receiver_uid", "content", "read", "created_at", "updated_at"),
|
|
"workspace_quota_rules": ("uid", "owner_kind", "owner_id", "deleted_at"),
|
|
"workspace_editor_prefs": ("uid", "owner_kind", "owner_id", "deleted_at"),
|
|
}
|
|
|
|
|
|
def test_init_db_ensures_every_filtered_column(local_db):
|
|
for table, columns in FILTERED_COLUMNS.items():
|
|
target = get_table(table)
|
|
missing = [column for column in columns if not target.has_column(column)]
|
|
assert not missing, f"{table} is missing {missing}"
|
|
|
|
|
|
def test_a_partial_insert_cannot_reduce_the_messages_schema(local_db):
|
|
table = get_table("messages")
|
|
table.insert(
|
|
{
|
|
"uid": "schema-msg-1",
|
|
"sender_uid": "schema-user-1",
|
|
"receiver_uid": "schema-user-2",
|
|
"content": "partial row, no created_at",
|
|
}
|
|
)
|
|
try:
|
|
init_db()
|
|
assert get_table("messages").has_column("created_at")
|
|
rows = list(
|
|
local_db.query(
|
|
"SELECT uid FROM messages WHERE created_at IS NULL AND uid = :u",
|
|
u="schema-msg-1",
|
|
)
|
|
)
|
|
assert len(rows) == 1
|
|
finally:
|
|
get_table("messages").delete(uid="schema-msg-1")
|
|
|
|
|
|
def test_the_workspace_rule_tables_filter_on_a_column_that_exists(local_db):
|
|
from devplacepy.services.containers.workspace import editor, quota
|
|
|
|
assert quota._rule_for("user", "nobody-at-all") is None
|
|
assert editor.prefs_for("nobody-at-all") is None
|