Skip to content

Remove Cache::SetupSocialProofJob and Cache::UsageSocialProofJob#1321

Merged
skyfallwastaken merged 1 commit into
mainfrom
rm-social-proof
May 18, 2026
Merged

Remove Cache::SetupSocialProofJob and Cache::UsageSocialProofJob#1321
skyfallwastaken merged 1 commit into
mainfrom
rm-social-proof

Conversation

@skyfallwastaken
Copy link
Copy Markdown
Member

Summary of the problem

  • The setup social proof was pretty crap, especially since the Hackatime v2 beta heyday is long gone
  • The usage social proof was being recalculated... and then never used again (?!)

Describe your changes

Removes the social proof jobs + Svelte code.

Screenshots / Media

image

Copilot AI review requested due to automatic review settings May 18, 2026 21:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes unused “social proof” cache jobs and the associated Svelte/UI plumbing from the home page, simplifying the cache warmup/cron configuration and the Inertia props surface.

Changes:

  • Removed Cache::SetupSocialProofJob and Cache::UsageSocialProofJob (and their cron + warmup hooks).
  • Deleted the signed-in social-proof UI component and removed related props/types from the frontend.
  • Simplified StaticPagesController#index and signed-in props by dropping social proof calculation and payload fields.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/tasks/cache.rake Removes social proof jobs from the cache warmup list.
config/initializers/good_job.rb Removes cron entries for the deleted social proof cache jobs.
app/jobs/cache/usage_social_proof_job.rb Deletes unused cache job implementation.
app/jobs/cache/setup_social_proof_job.rb Deletes unused cache job implementation.
app/javascript/types/index.ts Removes SocialProofUser type that is no longer referenced.
app/javascript/pages/Home/signedIn/SocialProofUsers.svelte Deletes unused UI component for social proof avatars/message.
app/javascript/pages/Home/signedIn/SetupNotice.svelte Removes social proof props/import and renders only the setup CTA.
app/javascript/pages/Home/SignedIn.svelte Removes social proof props/types and stops passing them to SetupNotice.
app/controllers/static_pages_controller.rb Stops computing/passing social proof props and removes unused cache job calls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skyfallwastaken skyfallwastaken merged commit 73d0e09 into main May 18, 2026
18 checks passed
@skyfallwastaken skyfallwastaken deleted the rm-social-proof branch May 18, 2026 21:42
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 18, 2026

Greptile Summary

This PR removes two unused background cache jobs — Cache::SetupSocialProofJob and Cache::UsageSocialProofJob — along with all associated Svelte components, TypeScript types, cron entries, and rake task references. The cleanup is thorough: a grep across the full codebase confirms zero remaining references to any of the deleted symbols.

  • Cache::UsageSocialProofJob was being recalculated every minute but its result (@usage_social_proof) was never forwarded as an Inertia prop to SignedOut, making the computation entirely wasted work.
  • Cache::SetupSocialProofJob powered the avatar-stack social proof widget in SetupNotice.svelte; both the backend job and the SocialProofUsers.svelte component are fully removed, and SetupNotice now renders cleanly without those props.

Confidence Score: 5/5

Safe to merge — this is a complete, self-contained removal with no dangling references.

Every layer of the feature (backend jobs, cron config, rake tasks, Svelte components, TypeScript types, and controller props) is removed consistently. A full-codebase grep confirms no orphaned references remain. The UsageSocialProofJob result was already a no-op in production since it was never passed to the frontend, so its removal has no user-visible effect. The SetupSocialProofJob removal changes the setup notice UI, which the PR author intentionally accepted.

No files require special attention.

Important Files Changed

Filename Overview
app/controllers/static_pages_controller.rb Removes calls to both social proof jobs and their associated props from signed_in_props; @usage_social_proof was confirmed to never be passed to the frontend.
app/javascript/pages/Home/SignedIn.svelte Removes SocialProofUser type import and all three ssp_* props; SetupNotice now called with no arguments.
app/javascript/pages/Home/signedIn/SetupNotice.svelte Strips out all social proof props and removes the SocialProofUsers child component; component now renders without social proof data.
app/javascript/pages/Home/signedIn/SocialProofUsers.svelte File deleted entirely; avatar stack + overflow tooltip UI component removed.
app/javascript/types/index.ts Removes the SocialProofUser type definition; no remaining references to this type in the codebase.
app/jobs/cache/setup_social_proof_job.rb File deleted; job queried heartbeats across escalating time windows to build a social proof message for the setup notice.
app/jobs/cache/usage_social_proof_job.rb File deleted; job was running every minute but its result was assigned to @usage_social_proof and never forwarded as an Inertia prop.
config/initializers/good_job.rb Removes the two per-minute GoodJob cron entries for the deleted jobs; remaining schedule is unchanged.
lib/tasks/cache.rake Removes the two deleted job classes from the warm-cache rake task list.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph BEFORE["Before (removed)"]
        A1["GoodJob cron (every minute)"] --> B1["Cache::SetupSocialProofJob"]
        A1 --> B2["Cache::UsageSocialProofJob"]
        B1 --> C1["@ssp_message, @ssp_users_recent, @ssp_users_size"]
        B2 --> C2["@usage_social_proof (unused)"]
        C1 --> D1["signed_in_props → SetupNotice → SocialProofUsers.svelte"]
        C2 -. "never used" .-> X["❌ dropped"]
    end

    subgraph AFTER["After"]
        A2["GoodJob cron (every minute)"] --> B3["Cache::HomeStatsJob"]
        A2 --> B4["Cache::ActiveProjectsJob"]
        B3 --> C3["signed_out_props"]
        D2["signed_in_props → SetupNotice (no social proof)"]
    end
Loading

Reviews (1): Last reviewed commit: "Remove `Cache::SetupSocialProofJob` and ..." | Re-trigger Greptile

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