3 Commits

Author SHA1 Message Date
Nico Albanese
1b69da92e7
Add GitHub repository creation feature for tasks (#67)
* Make sandbox creation work without a repository

* Add createRepository function to GitHub client

* Add create-repo API endpoint with git operations

* Add Switch component from radix-ui

* Add CreateRepoDialog component

* Support sandboxes without repos and add create repo flow

* fix: security and validation improvements for create-repo flow

- Fix command injection vulnerability in git config commands by escaping shell args
- Add explicit validation for cloneUrl/owner/repoName after repo creation
- Improve error messages to inform users when repo was created but push failed
- Sanitize taskTitle input (limit length, strip special chars) for AI prompt
- Align UI validation text with server-side rules (include periods)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update apps/web/app/api/github/create-repo/route.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Initialize git repo in empty sandboxes for diff viewer compatibility

Empty sandboxes (no source repo) now get git init + an empty initial commit,
allowing git diff HEAD to work consistently. This fixes the diff viewer
failing with "not a git repository" for tasks created without a clone URL.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2026-01-12 16:26:59 +00:00
Nico Albanese
6b58d6808a
Add task management and PR creation features (#64)
* init scaffold

* add archive functionality

* update

* remove focus change

* update homepage styles

* add new branch button

* add persistence

* add create pr button

* fix critical errors

cc

* cc critical fixes

* critical fixes

* add diff viewer plan

* more critical fixes

* cc critical fixes

* Guard initial task message without sandbox

Prevents chat requests when tasks lack cloneUrl or sandboxId.

* fix: enforce task sandbox ownership

* chore: update todos

* fix: sync PR branch with sandbox

* Add helper functions for branch management

* Create git-status API endpoint

* Add branch status detection to create PR dialog

* Add commitOnly parameter to generate-pr API

* Convert PR dialog to multi-step wizard UI

* Add readFile tool visibility task to todos

* Add OctokitResult type for auth status
2026-01-12 11:47:59 +00:00
Nico Albanese
0d28d0105a
Add GitHub authentication and repository management (#63)
* Add GitHub OAuth authentication routes

* Add GitHub API endpoints for repos and user data

* Add session and crypto utilities

* Add database schema and client setup

* Add database migrations

* Add GitHub utility functions and client

* Add authentication components and hooks

* Add repo info to chat context

* Add GitHub token to sandbox API

* Pass GitHub token to chat sandbox

* Integrate repo selection and display in chat

* Add dependencies for auth and database

* Add branch selector API endpoint

* Create branch selector component

* Add UI component library base components

* Add cmdk and popover dependencies

* Replace input field with branch selector component

* update repo selector to be combo box

* fix scroll gutter bg

* update branch selector component width

* remove storage and update todos

* fix cc comments

* add caching

* cc fixes
2026-01-11 18:32:06 +00:00