Commit graph

368 commits

Author SHA1 Message Date
Mahad Kalam
1f695850e5
Bring back Mailkick (#1021)
* Sources say Charlie Kick is stable. Please god

* Some tests + guards + unsub URL fix

* Fix lockfile!

* bin/rubocop -A

* if this does not work I am going to kms

* phew
2026-03-01 14:26:54 +00:00
Mahad Kalam
c846217ce6
Revert all commits after d5d987a8f4 (#1020)
Reverts the following commits:
- 2e3cfd60 Revert Mailkick
- de320443 Merge branch 'main'
- efd189a8 Add safety-hatch for summary emails
- d5c62922 Remove exploding queries (#1018)
- 2b37201d Bump actions/upload-artifact from 6 to 7 (#1007)
- a4c10b47 Expand scopes to all time for summaries/goals (#1017)
- 4dec2f44 Unsubscribe links + slow job monitoring (#1016)
2026-03-01 13:09:10 +00:00
Mahad Kalam
4dec2f44a4
Unsubscribe links + slow job monitoring (#1016)
* Notable + unsubscribe links

* Add the migrations/initializers!

* oops

* Fix a bug

* Address Copilot warn

* Fixes

* stop swallowing errors!!!!

* Flipper flag WeeklySummaryEmailJob

* Split WeeklySummaryEmailJob into new email
2026-03-01 12:11:38 +00:00
Mahad Kalam
d5d987a8f4
Email layout v2 (#1015)
* Better emails!

* Fix tests?

* bit o' cleanup

* add rant

* pt2

* pt3

* Update tests

* oop

* man what on earth

* ffs!!!!!

* Revert "ffs!!!!!"

This reverts commit b58bfed0f4c6288e95d0a111aeb3d7d7900ac9e7.

* Revert "man what on earth"

This reverts commit 8752cc2200eb3b852ea545d10ccbd555ab09d2b4.

* Revert "Fix tests?"

This reverts commit 810ebde73376ff7da0595e6b927f1b464d62b4a4.

* Ignore external Google Fonts link in premailer
2026-03-01 07:18:24 +00:00
Mahad Kalam
cb67e125d0
Work around aws_sdk_s3 + R2 incompatibility (#1014) 2026-03-01 00:08:20 +00:00
Mahad Kalam
26663ddad5
Set up R2! (#1013)
* Set up R2!

* Update .env.example
2026-02-28 23:55:39 +00:00
Mahad Kalam
afb7e260e8
Temporarily disable weekly summaries (#1012)
* Bit of SEO stuff + disable weekly summaries for now

* Update bundle
2026-02-28 23:41:57 +00:00
Mahad Kalam
8b8297f45a
Add Linguist colours + langmapper (#999)
* Let's use Linguist for colours?

* oops
2026-02-24 12:53:13 +00:00
Mahad Kalam
de363bc8d2 oop 2026-02-23 22:25:09 +00:00
Mahad Kalam
2816314df9
Weekly summary emails + move off Loops (#998)
* Weekly summary emails + move off Loops

* Remove unused asset
2026-02-23 22:15:02 +00:00
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
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
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
Mahad Kalam
5aabfe8fa7
UI fixes (#979)
* Small UI fixes

* OAuth2 applications tweaks
2026-02-18 09:02:13 +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
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
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
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
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