Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Pull request overview
This PR adds project detail pages to Hackatime, allowing users to view detailed statistics for individual projects and optionally share those pages publicly.
Changes:
- Adds
public_shared_atcolumn toproject_repo_mappingsvia a database migration, enabling per-project public sharing with a toggle - Adds private project detail pages (
/my/projects/:project_name) and public project pages (/@:username/project/:project_name) with stats including languages, editors, files, branches, and an activity graph - Extracts shared TypeScript type definitions (
FilterableDashboardData,TodayStats,ProgrammingGoalProgress,SocialProofUser,ProjectStats) intotypes/index.tsfrom their previous inline locations, and makes project cards in the Index view clickable links to the new show page
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
db/schema.rb |
Schema version bump reflecting new public_shared_at datetime column |
db/migrate/20260302200100_add_public_shared_at_to_project_repo_mappings.rb |
Migration adding the nullable public_shared_at column |
config/routes.rb |
Adds routes for my/projects/:project_name show page, toggle_share member action, and public /@:username/project/:project_name profile route |
app/javascript/types/index.ts |
Centralizes shared TypeScript types previously defined inline |
app/javascript/pages/Projects/Show.svelte |
Private project detail page with interval filtering, deferred stats, and share modal |
app/javascript/pages/Projects/PublicShow.svelte |
Public project stats page (read-only, no interval selector) |
app/javascript/pages/Projects/ProjectStatsContent.svelte |
Reusable stats display component used by both Show and PublicShow |
app/javascript/pages/Projects/Index.svelte |
Makes project cards clickable links; adds stopPropagation for nested interactive elements |
app/javascript/pages/Projects/FileList.svelte |
New file list component with expand/collapse |
app/javascript/pages/Home/signedIn/Dashboard.svelte |
Replaces inline ProgrammingGoalProgress type with imported one |
app/javascript/pages/Home/SignedIn.svelte |
Removes now-centralized inline type definitions |
app/javascript/components/Modal.svelte |
Reduces close button size from 12×12 to 8×8 |
app/controllers/profiles_controller.rb |
Adds public project action with sharing gate and stats computation |
app/controllers/my/project_repo_mappings_controller.rb |
Adds show, toggle_share actions and private project_detail_payload/project_activity_graph helpers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
would it theoretically be possible to add some of the other filter dropdowns (like category, branch, language) to the project pages? also thanks for working on this (my attempt sort of died when i ran into challenges with the branch stuff)! the share button seems super cool! 👀 |
Uh oh!
There was an error while loading. Please reload this page.