Commit graph

1252 commits

Author SHA1 Message Date
Mahad Kalam
8c0227cb57
Bye, warehouse! (#994) 2026-02-23 20:16:03 +00:00
Mahad Kalam
7317cc45e7
Imports + mirrors :DD (#993)
* Imports + mirrors :DD

* Stuff and things

* Fixes

* Fixes x2

* Tests!

* Hmm
2026-02-23 15:00:43 +00:00
Mahad Kalam
73223f1ec7
TIL Hackatime uses the Disk service?! (#991) 2026-02-21 12:42:56 +00:00
Mahad Kalam
1b7e0462dc
Make large exports go to ActiveStorage (#990)
* Make em go to ActiveStorage

* Oops!
2026-02-21 11:53:18 +00:00
Mahad Kalam
44777ad644
Data export fix + async exports + more tests (#989)
* Fix data export + Capybara

* Continue?

* A ton of system tests :D + test cleanup

* More system tests

* Add placeholder keys for tests?

* Get rid of the double-query!

* Speed up CI Chrome setup by avoiding snap installs

* Pin CI Chrome version to reduce system test flakiness

* Stabilize integrations settings system test interaction
2026-02-21 11:28:21 +00:00
Mahad Kalam
ef50839744
Fix modal close button alignment when icon is present (#988)
Change flex alignment from items-center to items-start so the X button
stays at the top-right corner instead of vertically centering with the
icon + title block.
2026-02-20 18:44:23 +00:00
Mahad Kalam
d3af585822
Several tests and fixes. (#987)
* Several tests and fixes.

* Harden safe_return_url to reject URLs containing colons

Adds an extra guard in safe_return_url to reject paths containing ':'
characters, preventing edge-case scheme-like redirects (e.g.
/javascript:...). Addresses CodeQL URL redirection warning.

* Oops!
2026-02-20 15:30:48 +00:00
Mahad Kalam
e3456be187
goaaaal! (#985)
* Add goals

* Fix up some migrations

* Formatting

* Simplify migration

* Update test/controllers/settings_goals_controller_test.rb

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update test/controllers/settings_goals_controller_test.rb

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Fix svelte-check issues, make CI less janky on dev

* svelte-check/fix tests

* Fix N+1s

* Formatting!

* More tests, fix anonymization and N+1

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-19 18:47:01 +00:00
ShyMike
a5ad8bf6cb
Add heatmap to badges page (#981)
* add heatmap to badges page

* fix: add hash + fmt

* Fix slashes

---------

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-02-19 16:06:53 +00:00
Nathan
891b28b01a Add start/end date to admin projects 2026-02-18 10:28:12 -05:00
Mahad Kalam
f6ed964b2f
Use Bun for deps (#980)
* Use Bun for deps

* Oops, formatting
2026-02-18 09:11:15 +00:00
Mahad Kalam
5aabfe8fa7
UI fixes (#979)
* Small UI fixes

* OAuth2 applications tweaks
2026-02-18 09:02:13 +00:00
Mahad Kalam
3fdc2bfced
Small tweaks to /wakatime-alternative (#978) 2026-02-18 08:41:33 +00:00
Mahad Kalam
17d9679547
llms.txt/llms-full.txt/.md docs routes, SSR (#977)
* llms.txt/llms-full.txt/.md docs routes, SSR

* Fixes!

* Tests!

* More fixes

* Fix SSR!

* Update bin/docker-entrypoint

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Use Bun for SSR!

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-18 08:34:06 +00:00
Mahad Kalam
3fbc925572
Remove unused ERBs, /wakatime-alternative (#976)
* Remove unused ERBs, /wakatime-alternative

* Update grid icons

* Fix classes
2026-02-18 06:44:27 +00:00
Mahad Kalam
32c97bbf1b Merge branch 'main' of https://github.com/hackclub/hackatime 2026-02-18 01:16:34 +00:00
Mahad Kalam
6b3f6d3adb GSC verify 2026-02-18 01:16:24 +00:00
Mahad Kalam
79c6bb80b2
Allow disabling Hackatime v1 import via Flipper flag (#975)
* Allow disabling Hackatime v1 import via Flipper flag

* Handle Greptile suggestion
2026-02-18 00:46:33 +00:00
Mat Manna
ac4073c7e9
Update some homepage stuff (#972)
* add new icon from bounty

* Add sidebar to docs pages with dashboard link

- Add dedicated sidebar to docs pages (Index and Show)
- Hide authenticated user nav on docs pages via hide_nav flag
- Add Hackatime logo and 'Go to Dashboard' button to sidebar
- Add 17 popular editors to sidebar navigation
- Remove breadcrumbs from docs pages
- Add /home route for signed-out homepage

* Update homepage CTA text and docs screenshot

* Add 'More' button to homepage editor grid with docs anchor

* feat: add more editors to homepage editorgrid

* fix: weirdness in docs sidebar

* implement isActive function suggestion

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Fixes?

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Mahad Kalam <mahadkalam1234@gmail.com>
Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-02-18 00:25:07 +00:00
Mahad Kalam
4077de8206
Fix contrast on select items (#973) 2026-02-18 00:09:33 +00:00
Mahad Kalam
3f5470464a
New signed out page, new sign in page, no minimal login, fix redirect (#968)
* New signed out page, new sign in page, no minimal login, fix redirect
issue

* Format + deps

* Implement that fix

* Readd the numbers

* Remove the +s
2026-02-17 17:08:11 +00:00
Mahad Kalam
ef94a9da9d
OAuth2 apps inertia'd! (#966)
* OAuth2 apps Inertia'd!

* Rose Pine/Rose Pine Dawn themes!

* Run formatting pass

* add some tests?
2026-02-17 13:45:44 +00:00
Mahad Kalam
7dd45cd965
Stop preloading rails_modals on Firefox (#965) 2026-02-16 23:37:59 +00:00
Mahad Kalam
f3350234f5
Modals! New projects page! Better dev imports! Fix OAuth2 projects! (#958)
* Modals! New projects page!

* Update modal close buttons

* Make progress bar better

* Various fixes + tests

* Formatting

* Fix tests?
2026-02-16 23:11:25 +00:00
Mahad Kalam
044a1e4fea
Use Inertia deferred props + Prettier/svelte-check (#957) 2026-02-16 10:29:04 +00:00
Mahad Kalam
d203e1118f Make badges use the correct theme colour 2026-02-16 09:54:58 +00:00
Mahad Kalam
b839ad79e4
Fix docs' responsiveness (#956) 2026-02-16 09:51:10 +00:00
Mahad Kalam
d395617a3e
Revert "Fast leaderboards (#954)" (#955)
This reverts commit ac32690ee9.
2026-02-16 00:48:36 +00:00
Mahad Kalam
aaf1a3dedb Merge branch 'main' of https://github.com/hackclub/hackatime 2026-02-16 00:38:58 +00:00
Mahad Kalam
f468d2470e New OG image! 2026-02-16 00:38:50 +00:00
Mahad Kalam
ac32690ee9
Fast leaderboards (#954)
* Fast leaderboards

* oop

* CUT index

* Update leaderboard_update_job.rb

* Update db/migrate/20260215223000_add_leaderboard_heartbeat_index.rb

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update app/models/concerns/heartbeatable.rb

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-16 00:05:14 +00:00
Mahad Kalam
43060a0d76 Further colour fixes 2026-02-15 23:25:04 +00:00
Mahad Kalam
148348df6f Fix barchart colours on non-classic themes 2026-02-15 23:20:11 +00:00
Mahad Kalam
e3b6ec6514 hackatime-v2 -> hackatime-help 2026-02-15 22:42:19 +00:00
Mahad Kalam
7273fad8dd
Themes, pt2 (#953)
* Themes pt1

* Themes pt2

* Standard -> Classic, new default is Gruvbox Dark

* Make settings shell fatter

* more theme fixes :nodnod:

* Remove orphaned file
2026-02-15 22:36:34 +00:00
Mahad Kalam
dd978bbeb9
Themes! (#952)
* Themes pt1

* Themes pt2

* Standard -> Classic, new default is Gruvbox Dark

* Make settings shell fatter
2026-02-15 22:14:46 +00:00
Mahad Kalam
a375cf9c45
Fix build + remove unused files + fix that weird link behaviour with non-Inertia pages (#951)
* Remove unused files

* Fix build!

* unlinkify when it matters + no what is hackatime
2026-02-15 18:16:33 +00:00
Mahad Kalam
42ceec73cb
Upgrade Inertia + new settings page (#950)
* New settings?

* New Settings page!

* Vendor Inertia

* Fix some issues

* <Link>ify the site!
2026-02-15 17:32:26 +00:00
Mahad Kalam
c588258aba
Unify OAuth2 and unauthenticated projects routes (#948) 2026-02-15 13:59:44 +00:00
Mahad Kalam
168c7f1da0
WakaTime setup: above -> below (#945)
* WakaTime setup: above -> below

* Fix the other above :)
2026-02-15 13:32:26 +00:00
End
5f5eb93aed
Allow rotating OAuth applications' secrets (#933)
* feat(oauth): add rotate_secret action for oauth applications

Add POST routes and controller actions for both owner-facing and admin
OAuth application secret rotation using Doorkeeper's renew_secret.

* feat(oauth): add rotate secret button and flash display to views

Add Rotate Secret button with confirmation dialog to both owner and
admin show pages. Display rotated secret via flash with copy button.

* fix(oauth): restrict admin secret rotation to superadmins only

Add explicit superadmin authorization check in rotate_secret action.
The route constraint already limits access, but this adds defense in
depth at the controller level to prevent privilege escalation.

* fix(oauth): address PR review feedback for secret rotation

- Remove duplicate stale lines in admin controller
- Fix indentation in admin controller, both show views
- Add superadmin guard to admin rotate_secret action
- Use I18n for flash messages in doorkeeper controller
- Add respond_to HTML/JSON branches matching existing patterns
- Fix double space in before_action array

* let's clean up a bit?

* pt 2.

* Make it actually work :P

---------

Co-authored-by: Mahad Kalam <mahadkalam1234@gmail.com>
Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-02-15 13:28:39 +00:00
Mahad Kalam
08a22f2b25 Fix project timeline name overflow 2026-02-15 11:19:29 +00:00
Mahad Kalam
cba729e73f Fix 10-minute asset delay 2026-02-15 10:33:05 +00:00
Mahad Kalam
f16c991808
Remove unused public_activity + downsize activity graph Inertia payload (#946)
* Remove public_activity

* Continue removal

* Uh-oh, re-add pganalyze

* Fix Vite HMR not working
2026-02-15 09:54:29 +00:00
Mahad Kalam
5be691a0a2
Fix setup issues (#944) 2026-02-15 09:08:42 +00:00
Mahad Kalam
ad95cf6c4f
Add PostHog (#906)
* Add PostHog

* Queue Posthog *after* adding to DB

* Update app/services/posthog_service.rb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add /api/v1/banned_users/counts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-15 08:44:39 +00:00
Mahad Kalam
8621dfa3ed
Regional leaderboards (#943)
* Regional leaderboards

* Fix the bugs!

* bin/rubocop -A
2026-02-15 08:29:00 +00:00
Dennis Upton
f213e8b38b
Added delimiter to "Heartbeats in the Last 7 Days" (#934)
Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-02-15 01:35:12 +00:00
twonfi
789f84ec7d
Add instructions for JetBrains and Sublime Text and fix screenshots (#935)
Added JetBrains (fka in step 2 as "PyCharm," even though JetBrains has other IDEs with identical plugins) and Sublime Text.

Also fixed VS Code status bar screenshots (previously using the CDN but no longer works) by uploading them to /public to avoid relying on third parties.

What this does not fix:
- Adding Unity editor.
- Adding the "Heartbeat detected!" from the VS Code setup.

Instructions should be accurate (based off /docs).

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-02-15 01:32:03 +00:00
Mahad Kalam
8a0e2dbffe
Fix stat card gaps when another card has >=2 lines (#940) 2026-02-15 01:29:21 +00:00