Skip to content

Conversation

@jjroelofs
Copy link
Contributor

Summary

This PR updates the AI Sorting UI to be more accessible to content marketers and adds the experiment decorator for human-readable labels in RL reports.

UI Terminology Updates

  • "Turns" → "Impressions" for content visibility tracking
  • "Rewards" → "Conversions" for click tracking
  • "algorithm" → "system" for less technical language
  • Removed "machine learning" from description to simplify language

New Experiment Decorator

  • Add AiSortingExperimentDecorator service
  • Provides human-readable entity labels for arm IDs in RL reports
  • Resolves entity titles from the view's base entity type
  • Shows entity title with ID in parentheses (e.g., "Article Title (123)")

Fixes #16

Test Plan

  • Open Views UI → AI Sorting settings dialog
  • Verify "Impressions" and "Conversions" terminology is shown
  • Check RL Reports page shows entity titles for ai_sorting experiments
  • Verify decorator works for different entity types (nodes, taxonomy terms)

Jurriaan Roelofs and others added 2 commits November 4, 2025 15:02
- Add typed properties for all injected services (PHP 8.0+ syntax)
- Fix drupal-check script to use composer require drupal/rl instead
  of local mounting for consistent cross-environment testing
- Add @phpstan-ignore comments for standard Drupal patterns:
  - Views QueryPluginBase SQL-specific methods
  - Views ResultRow dynamic properties
  - new static() in dependency injection
  - Drupal static calls in form context
- Pass all linters with 0 errors, 0 warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update UI strings to be more accessible to content marketers:
- Change "Turns" to "Impressions" for content visibility tracking
- Change "Rewards" to "Conversions" for click tracking
- Change "algorithm" to "system" for less technical language
- Remove "machine learning" from description

Add experiment decorator for human-readable labels:
- Create AiSortingExperimentDecorator service
- Register decorator in ai_sorting.services.yml with rl.experiment_decorator tag
- Decorator provides entity labels for arm IDs from view base entity type
- Shows entity title with ID in parentheses in RL reports

Fixes #16
@jjroelofs jjroelofs merged commit 6f2ba3b into 1.x Jan 27, 2026
2 checks passed
@jjroelofs jjroelofs deleted the fix/ui-terminology-optimization branch January 27, 2026 10:37
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.

Add experiment decorator to show entity titles instead of IDs in RL reports

2 participants