Skip to content

Made Git City: Pulse for Neovim (Plugin) (New PR Updated some things) #69

Open
Woeter69 wants to merge 12 commits intosrizzon:mainfrom
Woeter69:main
Open

Made Git City: Pulse for Neovim (Plugin) (New PR Updated some things) #69
Woeter69 wants to merge 12 commits intosrizzon:mainfrom
Woeter69:main

Conversation

@Woeter69
Copy link
Copy Markdown

What does this PR do?

This PR introduces support for Neovim by updating the heartbeats API and adding frontend instructions for the upcoming gitcity.nvim plugin.

Specifically:

  • API Update: Added "neovim" to ALLOWED_EDITORS in src/app/api/heartbeats/route.ts so Neovim heartbeats are correctly tracked.
  • New Endpoint: Created /api/neovim-key to handle generating Neovim API keys independently. Like GitHub tokens, keys are prefixed (nvim_), returned once, and only their secure hash is stored in vscode_api_key_hash.
  • Frontend UI (Home page): Updated the "Coding Now" (Keep your city alive) dropdown in src/app/page.tsx to include setup instructions for gitcity.nvim alongside the existing VS Code extension steps. It also makes the privacy settings note editor-agnostic.
  • Frontend UI (Live page): Replaced the static "Get Pulse for Neovim" GitHub link in src/app/live/page.tsx with a full interactive setup modal. Users can now click the button to generate and copy a universal API key directly on the Live page without needing to navigate back to the home page.

Related issue

N/A

Screenshots

image_2143 image_2142

Testing Locally (Curl)

You can verify the backend API accepts "neovim" without needing to install the plugin by firing a raw curl request to your local dev server:

# First, generate or grab a valid vscode_api_key for a seeded user in your local DB.
# Then run this heartbeat simulation:

curl -s -X POST http://localhost:3000/api/heartbeats \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -d '[{
    "timestamp": "2026-03-13T12:00:00.000Z",
    "language": "lua",
    "project": "git-city",
    "isWrite": false,
    "activeSeconds": 5,
    "sessionId": "test-session-neovim",
    "editorName": "neovim",
    "os": "linux"
  }]'

Expected Result:

{"accepted":1,"rejected":0}

And the user will appear with a green "Live" badge on the frontend.

Checklist

  • npm run lint passes (Note: Some pre-existing linting errors exist in other files like useStreakCheckin.ts, but the touched files are clean)
  • Tested locally
  • No secrets or .env values committed

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 13, 2026

@Woeter69 is attempting to deploy a commit to the Samuel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@srizzon
Copy link
Copy Markdown
Owner

srizzon commented Mar 24, 2026

Hey @Woeter69, the Neovim plugin idea is solid and the API/UI changes look reasonable. However there are two blockers:

  1. Corrupted lock file: package-lock.json has "peer": true added to dozens of unrelated packages (react, next, three, supabase, typescript, eslint, etc). This would break dependency resolution.

  2. Unnecessary dependency: dotenv was added as a production dependency — Next.js already handles env vars natively, so this isn't needed.

Can you start a fresh branch from current main, apply just your changes (without the lock file corruption), and drop the dotenv dependency? The actual feature code looks good, just need a clean PR. Happy to merge once that's sorted.

@Woeter69
Copy link
Copy Markdown
Author

@srizzon have fixed the things mentioned.

@Woeter69
Copy link
Copy Markdown
Author

Woeter69 commented Apr 8, 2026

@srizzon hey just checking in to see if the latest changes look good to you.

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