feat(wakatime): report Studio authoring time to WakaTime - #6
Merged
Conversation
One toolbar button, one dialog, three settings: a switch, the API key, and the project name. No panel, no menu group, no runtime entry — nothing this plugin does reaches a shipped game. The button is icon-only and the command palette falls back to its tooltip, so it is also reachable by typing "WakaTime". Studio's plugin API has no editing signal, so the tracker reads the workspace window's DOM — keystrokes, clicks, wheel, IME commits — for their timing only, and heartbeats carry nothing but the project name, the fixed category/language labels and a timestamp. `type: "app"` rather than "file": the active document is not knowable through the API, and a guessed path would be a lie the dashboard cannot tell from a fact. The project name is typed rather than derived for the same reason — there is no project name or path anywhere in PluginServices. The API key lives in the workspace window's localStorage, never in `services.storage` — that writes into `editor/services/`, inside the versioned working tree, so a credential there is a credential in the repository. Only the project name is project data, on purpose: it is the thing collaborators should share. No `wakatime-cli`: the privileged facade exposes `bash.execute` but the main process handler answers "not implemented yet", so this speaks the HTTP API directly and reimplements the offline queue. Endpoints were checked against a CORS preflight — `GET /users/current` answers its errors without `Access-Control-Allow-Origin`, which is why the connection test calls `statusbar/today`. The icon is a line-art stopwatch generated by tools/make-icon.mjs, not WakaTime's logo: a thumbnail carrying their mark would read as an official integration. Same call narraleaf.steam-achievements made about Valve's. permissions: []. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One toolbar button, one dialog, three settings: a switch, the API key, and
the project name. No panel, no menu group, no runtime entry — nothing this
plugin does reaches a shipped game. The button is icon-only and the command
palette falls back to its tooltip, so it is also reachable by typing
"WakaTime".
Studio's plugin API has no editing signal, so the tracker reads the
workspace window's DOM — keystrokes, clicks, wheel, IME commits — for their
timing only, and heartbeats carry nothing but the project name, the fixed
category/language labels and a timestamp.
type: "app"rather than "file":the active document is not knowable through the API, and a guessed path
would be a lie the dashboard cannot tell from a fact. The project name is
typed rather than derived for the same reason — there is no project name or
path anywhere in PluginServices.
The API key lives in the workspace window's localStorage, never in
services.storage— that writes intoeditor/services/, inside theversioned working tree, so a credential there is a credential in the
repository. Only the project name is project data, on purpose: it is the
thing collaborators should share.
No
wakatime-cli: the privileged facade exposesbash.executebut the mainprocess handler answers "not implemented yet", so this speaks the HTTP API
directly and reimplements the offline queue. Endpoints were checked against
a CORS preflight —
GET /users/currentanswers its errors withoutAccess-Control-Allow-Origin, which is why the connection test callsstatusbar/today.The icon is a line-art stopwatch generated by tools/make-icon.mjs, not
WakaTime's logo: a thumbnail carrying their mark would read as an official
integration. Same call narraleaf.steam-achievements made about Valve's.
permissions: [].
Co-Authored-By: Claude Opus 5 noreply@anthropic.com