Skip to content

Make VS Code use forked Hackatime extension#11

Merged
skyfallwastaken merged 1 commit into
hackclub:mainfrom
ImShyMike:main
May 30, 2026
Merged

Make VS Code use forked Hackatime extension#11
skyfallwastaken merged 1 commit into
hackclub:mainfrom
ImShyMike:main

Conversation

@ImShyMike
Copy link
Copy Markdown
Member

@ImShyMike ImShyMike commented May 30, 2026

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 30, 2026

Greptile Summary

This PR switches the VS Code extension installed by the Hackatime setup tool from the upstream WakaTime extension (WakaTime.vscode-wakatime) to the Hackclub-forked Hackatime extension (hackatime.hackatime-time-tracker), and updates all related user-facing messages accordingly.

  • src/editor_plugins/vscode.rs: Introduces a named EXTENSION_ID constant and updates the install command and error string from WakaTime to Hackatime — clean, idiomatic Rust approach.
  • install.ps1: Updates the extension ID string and all user-visible output messages; the ID remains hardcoded inline rather than extracted to a variable (unlike the Rust counterpart).

Confidence Score: 4/5

Safe to merge — the change is a straightforward swap of extension IDs with no logic changes, and the target extension exists on the VS Code marketplace.

Both changed files correctly target hackatime.hackatime-time-tracker, which is a published marketplace extension. The only gap is that install.ps1 leaves the extension ID as a bare string while vscode.rs introduced a constant — a minor consistency issue that won't cause runtime failures.

No files require special attention; both changes are small and low-risk.

Important Files Changed

Filename Overview
src/editor_plugins/vscode.rs Introduces a named constant for the extension ID and updates install/error strings from WakaTime to Hackatime; clean and consistent change.
install.ps1 Updates extension ID and all user-facing messages from WakaTime to Hackatime for the VS Code installation path; extension ID is hardcoded inline (unlike the Rust constant) but otherwise consistent.

Sequence Diagram

sequenceDiagram
    participant User
    participant Installer as install.ps1 / vscode.rs
    participant VSCLI as VS Code CLI (code)
    participant Marketplace as VS Code Marketplace

    User->>Installer: Run setup
    Installer->>VSCLI: --install-extension hackatime.hackatime-time-tracker
    VSCLI->>Marketplace: Fetch extension
    Marketplace-->>VSCLI: Extension package
    VSCLI-->>Installer: Exit code 0
    Installer-->>User: "Hackatime extension installed"
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
install.ps1:151
**Extension ID hardcoded inline in PowerShell, constant in Rust**

The Rust file centralized the extension ID as `EXTENSION_ID` constant, but `install.ps1` still has the string `"hackatime.hackatime-time-tracker"` inlined. If the extension ID ever changes, `install.ps1` and `vscode.rs` would need to be updated independently, risking drift. Consider extracting a variable (e.g., `$HackatimeExtensionId = "hackatime.hackatime-time-tracker"`) near the top of the VS Code install block for symmetry and maintainability.

Reviews (1): Last reviewed commit: "Make VS Code use forked Hackatime extens..." | Re-trigger Greptile

Comment thread install.ps1
Copy link
Copy Markdown
Member

@skyfallwastaken skyfallwastaken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dankeschön!

@skyfallwastaken skyfallwastaken merged commit d021485 into hackclub:main May 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants