Commit graph

501 commits

Author SHA1 Message Date
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
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
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
Mahad Kalam
7f300e32ba
Revert "Redirect to setup for new users entering OAuth flow (#931)" (#939)
This reverts commit bc2e64016d.
2026-02-15 01:03:40 +00:00
Mahad Kalam
91dd2c6052
Remove bad docs (#932) 2026-02-12 11:15:12 +00:00
Mahad Kalam
bc2e64016d
Redirect to setup for new users entering OAuth flow (#931)
* Fix redirects in new account flow?

* Fix redirects! And tests!

* Make tests better

* I will test this club

* Uh oh, let's redirect to WakaTime setup

* Make it actually detect new users properly?
2026-02-12 10:44:00 +00:00
Mahad Kalam
b9798b4f6c
Fix redirects! And add tests! (#930)
* Fix redirects in new account flow?

* Fix redirects! And tests!

* Make tests better

* I will test this club
2026-02-12 10:01:33 +00:00
Mahad Kalam
09fec72b2e
Fix redirects in new account flow? (#929) 2026-02-11 22:21:39 +00:00
Mahad Kalam
6c15a4a8b4 Loading skellies :D 2026-02-11 01:29:48 +00:00
Mahad Kalam
25d8035cff Revert "Add cache clear ubutton"
This reverts commit 5597574dad.
2026-02-11 01:10:23 +00:00
Mahad Kalam
5597574dad Add cache clear ubutton 2026-02-11 01:08:06 +00:00
Mahad Kalam
b3c40028d4 Merge branch 'main' of https://github.com/hackclub/hackatime 2026-02-11 00:55:05 +00:00
Mahad Kalam
19de2b0570 Fix lag (for now..) 2026-02-11 00:55:04 +00:00
Mahad Kalam
0d089a01e9
Re-add test param (#921)
* Re-add test_param

* Revert "`types_from_initializers` + `js_from_routes` + performance fixes (#918)"

This reverts commit 384a618c15.

* bin/rubocop -A
2026-02-10 23:14:49 +00:00
Mahad Kalam
384a618c15
types_from_initializers + js_from_routes + performance fixes (#918)
* Clean up code + js rails helper + perf

* Fix TFS initializer in production

* Update deps
2026-02-10 13:07:00 +00:00
Mahad Kalam
ddc25d1cfe Fixed (FINALLY!!) 2026-02-10 02:31:35 +00:00
Mahad Kalam
198f9be24d AGH 2026-02-10 02:00:12 +00:00
Mahad Kalam
1d1b1fdcfa man idek 2026-02-10 01:50:25 +00:00
Mahad Kalam
e6cf00ebab Let's sum em up! 2026-02-10 01:30:54 +00:00
Mahad Kalam
e1de26193a woosh 2026-02-10 01:26:14 +00:00
Mahad Kalam
4c64cffb1e fingers crossed this helps a bit 2026-02-10 00:00:37 +00:00
Mahad Kalam
26f3d4e814 Mahad's perf experiment 2026-02-09 23:50:01 +00:00
Mahad Kalam
ed75919d75 Fix toasts 2026-02-09 22:42:13 +00:00
Mahad Kalam
07b8a24836 Fix settings layout 2026-02-09 22:19:15 +00:00
Mahad Kalam
6cbc1577ae uh. oh 2026-02-09 21:40:10 +00:00
Mahad Kalam
0f42cd4b90 Optimizations and code cleanup 2026-02-09 21:05:50 +00:00
Mahad Kalam
71383ce0d9 Merge branch 'main' of https://github.com/hackclub/hackatime 2026-02-09 18:13:27 +00:00
Mahad Kalam
f2c4bd6a9d Add start_date/end_date 2026-02-09 18:13:13 +00:00
Mahad Kalam
ef3f36c829
Inertia migration/UI3 (#911)
* Inertia p1?

* Inertia'fied signed out homepage?

* Split up signed in page

* WIP signed in v2?

* Better signed in?

* Clean up extensions page!

* Fix currently hacking

* Better docs page?

* Docs update 2

* Clean up "What is Hackatime?" + get rid of that godawful green dev mode

* Better nav?

* Cleaner settings?

* Fix commit times

* Fix flashes + OS improv

* Setup v2

* Readd some of the syncers?

* Remove stray emdash

* Clean up Step 3

* Oops, remove .vite

* bye bye, /inertia-example

* bin/rubocop -A

* Fix docs vuln
2026-02-09 11:26:30 +00:00
Mahad Kalam
2e0f128946
Add /api/v1/banned_users/counts (#907) 2026-02-05 18:23:21 +00:00
Mahad Kalam
0f4d4f82c3
faster local imports (#904) 2026-02-04 14:35:48 +00:00
Mahad Kalam
166d9d30a0
ahoy is walking the plank (#903)
* Remove Ahoy

* Simplify migration

* sync migrations

* Update db/migrate/20260204113033_drop_ahoy_tables.rb

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-04 13:13:48 +00:00
Echo
797af036e9
feat: move streaks inside data block (#892)
* move streaks inside data

* docs docs docs
2026-02-02 12:24:01 -05:00
Echo
8edd8404d2
feat: add streaks to user stats endpoint (#891)
* add api to streaks

* swaggerize
2026-02-02 12:18:25 -05:00
Echo
a774e6b68e
feat: dashboard filter by date range (#883) 2026-02-02 00:57:04 -05:00
Echo
5d94361f5a
refactor: fix insite api docs to use swagger (#879) 2026-02-01 14:20:24 -05:00
Evan Gan
5a48670aac
Add banned_users endpoint to AdminController and update routes (#870)
* Add banned_users endpoint to AdminController and update routes

* Merge branch 'main' into addingGetBanAdminAPI_Endpoint

* move function out of private

* docs

* re swaggerize
2026-01-29 14:05:37 -05:00
Echo
96dce497f4
Refactor error handling to support multiple response formats in ErrorsController (#872) 2026-01-28 23:00:46 -05:00
Echo
593da0d690
properly handle user inputs on visualization_quantized (#871) 2026-01-28 20:21:56 -05:00
Echo
c1e9eec98f
fix user allow_public_stats_lookup bypass (#862) 2026-01-27 01:10:02 -05:00
Tom (Deployor)
8d0215ff0f
feat: added actual api docs (rswag) + ci enforcement (#846)
* feat: add API documentation and CI checks

- Add Rswag for automated API documentation generation
- Add Swagger specs for all endpoints
- Add CI step to enforce that swagger.yaml stays in sync with code
- Add static test keys in seeds.rb for easier testing
- Update AGENTS.md and README.md to support this

* Merge branch 'main' of https://github.com/deployor/hackatime

* Merge branch 'main' into main

* Deprecations! Yay! :)

* It was wan addicent i swear linter! Dont hurt me

* Apply suggestions from code review

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

* Copilot..... we love you! Also this project is open and so are api docs meant to be if another AI reads ts!

* Merge branch 'main' of https://github.com/deployor/hackatime

* Merge branch 'main' into main

* Merge branch 'main' into main

* Update app/controllers/api/admin/v1/admin_controller.rb

If you say so

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

* Update spec/requests/api/v1/my_spec.rb

I guessss?

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

* Failed my own CI wow.... EMBARRASSINGGGG

* Merge branch 'main' into main

* Merge branch 'main' into main

* clarify wording on internal/revoke

* Merge branch 'main' into main

* update swagger docs
2026-01-27 01:05:49 -05:00
Echo
deaa299924
skeleton projects (#861)
* skeleton projects

* count total projects for loader

* simplify code to not be jank
2026-01-27 00:53:04 -05:00
Echo
a72ea34a81
sentry id on 500s (#856) 2026-01-26 15:20:34 -05:00