Skip to content

Feature/gamification feature flag#509

Merged
xXPinkmagicXx merged 17 commits intogamificationfrom
feature/gamification-feature-flag
Apr 2, 2026
Merged

Feature/gamification feature flag#509
xXPinkmagicXx merged 17 commits intogamificationfrom
feature/gamification-feature-flag

Conversation

@xXPinkmagicXx
Copy link
Copy Markdown
Member

@xXPinkmagicXx xXPinkmagicXx commented Mar 25, 2026

A draft the the gamification feature flag.

If we want to have multiple test groups i guess we will have different invite codes and more feature flags.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

ArchLens detected architectural changes in the following views:
diff
diff
diff

# Gamification feature flag logic
from .model.user import User
from datetime import datetime, date
GAMIFICATION_START_DATE = date(2026, 4, 1)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be the start date?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now we do not have a start date. That logic is not needed. The experiment will have two groups one with gamification and one without from day one.

Enable general gamification features for users whose invitation code is exactly 'gamification'.
"""

GAMIFICATION_INVITE_CODE = "gamification"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be the invite code?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have an invite code for both the gamification and not gamification. So people do not know what group they are in.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for invite codes (randomly generated):

  • L2HPF8XK
  • CD8HGKKJ

@xXPinkmagicXx
Copy link
Copy Markdown
Member Author

image

Should the classroom tab on the "read" page be disabled?

mircealungu and others added 7 commits April 2, 2026 14:18
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Article.find_or_create() was using np_article.html (raw newspaper HTML)
instead of np_article.htmlContent (readability server output). This caused
navigation menus, headers, and footers to appear as bullet-point lists
in shared articles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The LLM returns JSON with literal newlines inside string values
(instead of escaped \n), which json.loads rejects in strict mode.
This caused fallback to DeepSeek (~90s vs ~3s for Anthropic).

Using json.loads(strict=False) accepts these control characters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skip expensive tokenization when caller only needs article metadata
(id, language, title). Used by SharedArticleHandler to show the
language choice modal immediately without waiting for NLP processing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Downloads and detects language + title without creating the article
in the DB. Returns instantly for already-existing articles.
Reverts the withContent flag — no longer needed since the share flow
now uses this lightweight endpoint instead of find_or_create_article.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@xXPinkmagicXx xXPinkmagicXx marked this pull request as ready for review April 2, 2026 12:20
@xXPinkmagicXx xXPinkmagicXx merged commit 073d5f1 into gamification Apr 2, 2026
2 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.

2 participants