From 9f384dd315b270ccc71f6db05f6799fb67fd5e55 Mon Sep 17 00:00:00 2001 From: Little Visions Date: Fri, 12 Dec 2025 09:42:35 +1300 Subject: [PATCH 1/2] docs: Add TUI documentation and update roadmap --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f7045a..dc7a266 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Stop manually copying tasks from code reviews into Linear. Just comment `/create - 🏷️ **Intelligent Labels** - AI receives Linear's available labels for accurate suggestions, automatic tagging - 🔄 **Duplicate Detection** - Tracks processed comments to prevent creating duplicate issues on multiple runs - 🔍 **Automatic Comment Gathering** - Fetches and analyzes all unresolved PR comments in one operation +- 🖥️ **Interactive TUI** - Terminal interface for browsing, selecting, and editing issues before creation ## Quick Start @@ -73,7 +74,31 @@ Go to your repository's Settings → Secrets → Actions and add: - `LINEAR_TEAM_ID` - Your Linear team UUID (get it by running `node scripts/get-team-id.js` in the gitlin directory) - `ANTHROPIC_API_KEY` - Get from https://console.anthropic.com/ -### Use It! +### Interactive TUI Mode + +For a more hands-on experience, use the interactive Terminal User Interface: + +```bash +cd .gitlin +pnpm tui +``` + +The TUI lets you: +- 📝 **Browse PR comments** - View all unresolved comments on a PR +- ✅ **Select which comments** to create issues from +- ✏️ **Edit issue details** before creation (title, description, priority, effort) +- 👀 **Preview issues** before submitting to Linear +- 🚀 **Batch create** multiple issues at once + +**Keyboard shortcuts:** +- `↑/↓` or `j/k` - Navigate +- `Space` - Select/deselect item +- `Enter` - Confirm selection +- `Tab` - Switch between fields +- `Esc` - Go back / Cancel +- `q` - Quit + +### Use It (GitHub Action) Comment `/create-issues` on any PR or issue, and the bot will: 1. **Automatically fetch all unresolved comments** on the PR (both issue comments and review comments) @@ -287,9 +312,9 @@ This pays for itself immediately by saving 5-10 minutes per code review. - [x] Duplicate detection (tracks processed comments) - [x] Automatic comment gathering (fetches all unresolved PR comments) - [x] Conservative priority assignment (prevents over-prioritization) +- [x] Interactive TUI for manual issue selection ### Planned -- [ ] Interactive TUI for manual comment selection - [ ] Sub-issue hierarchy support - [ ] Support for multiple Linear teams - [ ] Slack integration From 1e2391b4ced22767e8605cc75c25cbe5e300c31b Mon Sep 17 00:00:00 2001 From: Little Visions Date: Fri, 12 Dec 2025 09:59:27 +1300 Subject: [PATCH 2/2] docs: Comprehensive TUI documentation and switch to zsh --- README.md | 71 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index dc7a266..3495114 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Stop manually copying tasks from code reviews into Linear. Just comment `/create Clone this repo into your project and run the interactive setup: -```bash +```zsh cd your-project git clone https://github.com/paperdiamond/gitlin.git .gitlin cd .gitlin @@ -78,25 +78,55 @@ Go to your repository's Settings → Secrets → Actions and add: For a more hands-on experience, use the interactive Terminal User Interface: -```bash +```zsh cd .gitlin pnpm tui ``` -The TUI lets you: -- 📝 **Browse PR comments** - View all unresolved comments on a PR -- ✅ **Select which comments** to create issues from -- ✏️ **Edit issue details** before creation (title, description, priority, effort) -- 👀 **Preview issues** before submitting to Linear -- 🚀 **Batch create** multiple issues at once - -**Keyboard shortcuts:** -- `↑/↓` or `j/k` - Navigate -- `Space` - Select/deselect item -- `Enter` - Confirm selection -- `Tab` - Switch between fields -- `Esc` - Go back / Cancel -- `q` - Quit +**Requirements:** The TUI requires a `.env` file with your API keys: +```zsh +cp .env.example .env +# Edit .env and add your LINEAR_API_KEY, LINEAR_TEAM_ID, and ANTHROPIC_API_KEY +``` + +#### TUI Workflow + +1. **Select Repository** - Auto-detects current repo from git, or choose from your recent GitHub repos +2. **Select PR** - Browse open PRs or enter a PR number manually +3. **Select Comments** - View all unresolved comments, with existing Linear tickets marked (🎫) +4. **AI Analysis** - Claude parses selected comments and extracts actionable issues +5. **Review & Edit** - Toggle issues on/off, edit title/description/priority/effort/labels +6. **Confirm & Create** - Preview final issues before creating them in Linear +7. **Results** - See created issues with direct links to Linear + +#### TUI Features + +- 📂 **Smart Repo Detection** - Auto-detects current repo from git remote +- 📋 **PR Browser** - Lists open PRs with author info, or enter PR # manually +- 🎫 **Duplicate Detection** - Comments with existing Linear tickets are marked +- ✏️ **Full Issue Editor** - Edit all fields: title, description, priority, effort, labels +- 🏷️ **Label Picker** - Multi-select from your Linear team's available labels +- ☑️ **Selective Creation** - Toggle individual issues on/off before creating + +#### Keyboard Shortcuts + +| Screen | Key | Action | +|--------|-----|--------| +| All | `↑/↓` or `j/k` | Navigate up/down | +| All | `Esc` | Go back to previous screen | +| All | `q` | Quit (except when editing) | +| All | `Ctrl+C` | Force quit | +| Comments | `Space` | Toggle comment selection | +| Comments | `a` | Select all comments | +| Comments | `n` | Deselect all comments | +| Comments | `Enter` | Continue to AI analysis | +| Issues | `Space` or `t` | Toggle issue enabled/disabled | +| Issues | `Enter` or `e` | Edit selected issue | +| Issues | `c` | Continue to confirmation | +| Editor | `Enter` or `e` | Edit current field | +| Editor | `s` | Save and return | +| Results | `r` | Create more issues (restart) | +| Error | `r` | Retry from beginning | ### Use It (GitHub Action) @@ -221,7 +251,7 @@ Create `.github/gitlin.json` to customize behavior: ### Setup -```bash +```zsh git clone https://github.com/yourusername/gitlin.git cd gitlin pnpm install @@ -230,13 +260,13 @@ cp .env.example .env # Add your API keys ### Run Locally -```bash +```zsh pnpm run dev ``` ### Test -```bash +```zsh pnpm test # Run tests once pnpm test:watch # Run tests in watch mode pnpm lint # Check for lint errors @@ -247,7 +277,7 @@ pnpm format:check # Check formatting ### Build -```bash +```zsh pnpm run build ``` @@ -319,7 +349,6 @@ This pays for itself immediately by saving 5-10 minutes per code review. - [ ] Support for multiple Linear teams - [ ] Slack integration - [ ] Custom AI models (GPT-4, local models) -- [ ] Batch issue editing before creation - [ ] Integration with GitHub Projects ## Contributing