|
| 1 | +# TODO - Features & Fixes |
| 2 | + |
| 3 | +## Bugs |
| 4 | + |
| 5 | +### Editor is readonly |
| 6 | +- Editor panel is read-only — cannot edit files directly |
| 7 | +- Should allow inline editing with save support |
| 8 | + |
| 9 | +### Cannot send screenshots to Claude |
| 10 | +- No way to take/paste a screenshot and send it to the Claude terminal |
| 11 | +- Should support clipboard image paste or a screenshot button that attaches the image to the conversation |
| 12 | + |
| 13 | +### File viewer doesn't reflect latest changes |
| 14 | +- Code/file viewer shows stale content — files modified externally (or by Claude) don't update |
| 15 | +- Likely missing a file watcher or re-read on focus/tab switch |
| 16 | +- Should watch for file changes and auto-refresh, or at minimum refresh when the editor panel gains focus |
| 17 | + |
| 18 | +### Claude commands refresh not working |
| 19 | +- Refresh button in ClaudeFileList triggers `loadFiles` → `scanFiles` but changes to commands are not reflected |
| 20 | +- **Root cause**: Zustand store caches `filesPerProject` and `contentCache` — likely stale content cache not being invalidated on refresh |
| 21 | +- **Files**: `src/renderer/stores/claude-store.ts`, `src/renderer/components/claude/ClaudeFileList.tsx` |
| 22 | +- **Fix**: Clear `contentCache` for the project when `loadFiles` is called, or add a file watcher on `.claude/commands/` to auto-refresh |
| 23 | + |
| 24 | +## Features |
| 25 | + |
| 26 | +### ~~Branch switcher dropdown~~ (DONE) |
| 27 | +- Click branch name in StatusBar → dropdown with local/remote branches → direct checkout |
| 28 | +- Auto-stash dirty work, auto-pop on arrival |
| 29 | + |
| 30 | +### ~~Auto-fetch + Drift Warning~~ (DONE) |
| 31 | +- Background `git fetch` every 60s per project |
| 32 | +- Banner with Pull/Rebase action buttons when behind/diverged |
| 33 | + |
| 34 | +### ~~PR Draft Generator~~ (DONE) |
| 35 | +- "PR" button in GitTree toolbar gathers diff summary vs default branch |
| 36 | +- Sends prompt to Claude terminal to create PR via `gh` |
| 37 | + |
| 38 | +### ~~Conflict Resolution Assistant~~ (DONE) |
| 39 | +- Detects merge conflicts from git status |
| 40 | +- Red banner with "View" (opens files in editor) and "Ask Claude" (sends context to terminal) buttons |
| 41 | + |
| 42 | +### Per-project panel layout |
| 43 | +- Panel layout (sizes, visibility, arrangement) is currently shared across all projects |
| 44 | +- Should be stored per project so each project remembers its own layout |
| 45 | +- Persist layout state keyed by project ID |
| 46 | + |
| 47 | +### Default file open in editor |
| 48 | +- Editor should have one file open by default when a project loads (e.g. README.md or main entry point) |
| 49 | +- Avoids a blank editor panel on startup |
| 50 | + |
| 51 | +### File tree context menu |
| 52 | +- Right-click on a file in the tree should open a context menu |
| 53 | +- First action: "Copy path" — copies the file's absolute path to clipboard |
| 54 | + |
| 55 | +## Browser API Optimizations |
| 56 | + |
| 57 | +Based on research of browser-use library (https://github.com/browser-use/browser-use) |
| 58 | + |
| 59 | +### Current Features |
| 60 | +- ✅ Basic browser control (click, type, navigate) |
| 61 | +- ✅ Screenshot support |
| 62 | +- ✅ JavaScript execution |
| 63 | +- ✅ Scraping with jina.ai |
| 64 | +- ✅ querySelector for targeted inspection |
| 65 | +- ✅ Token-efficient patterns (silent mode, limit parameters) |
| 66 | + |
| 67 | +### Priority 1: DOM State Endpoint with Element Indexing |
| 68 | +**Token Savings: 60-80%** |
| 69 | + |
| 70 | +Add `/state` endpoint that returns indexed interactive elements: |
| 71 | +- Selector map with numeric indices |
| 72 | +- Element properties: tag, text, aria-label, role, bounds |
| 73 | +- Visibility filtering (only visible/near-viewport elements) |
| 74 | +- Compact JSON format |
| 75 | + |
| 76 | +Then add `/clickByIndex`, `/typeByIndex` for direct element access |
| 77 | + |
| 78 | +### Priority 2: Accessibility Tree Integration |
| 79 | +**Value: Better semantic understanding** |
| 80 | + |
| 81 | +Use Chrome DevTools Protocol Accessibility domain: |
| 82 | +- Get accessibility tree (roles, names, descriptions) |
| 83 | +- Merge with DOM data for richer context |
| 84 | +- Better form field labeling |
| 85 | + |
| 86 | +### Priority 3: Viewport Filtering |
| 87 | +**Token Savings: 30-50% on complex pages** |
| 88 | + |
| 89 | +- Add viewport threshold parameter (default: 1000px beyond viewport) |
| 90 | +- Mark elements outside threshold as hidden |
| 91 | +- Provide scroll hints (e.g., "3 more buttons 2 pages down") |
| 92 | + |
| 93 | +### Priority 4: Interactive Element Detection |
| 94 | + |
| 95 | +Detect: |
| 96 | +- Elements with JS event listeners (click, mousedown, etc.) |
| 97 | +- Clickable elements (cursor: pointer, onclick handlers) |
| 98 | +- Form inputs and their labels |
| 99 | +- Pagination controls |
| 100 | + |
| 101 | +### Priority 5: Performance Optimizations |
| 102 | + |
| 103 | +- Parallel CDP operations (snapshot + AX tree + viewport in parallel) |
| 104 | +- Smart iframe handling (depth limits, size limits) |
| 105 | +- Paint order filtering (only show top layer elements) |
| 106 | +- Element caching & diffing |
| 107 | + |
| 108 | +### References |
| 109 | +- browser-use: https://github.com/browser-use/browser-use |
| 110 | +- DOM service: https://github.com/browser-use/browser-use/blob/main/browser_use/dom/service.py |
| 111 | +- Chrome DevTools Protocol: https://chromedevtools.github.io/devtools-protocol/ |
0 commit comments