Commit graph

344 commits

Author SHA1 Message Date
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
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
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
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
6ff98cfb03
Add OAuth2 docs (#926)
* OAuth2 docs

* Docs updates

* New pickers
2026-02-11 21:02:53 +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
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
bfaa18aa56 Comment out the broken jobs. 2026-02-10 02:03:54 +00:00
Mahad Kalam
198f9be24d AGH 2026-02-10 02:00:12 +00:00
Mahad Kalam
4c64cffb1e fingers crossed this helps a bit 2026-02-10 00:00:37 +00:00
Mahad Kalam
79763fac45 Make email logins run on crit queue 2026-02-09 21:14:09 +00:00
Mahad Kalam
0f42cd4b90 Optimizations and code cleanup 2026-02-09 21:05:50 +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
f73d268d42 Fix commit times 2026-02-08 22:16:38 +00:00
Mahad Kalam
2e0f128946
Add /api/v1/banned_users/counts (#907) 2026-02-05 18:23:21 +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
Mahad Kalam
7e54f109ba
Revert "Add PgHero (#894)" (#895) 2026-02-02 17:45:00 -05:00
Mahad Kalam
4c98afe5c4 Make PgHero code a bit cleaner 2026-02-02 21:29:26 +00:00
Mahad Kalam
a2716fcdb0
Add PgHero (#894) 2026-02-02 21:17:26 +00:00
Echo
f16141bf62
local variable or method 'current_user' for TokensController (#878) 2026-02-01 14:11:02 -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
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
209b24effa
skeleton profiles (#853) 2026-01-26 00:08:33 -05:00
Echo
133f85d3a1
Joe endpoints for fraud (#850)
type shit

Co-Authored-By: ByteAtATime <byteatatime@proton.me>
2026-01-25 23:00:12 -05:00
Echo
3cb070e36c
skeleton leaderboards (#849) 2026-01-25 22:39:26 -05:00
Echo
55c8f5b926
Oauth apps for all! (#810)
* linting

* migrations

* user modelassss

* controllers

* views and shii

* fix bad input on seeds

* fix intenting

* DRY!!!
2026-01-19 22:24:21 -05:00
Echo
58f106c746
additional admin api endpoints (#782)
* additional admin api endpoints

* lint
2026-01-12 22:46:47 -05:00
Echo
bb55113732
add back broken routes from 777 (#778) 2026-01-08 12:33:48 -05:00
Echo
063403e4a0
admin api rework (#777)
Co-authored-by: TheUnknownHacker <128781393+The-UnknownHacker@users.noreply.github.com>
2026-01-08 12:28:21 -05:00
Jeffrey Wang
643782b0c9
Add a fix language function (#452)
Co-authored-by: Echo <github@3kh0.net>
2026-01-06 11:22:05 -05:00
Echo
7ebb1b2085
archive projects (#770) 2026-01-06 09:28:39 -05:00
Echo
c62cb0f7da
remove mailing system (#763) 2026-01-03 09:25:47 -05:00
Echo
ae7d9c73fb
admin perms check (#760) 2026-01-03 08:34:57 -05:00
Max Wofford
e6ed172d85
Remove old neighborhood logic (#753)
Co-authored-by: Echo <github@3kh0.net>
2025-12-30 21:31:57 +01:00
nora
a1df7eddd1
add admin key revocation endpoint (#747)
* add admin key revocation endpoint

* include key name
2025-12-29 16:35:10 -05:00
Echo
c0133f7edd
admin api rate limits (#745) 2025-12-28 21:00:00 +01:00
Fox Ellison-Taylor
aee56d48ce
fuzzy admin user search (#741)
Co-authored-by: Echo <github@3kh0.net>
2025-12-28 20:24:47 +01:00
Max Wofford
220b0afe7e
Revert primary direct database (#742) 2025-12-28 14:10:08 -05:00
Kartikey Chauhan
3160a27bb1 remove execute endpoint 2025-12-28 10:39:37 +05:30
Echo
9432680479
reenable slack username updates (#723) 2025-12-21 01:48:40 -05:00
christian dubsky
378654db67
leaderboard api (#718)
Co-authored-by: Christian Well <christandubsky20@gmail.com>
2025-12-21 01:18:48 -05:00
Echo
335cc42654
Profiles (#719)
* new username logic

* lint

* change up settings for username

* user profiles
2025-12-21 00:54:04 -05:00
Echo
ec16e73fc4
re-enable geocoding services (#717) 2025-12-19 22:35:41 -05:00
Arca Ege Cengiz
385bea56f7
add ability to unlink emails (#698) 2025-12-09 18:22:44 -05:00
Echo
79e74cb8a7
only enable sentry on prod (#697) 2025-12-09 14:16:08 -05:00
Echo
64f9d9cb34
data deletion oneshot (#691) 2025-12-07 22:49:40 -05:00
Max Wofford
1680c03f63
Disable mailroom (#681) 2025-12-03 15:03:36 -05:00