Live GitHub repo activity on projects + Copilot photo/file uploads#2
Merged
Conversation
Live data from GitHub for project tracking: - github.ts: fetchRepoActivity() — uncached snapshot of recent commits, open PRs, open issues, last push for a linked repo - new GET /api/projects/[id]/github route (owner-scoped, rate-limited) - RepoActivityPanel on the project detail page polls every 60s while the tab is visible, with links into the repo - copilot gains a read_repo_activity tool for 'what changed recently' Copilot uploads: - chat UI: paperclip attach (up to 4 per message), client-side photo downscaling to JPEG ≤1600px, PDFs ≤2.5MB, text files inlined; chips with remove, attachment badges on sent messages - chat route: attachments schema; images → input_image, PDFs → input_file, text → inlined input_text via the Responses API; only the newest message carries payloads https://claude.ai/code/session_013M57ExYGVz7k4pFXNMTBL9
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Two features for the dashboard:
1. Live GitHub data for project tracking
fetchRepoActivity()insrc/lib/github.ts— fresh (uncached) snapshot of a linked repo: recent commits, open pull requests, open issues, last push time, default branch, stars.GET /api/projects/[id]/github— owner-scoped, rate-limited route serving that snapshot.RepoActivityPanelon the dashboard project detail page — polls every 60 seconds while the tab is visible, shows commits/PRs/issues with direct links into GitHub, with a live indicator and "updated Xs ago".read_repo_activity— the chat can answer "what's happening in this project's repo right now" from the same live feed.2. Copilot photo & file uploads
attachmentsarray — images becomeinput_image(vision), PDFs becomeinput_file, text is inlined, via the OpenAI Responses API. Only the newest message carries payloads so history stays light. Zod-validated with size caps.Verification
npm test— 22/22 passnpm run type-check— cleannpm run lint— cleannpm run build— succeedsDeployment note
Set
GITHUB_TOKENin Vercel (a fine-grained read-only PAT with access to the linked repos) — without it, only public repos resolve and GitHub's anonymous rate limit (60 req/hr) will throttle the live panel.OPENAI_API_KEYmust also be present for chat/attachments (already required today).https://claude.ai/code/session_013M57ExYGVz7k4pFXNMTBL9
Generated by Claude Code