discourse/spec/system
Osama Sayegh 27a843fa0f
FEATURE: beacon-based implementation for BPV (#38897)
This commit adds a new parallel page view counting system that uses `fetch` with `keepalive: true` to POST to a dedicated `/srv/pv` endpoint, gated behind the `use_beacon_for_browser_page_views` site setting.                                                                                                                                                                        

Unlike the existing deferred tracking (which piggybacks on AJAX headers), the beacon approach sends page view data directly as a JSON body. Both systems run simultaneously when the setting is enabled to allow comparing counts before fully migrating.

Key details:
                                                                                                                                                                                                                                      
* New middleware endpoint `POST /srv/pv` short-circuits with 204
* Dedicated `ApplicationRequest` counters (`*_beacon`) track beacon page views separately from the existing browser page view counters
* A separate `:beacon_browser_pageview` DiscourseEvent avoids double-firing with the existing `:browser_pageview` event
* On Ember route transitions, `routeDidChange` sends the beacon. For non-Ember pages (e.g. `/pub/*`), `pageview.js` handles it

Internal topic: t/179398.
2026-04-15 16:32:05 +03:00
..
composer FEATURE: Improve ProseMirror list handling for multi-line text (#38812) 2026-04-15 14:33:31 +10:00
emojis DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
groups DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
helpers DEV: make sure we don't load all data into memory when exporting chat messages (#22276) 2023-07-12 18:52:18 +04:00
page_objects UX: move post language selector to toolbar, deprioritize for AI (#39208) 2026-04-15 08:25:15 -04:00
tags UX: Show disabled tags with explanations in composer tag search (#39072) 2026-04-14 10:37:27 +02:00
topic_list DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_page DEV: Move 4 upcoming changes to stable (#39066) 2026-04-07 10:05:49 +10:00
about_page_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_about_config_area_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_api_keys_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_backups_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_badges_grouping_modal_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_badges_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_color_palette_config_area_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_color_palettes_config_area_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_config_login_and_authentication_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_config_theme_site_settings_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_customize_components_config_area_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_customize_emojis_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_customize_form_templates_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_customize_themes_config_area_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_customize_themes_spec.rb FEATURE: Allow changing source repo/branch/key for theme after installation (#38169) 2026-04-02 16:56:19 +01:00
admin_dashboard_community_health_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_dashboard_general_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_editing_objects_typed_theme_setting_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_email_login_readonly_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_email_logs_spec.rb FEATURE: Display bounce details for bounced emails with bounce keys (#35957) 2025-11-12 09:26:27 +08:00
admin_email_templates_index_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_email_templates_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_embeddable_hosts_spec.rb FEATURE: Add full app mode toggle to embedding admin page (#39052) 2026-04-01 15:02:51 -03:00
admin_filter_controls_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_flags_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_fonts_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_groups_list_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_logo_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_notices_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_onboarding_banner_spec.rb FIX: Limit site owner onboarding (#38873) 2026-03-25 11:45:48 -04:00
admin_permalinks_page_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_reports_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_search_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_sidebar_navigation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_bulk_action_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_category_bulk_action_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_label_formatting_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_locale_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_requires_confirmation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_search_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_tag_list_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_topic_chooser_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_site_setting_value_list_spec.rb UX: Show reorder buttons on touch devices for emoji-list settings (#36695) 2025-12-16 12:39:06 +01:00
admin_site_texts_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_staff_action_logs_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_upcoming_changes_sidebar_spec.rb FIX: Admin sidebar links corrupted when toggling upcoming changes (#38828) 2026-03-25 13:40:10 +10:00
admin_upcoming_changes_spec.rb FEATURE: Allow upcoming changes to control site setting defaults (#38815) 2026-04-08 13:05:44 +10:00
admin_user_badges_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_user_fields_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_user_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_users_list_spec.rb FIX: Make confirmation phrase matching locale-safe (#38923) 2026-03-27 16:38:57 +01:00
admin_watched_words_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_web_hook_events_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_webhooks_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_welcome_banner_config_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
admin_whats_new_spec.rb FEATURE: Merge permanent upcoming changes with new features feed (#38526) 2026-03-25 07:52:31 +10:00
blocks_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
bookmarks_spec.rb UX: add submenu for post bookmarks (#39172) 2026-04-13 13:37:53 +10:00
bootstrap_error_pages_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
bulk_pin_unpin_topics_spec.rb FEATURE: Add bulk pin/unpin topics (#39025) 2026-04-09 14:44:23 +08:00
capabilities_service_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
categories_page_spec.rb FIX: Render hashtag icons in category descriptions (#36867) 2025-12-29 09:54:34 -03:00
category_localizations_spec.rb DEV: Move enable_simplified_category_creation to stable (#39212) 2026-04-15 12:39:03 +10:00
category_moderator_self_lockout_spec.rb FIX: Warn moderators before group changes that would lock them out (#36811) 2025-12-24 14:43:00 +01:00
category_topics_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
change_owner_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
composer_image_optimization_spec.rb DEV: System specs for image optimization in composer (#36060) 2025-11-19 11:37:15 +10:00
composer_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
composer_uploads_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
content_localization_language_switcher_spec.rb DEV: Fix constant reassignment warnings in specs (#39233) 2026-04-13 23:44:52 +02:00
content_localization_spec.rb DEV: Fix constant reassignment warnings in specs (#39233) 2026-04-13 23:44:52 +02:00
content_security_policy_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
core_features_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
create_invite_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
csv_exports_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
custom_sidebar_sections_spec.rb DEV: Add d-icon-grid-picker component (#38943) 2026-04-07 16:34:50 -03:00
dev_tools_spec.rb DEV: Add an upcoming change toggler in the dev tools sidebar (#39027) 2026-04-02 07:50:27 +10:00
discourse_connect_provider_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
discourse_connect_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
discourse_id_spec.rb FIX: Leave username blank during OAuth signup when no valid suggestion exists (#36830) 2026-01-08 11:02:35 +01:00
discovery_breadcrumb_navigation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
discovery_category_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
discovery_h1_accessibility_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
discovery_list_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
dismissing_new_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
drafts_dropdown_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
edit_category_form_templates_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
edit_category_general_spec.rb DEV: Move enable_simplified_category_creation to stable (#39212) 2026-04-15 12:39:03 +10:00
edit_category_images_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
edit_category_security_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
edit_category_settings_spec.rb UX: Add dedicated moderation tab to simplified category editor (#39280) 2026-04-15 16:24:13 +08:00
edit_category_tags_spec.rb DEV: Move enable_simplified_category_creation to stable (#39212) 2026-04-15 12:39:03 +10:00
edit_category_topic_template_spec.rb DEV: Move enable_simplified_category_creation to stable (#39212) 2026-04-15 12:39:03 +10:00
editing_sidebar_categories_navigation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
editing_sidebar_community_section_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
editing_sidebar_tags_navigation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
editing_topic_timers_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
email_change_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
embed_mode_spec.rb UX: Show topic navigation and floating reply button in embed mode (#39185) 2026-04-13 14:17:03 -03:00
ember_deprecation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
filtering_topics_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
finish_installation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
flagging_post_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
forgot_password_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
grant_badge_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
group_activity_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
group_card_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
group_moderator_self_lockout_spec.rb FIX: Warn moderators before group changes that would lock them out (#36811) 2025-12-24 14:43:00 +01:00
hashtag_autocomplete_spec.rb UX: save potentially pending draft via sendBeacon on tab close (#39056) 2026-04-14 11:56:25 -03:00
header_search_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
header_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
homepage_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
i18n_override_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
image_grid_carousel_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
impersonation_spec.rb DEV: Silence expected error/debug output in system specs (#39164) 2026-04-13 13:59:41 +02:00
interface_color_selector_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
keyboard_shortcuts_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
lightbox_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
locale_spec.rb DEV: Silence expected error/debug output in system specs (#39164) 2026-04-13 13:59:41 +02:00
login_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
member_upcoming_changes_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
mobile_mode_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
navigation_menu_state_integration_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
network_disconnected_spec.rb DEV: Silence expected error/debug output in system specs (#39164) 2026-04-13 13:59:41 +02:00
new_category_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
pm_user_removal_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_history_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_menu_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_replies_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_selection_copy_quote_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_selection_fast_edit_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_small_action_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_stream_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
post_translation_spec.rb UX: move post language selector to toolbar, deprioritize for AI (#39208) 2026-04-15 08:25:15 -04:00
posts_page_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
powered_by_discourse_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
private_message_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
request_tracker_spec.rb FEATURE: beacon-based implementation for BPV (#38897) 2026-04-15 16:32:05 +03:00
review_filters_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
reviewables_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
s3_secure_uploads_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
s3_uploads_spec.rb FIX: Enforce content disposition on S3 presigned URLs (#38850) 2026-03-27 10:04:00 +08:00
script_encoding_spec.rb PERF: Use correctly-encoded JS files for webpack chunks on S3 (#35444) 2025-10-16 16:41:21 +01:00
scroll_manager_service_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
search_menu_hashtag_spec.rb FIX: search autocomplete with multiple tags (#38930) 2026-04-01 13:37:41 +04:00
search_shortcut_variation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
search_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
signup_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
simplified_category_creation_spec.rb UX: Add dedicated moderation tab to simplified category editor (#39280) 2026-04-15 16:24:13 +08:00
social_authentication_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
staff_writes_only_mode_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
table_builder_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
tag_group_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
tag_notification_level_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
tag_settings_spec.rb FEATURE: Tags get a dedicated settings page (#39057) 2026-04-02 17:52:30 +08:00
tags_index_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
tags_intersection_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
theme_qunit_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
topic_admin_menu_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
topic_bulk_select_spec.rb FIX: Unify dismiss new topics code path and toggle off bulk select (#38835) 2026-03-24 20:01:44 +01:00
topic_list_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
topic_page_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
topic_tracking_state_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
topics_unread_when_closed_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
unified_new_topic_list_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_activation_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_activity_bookmarks_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_activity_drafts_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_activity_posts_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_api_key_show_spec.rb DEV: Fix linting (#39013) 2026-03-31 17:36:04 +02:00
user_card_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_selector_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
user_tips_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_category_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_group_members_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_navigation_menu_preferences_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_reviewable_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_sidebar_as_anonymous_user_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_sidebar_mobile_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_sidebar_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_user_menu_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
viewing_user_private_messages_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
welcome_banner_spec.rb DEV: Silence expected error/debug output in system specs (#39164) 2026-04-13 13:59:41 +02:00
wizard_spec.rb DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00