Commit graph

1301 commits

Author SHA1 Message Date
Mat
eb3fa24315
feat: make regular api tokens revocable (#1027)
* add new icon from bounty

* feat: add hackatime normal token revocation

* chore: make linter not hate me (its always whitespace) <3

* fix: combine both revocation apis into one (as requested by mahad)

* chore: add HKA_REVOCATION_KEY to .env.example

* feat: add hackatime normal token revocation

* chore: make linter not hate me (its always whitespace) <3

* fix: combine both revocation apis into one (as requested by mahad)

* chore: add HKA_REVOCATION_KEY to .env.example

* feat: add hackatime normal token revocation

* chore: make linter not hate me (its always whitespace) <3

* fix: combine both revocation apis into one (as requested by mahad)

* chore: add HKA_REVOCATION_KEY to .env.example

* feat: add hackatime normal token revocation

* chore: make linter not hate me (its always whitespace) <3

* fix: combine both revocation apis into one (as requested by mahad)

* fix: stuff greptile suggested

* style: add final newline

* docs: apply .env.example suggestion from @skyfallwastaken

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>

* refactor: move apikey rotation to user model

* style: remove unnecessary comment

* fix: tests passing and inappropriate response codes

* refactor: fix response codes

* refactor: move key info request back into separate function

* fix: broken ci because of merge mistake :/

* refactor: remove unnecessary test line and switch to  report_error

* fix: returned name for admin & regular keys

---------

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-04-01 19:37:34 +01:00
Mahad Kalam
e43cdc5ea1
Let's fix WakaTimeError (#1125) 2026-04-01 13:39:55 +01:00
Mahad Kalam
b2af327466
Improve leaderboard UI responsiveness and emoji rendering (#1123)
* Fix leaderboard mobile layout and tab selector bug

- Replace preserveState with preserveScroll on tab Links to fix
  scope resetting to global when switching period tabs
- Show globe/flag icons only (no text) on mobile for scope selector
- Shorten period labels to "24h"/"7d" on mobile
- Move active project to its own line below username for cleaner layout
- Add Twemoji component and refactor CountryFlag to use it
- Add proper truncation and min-w-0 to prevent text overflow on mobile

* Formatting

* Fix deletion requests

* Twemoji

* goog
2026-03-31 13:44:23 +00:00
Mahad Kalam
28fe4739f5
Leaderboard Inertia'd + use cache + util dedup (#1121)
* make leaderboards go vrooom

* goog

* Make leaderboards great again

* Bit o' cleanup?

* goog

* goog

* Greptile
2026-03-30 14:39:05 +00:00
Mahad Kalam
8ce245d8c4
make leaderboards go vrooom (#1120)
* make leaderboards go vrooom

* goog
2026-03-30 13:58:18 +01:00
Kartikey Chauhan
91a0daf23f fix: use @user.heartbeats to only filter heartbeats by user 2026-03-25 14:42:24 +05:30
Mahad Kalam
f145cc2baa
Fix repo mapping job silently failing (#1102) 2026-03-23 13:07:00 +00:00
Mahad Kalam
523d7e6ffb
Bugfixes (#1101)
* Progress bar should be primary colour

* Projects page shouldn't refresh on archive

* Fix GitHub syncing

* Add HCA lookup

* Fix .ad and .mdx

* Misc.

* Badges can use owner/repo

* Format + make Zeitwerk happy
2026-03-23 12:51:04 +00:00
Mahad Kalam
245c458f41
Filter out raw_data (#1099) 2026-03-22 18:33:01 +00:00
Mahad Kalam
95580df3ba
Bye raw_heartbeat_uploads! (#1098)
* Drop raw_heartbeat_uploads

* oops

* Make it friendly

* finalizad

* goog

* bundlarr

* remove the newlines
2026-03-22 18:16:19 +00:00
Mahad Kalam
a9f3b613cd
Fix crash when project name contains newline characters (#1096)
Project names with newlines (e.g. from misbehaving editor plugins) caused
ActionController::UrlGenerationError when loading /my/projects because Rails
route constraints reject newlines in URL parameters.

- Strip control characters from project names at heartbeat ingestion time
- Detect newlines in broken_project_name? to mark such projects as broken
- Skip URL generation for broken project names to prevent the crash

https://claude.ai/code/session_016CtSDw18BePckUBQ2teeuQ

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-20 20:21:12 +00:00
Michael
41f30aadc1
Add documention for the Helix editor (#1085)
* add helix icon

* make helix setup guide based off of godot's

* register helix in docs controller

* Update docs/editors/helix.md

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

* Update docs/editors/helix.md

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

* Update docs/editors/helix.md

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

* Update docs/editors/helix.md

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

* Update docs/editors/helix.md

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

* Casing changes

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-03-19 11:19:52 +00:00
Alex Radu
e0423fe495
Add 'today' to dashboard logged time sentence (#1083)
* Add 'today' to dashboard logged time sentence

* Add comma :P

---------

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-03-17 18:17:19 +00:00
Mahad Kalam
b915f6d4d9
Revert "Fix grouped duration_seconds overcounting by using global LAG instead…" (#1077)
This reverts commit 972d6d2e33.
2026-03-15 21:51:17 +00:00
Mahad Kalam
d38b7f71f5
Mailer previews + partialify the weekly summary (#1076)
* Mailer previews + partialify

* oops
2026-03-15 20:35:48 +00:00
Mahad Kalam
972d6d2e33
Fix grouped duration_seconds overcounting by using global LAG instead of partitioned LAG (#1075) 2026-03-15 20:22:01 +00:00
Mahad Kalam
27b1c4c167 Switch to Inter in emails 2026-03-15 15:33:34 +00:00
Mahad Kalam
8d00418059
Spring cleaning (#1074)
* fix: use owner/repo format for project badges

Updates badge URLs to use GitHub-style owner/repo format (e.g., "hackclub/hackatime")
instead of project names. This ensures compatibility with external badge services that
expect repository paths.

Changes:
- Add Repository#full_path method to get owner/repo format
- Update settings controller to pass both display names and repo paths
- Update Badges component to display project names but use repo paths in URLs

* fix: improve user lookup in API v1 stats endpoint

Use the robust lookup_user method for username parameter in the /api/v1/stats endpoint
to ensure consistent user lookup across all API endpoints. This properly handles Slack
UIDs (HCA IDs), numeric user IDs, and usernames in the correct priority order.

* fix: reduce clutter on new user homepage

Simplify the new user experience by:
- Removing redundant "Hello friend" text from setup notice (header already provides context)
- Hiding GitHub link banner when setup notice is shown to focus user on primary action

This reduces visual clutter and helps new users focus on completing setup first.

* fix: enable full app layout for new OAuth application page

Remove layout=false directive that was preventing the app header and navigation
from appearing on the new OAuth application creation page.

* fix: add antigravity editor to docs

Add documentation for Antigravity, a VSCode fork from Google with built-in AI
features. Includes setup instructions for tracking time with Hackatime using the
WakaTime extension.

* fix: improve stat card subtitle positioning

Remove absolute positioning from subtitle text to allow it to flow naturally after
the main value. This prevents the subtitle from being pushed to the bottom when
other cards have longer content.

* fix: align settings action buttons to card end on larger screens

Remove width constraint from footer to allow action buttons to align to the right
edge of the full card width instead of being constrained to a narrower container.

* fix: improve heartbeat importer visibility on light themes

Update import provider cards and radio buttons to have better contrast on light themes:
- Use bg-surface-100 instead of bg-darker for better card visibility
- Increase radio button border thickness and use darker border color
- Add hover and focus states for better interactivity

* Split up settings controller + perf + goal display

* Make stat card subtitles larger

* Fix AG + VS Code

* Remove Shiba refs

* Bundle update
2026-03-15 15:26:32 +00:00
Mat Manna
49ea53128d
feat: add hacka-box to badges settings (#1073)
* feat: add hacka-box to badges settings

* style: fix rubocop and svelte formatting issues (literally 1984 btw)

* Fix formatting in HackaBox Gist section

---------

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-03-15 13:51:27 +00:00
Mat Manna
07bcbfb432
fix: unauthd signin page link on non intertiafied pages like /leaderboards (#1072) 2026-03-15 11:06:43 +00:00
Mat Manna
c4bf861fa1
fix: total time label on projects page (#1071) 2026-03-14 16:53:43 +00:00
Mahad Kalam
28fa174861
Add Sentry monitoring for previously unreported errors (#1066)
* Add Sentry monitoring for previously unreported errors

* Fix

* Fixes

* whoops!
2026-03-13 11:06:12 +00:00
Mahad Kalam
922e7384c0
Fix email from name/dates, login flash, wakatime_setup redirect, Sunday 6:30pm GMT (#1067)
* Smol fixes

* Map <<LAST_LANGUAGE>

* whoops

* Fix

* Move emails from Friday to Sunday
2026-03-13 10:53:57 +00:00
Mahad Kalam
607480ff8d
Imports v2.5 (#1065)
* Imports are back!!

* Settings UI v3

* Use Inertia forms for heartbeat imports

* Update app/javascript/pages/Users/Settings/Data.svelte

* Update Bundle

* Fix broken Form/Button markup in Data.svelte settings page

* Update JS deps

* Greptile fixes

* Remove dead code

* Fixy wixy

* woohoo

* fixes

* Fix

* Fixes

* Fix TC

* Fix TC

* welp

* test

* Even more Greptile fixes
2026-03-13 09:34:40 +00:00
Mahad Kalam
667d3a7c93
WakaTime/Hackatime v1 imports + Settings v2 (#1062)
* Imports are back!!

* Settings UI v3

* Use Inertia forms for heartbeat imports

* Update app/javascript/pages/Users/Settings/Data.svelte

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

* Update Bundle

* Fix broken Form/Button markup in Data.svelte settings page

* Update JS deps

* Greptile fixes

* Remove dead code

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-12 21:27:10 +00:00
Mahad Kalam
55a63b4ec1
Make Linguist extensible via languages_custom.yml (#1054)
* Support custom language definitions via languages_custom.yml

* Add workflow to auto-update Linguist languages.yml from upstream

* Use deep_merge
2026-03-11 16:05:03 +00:00
Freddie Yershon
6d0bfa433f
Add Hackastreak extension to the list (#1045)
* Add HackaStreak extension to the list

* Update app/javascript/pages/Extensions/Index.svelte

* Fix description casing for HackaStreak extension

* Add button label for extension installation

* Apply suggestion from @skyfallwastaken

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>

* Fix description formatting for HackaStreak

I think this is right, I'm not 100% sure?

---------

Co-authored-by: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com>
2026-03-07 22:23:26 +00:00
Micha Albert
504964a518
Fix ban notice wording (#1038)
* Fix ban notice wording

* fix CI for ban notice

* resolve ban message changes

* fix CI for revised ban notice changes
2026-03-05 05:19:02 +00:00
Mahad Kalam
9c91d71a1b
Remove maintenance mode middleware, controller, and page (#1031) 2026-03-02 20:07:17 +00:00
AJ
6fb37ad075
Update Settings > Integrations page to match theme (#1029)
* Update Integrations.svelte

Change Reconnect GitHub button from white text to black text

* Changed it from text-black to text-on-primary

* Update Integrations.svelte
2026-03-02 19:53:12 +00:00
Mahad Kalam
d16c67d1e9
Add maintenance page (#1030)
* Add maintenance page

* Update the page a lil

* Oops

* Fixes!
2026-03-02 16:01:40 +00:00
Mahad Kalam
483c723bc4
Fix stats_controller's total_seconds param (#1022) 2026-03-01 19:07:07 +00:00
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
0c7fb13c82
Revert Mailkick (#1019) 2026-03-01 12:56:23 +00:00
Mahad Kalam
de32044332 Merge branch 'main' of https://github.com/hackclub/hackatime 2026-03-01 12:43:51 +00:00
Mahad Kalam
efd189a8c4 Add safety-hatch for summary emails 2026-03-01 12:43:41 +00:00
Mahad Kalam
d5c6292220
Remove exploding queries (#1018) 2026-03-01 12:42:28 +00:00
Mahad Kalam
a4c10b473a
Expand scopes to all time for summaries/goals (#1017)
* Expand scopes to all time for summaries/goals

* oops i forgor to remove the second line
2026-03-01 12:18:22 +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
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
66f928ca24
OS switcher tabs updates (#1002)
* Add OS switcher tabs to WakatimeSetup page

- Add segmented control with macOS/Linux/Codespaces, Windows, and Advanced tabs
- Default tab is auto-detected from user agent (server-side)
- Show WSL option in mac/linux tab label only when user is on Windows
- Use modal-matching cubic-bezier easing for tab transitions

* Add system test for WakatimeSetup OS switcher tabs

* Extract repeated tab classes into tabClass helper

* Remove Xcode reference from setup subtitle

* Show Xcode in subtitle only on macOS/Linux tab

* pf

* Update test/system/wakatime_setup_test.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-25 10:43:52 +00:00
Mahad Kalam
36816f59b3
Add OS switcher tabs to WakatimeSetup page (#1001)
- Add segmented control with macOS/Linux/Codespaces, Windows, and Advanced tabs
- Default tab is auto-detected from user agent (server-side)
- Show WSL option in mac/linux tab label only when user is on Windows
- Use modal-matching cubic-bezier easing for tab transitions
2026-02-25 10:24:01 +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
5bd4b7b0c7 Fix mirror auth 2026-02-23 20:46:28 +00:00
Mahad Kalam
1a28bc744a
UI tweak (#996) 2026-02-23 20:26:33 +00:00
Mahad Kalam
8c0227cb57
Bye, warehouse! (#994) 2026-02-23 20:16:03 +00:00