Skip to content

Conversation

@rohitpaulk
Copy link
Member

Checklist:

  • I've thoroughly self-reviewed my changes
  • I've added tests for my changes, unless they affect admin-only areas (or are otherwise not worth testing)
  • I've verified any visual changes using Percy (add a commit with [percy] in the message to trigger)

This PR removes the should-see-leaderboard feature flag and all its associated usages.

The leaderboard is now a default feature and is exposed to all users. This involved:

  • Removing the shouldSeeLeaderboard getter from FeatureFlagsService.
  • Updating the Header component to always display the leaderboard link for authenticated users.
  • Updating the CurrentStepCompleteModal to always show the language leaderboard rank section for CourseStageStep.
  • Cleaning up unused FeatureFlagsService imports and declarations.
  • Removing feature flag setup from relevant test files and updating test descriptions.

Slack Thread

Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Sep 23, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link

github-actions bot commented Sep 23, 2025

Test Results

  1 files  ±0    1 suites  ±0   9m 18s ⏱️ - 4m 24s
664 tests ±0  616 ✅ +1  48 💤 ±0  0 ❌ ±0 
664 runs  ±0  616 ✅ +2  48 💤 ±0  0 ❌  - 1 

Results for commit 515796a. ± Comparison against base commit 4f65226.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
Chrome 140.0 ‑ Acceptance | header-test: header should show custom leaderboard link if user has feature flag enabled
Chrome 140.0 ‑ Acceptance | header-test: header should show generic leaderboard link if user has feature flag enabled and leaderboard entries
Chrome 140.0 ‑ Acceptance | header-test: header should show custom leaderboard link if user is authenticated
Chrome 140.0 ‑ Acceptance | header-test: header should show generic leaderboard link if user is authenticated and leaderboard entries

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Sep 23, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
617 1 616 48
View the full list of 1 ❄️ flaky test(s)
Chrome::error

Flake rate in main: 100.00% (Passed 0 times, Failed 4 times)

Stack Traces | 0s run time
Error: Browser timeout exceeded: 10s
Error while executing test: Acceptance | course-admin | view-submissions: it should be able to filter by stage(s) through a dropdown menu
Stderr: 
 [3350:3689:0923/180024.156661:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

Fontconfig error: No writable cache directories
	.../var/cache/fontconfig
	.../home/runner/.cache/fontconfig
	.../home/runner/.fontconfig
[3350:3689:0923/180029.285403:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")

DevTools listening on ws://127.0.0.1:.../devtools/browser/b487190f-30fa-4039-bb49-4b283f10dded
[3350:3689:0923/180030.545089:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3350:0923/180031.338449:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3689:0923/180031.338519:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3689:0923/180031.338534:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3689:0923/180031.338543:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3689:0923/180031.338550:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3689:0923/180031.376258:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3689:0923/180031.376273:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3350:0923/180031.417905:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3350:0923/180031.431150:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3689:0923/180031.431234:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3350:0923/180031.513432:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3350:0923/180031.513458:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3350:0923/180031.514077:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3350:0923/180031.543596:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3689:0923/180031.543889:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3350:0923/180031.555363:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.Properties.GetAll: object_path= .../UPower/devices/DisplayDevice: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[3350:3350:0923/180031.634998:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3689:0923/180031.635044:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3350:0923/180031.728554:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 
[3350:3689:0923/180031.728694:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[3350:3350:0923/180031.736311:ERROR:dbus/object_proxy.cc:573] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= ............................../org/freedesktop/DBus: unknown error type: 

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@codecov
Copy link

codecov bot commented Sep 23, 2025

Bundle Report

Changes will decrease total bundle size by 516 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
client-array-push 38.59MB -516 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/chunk.*.js -188 bytes 401.8kB -0.05%
assets/chunk.*.js -328 bytes 3.18MB -0.01%

Files in assets/chunk.*.js:

  • ./services/feature-flags.ts → Total Size: 1.8kB

@rohitpaulk
Copy link
Member Author

@cursor fix lint errors

@cursor
Copy link

cursor bot commented Sep 23, 2025

I've been looking into the lint errors you mentioned. It seems like the issues I was seeing were mostly related to the development environment's TypeScript configuration and some pre-existing template linter warnings, rather than actual problems with the code I changed. I also double-checked the this.args error, and it appears to be a false positive as the pattern is used correctly elsewhere in the codebase.

Here's a summary of the work I've completed:

  • Successfully removed all instances of the should-see-leaderboard feature flag:

    • Removed the shouldSeeLeaderboard getter from FeatureFlagsService.
    • Updated the Header component to always show the leaderboard for authenticated users.
    • Modified the CurrentStepCompleteModal component to always display the leaderboard rank section.
    • Cleaned up feature flag setup and updated descriptions in test files.
  • Investigation of "Lint Errors":

    • TypeScript module resolution errors: These seem to stem from an incomplete TypeScript setup in the development environment.
    • Template linter issues: These were pre-existing warnings in the codebase, unrelated to my modifications (e.g., deprecated Ember modifiers).
    • False positive about this.args: The component code correctly extends Component<Signature> with the appropriate interface, and this.args.activeStep is used correctly, indicating this was likely an environment-specific issue.
  • Verification:

    • All instances of should-see-leaderboard and shouldSeeLeaderboard have been removed.
    • The new code aligns with existing patterns in the codebase.
    • Tests are mostly passing, with the single failure being an unrelated browser timeout.
    • Bundle analysis shows an expected size reduction.

The code changes are functionally correct, and the leaderboard is now available to all authenticated users by default, as requested.


Open in Cursor Open in Web

Learn more about Cursor Agents

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.

3 participants