feat: add web-based UI for taskyou with Fly Sprites integration#160
feat: add web-based UI for taskyou with Fly Sprites integration#160
Conversation
This PR adds a complete web-based UI for taskyou with the following architecture: ## Architecture - **Host (taskweb)**: Handles OAuth authentication, session management, and Fly Sprites orchestration - **Sprite (webapi)**: HTTP API that runs inside each user's Fly Sprite VM - **Frontend (web)**: React + TypeScript + TailwindCSS + Shadcn/ui Each user gets their own isolated Fly Sprite VM with SQLite DB - the host never sees user task data. ## Backend Components - `cmd/taskweb/main.go`: Host web service entry point - `cmd/taskweb-dev/main.go`: Local development server (bypasses OAuth) - `internal/hostdb/`: Host database for users, OAuth accounts, sprites, sessions - `internal/auth/`: OAuth providers (Google, GitHub) and session management - `internal/sprite/`: Fly Sprites SDK integration for VM management - `internal/webserver/`: Host HTTP server with OAuth endpoints - `internal/webapi/`: HTTP/WebSocket API that runs inside sprites ## Frontend Components - Kanban board with 4 columns (Backlog, In Progress, Blocked, Done) - Task cards with status badges, project tags, action buttons - Task detail panel with live execution logs - Settings page with theme, defaults, and project management - New task dialog - OAuth login page ## Development Run locally with: ```bash cd web && npm install && npm run dev # Frontend on :5173 make dev-web # API server on :8081 ``` Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused getSessionFromContext function - Remove unused parseJSON function - Remove unused getProviderFromPath function - Remove unnecessary f.Stat() call Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add framer-motion for smooth animations throughout - Create Command Palette (Cmd+K) for quick task search and navigation - Enhance TaskCard with status animations, glow effects, and better visual hierarchy - Redesign TaskBoard with staggered animations and improved layout - Build comprehensive TaskDetail panel with: - Inline task editing - Retry with feedback dialog - Expandable execution logs with syntax highlighting - Status badges and metadata display - Improve Login page with split layout and feature highlights - Redesign Settings page with card-based sections and animations - Add global keyboard shortcuts (N: new task, R: refresh, S: settings) - Implement status-based color system with CSS variables - Add glassmorphism, glow effects, and gradient accents - Create smooth scrollbars and better responsive design Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CORS middleware now uses actual request Origin header for dev mode - Add Hijack() method to responseWriter for WebSocket support - Add fallback status icon for unknown task statuses in CommandPalette Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
Terminal Streaming for Executor PanesTo let users see and interact with the executor in the browser, we should use ttyd - a C-based terminal-over-websocket server. Why ttyd?
Implementation Approach1. Add ttyd to each Sprite In the Sprite Dockerfile or startup script: # Install ttyd (or include binary in image)
apt-get install -y ttyd
# Start ttyd attached to the executor tmux session
ttyd -W -p 7681 tmux attach -t executor &Flags:
2. Expose via webapi or directly Option A: Proxy through the existing webapi in each sprite 3. Frontend Integration Either embed as iframe: <iframe src={`https://${spriteHost}:7681`} />Or connect xterm.js directly to ttyd's websocket for more control: import { Terminal } from 'xterm';
import { AttachAddon } from 'xterm-addon-attach';
const term = new Terminal();
const ws = new WebSocket(`wss://${spriteHost}:7681/ws`);
term.loadAddon(new AttachAddon(ws));
term.open(containerRef.current);Resources
|
- Add terminal API endpoints (GET/DELETE /tasks/{id}/terminal)
- Create ttyd manager to spawn terminals attached to task tmux sessions
- Add TaskTerminal component using xterm.js for browser-based terminal
- Integrate live terminal section in TaskDetail for running tasks
- Update golangci-lint config to v2 format and suppress style warnings
- Fix WebSocket hijacker support in logging middleware
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Merge golangci.yml configs, keeping comments and exclusions - Add UpdateTaskSchedule method to db package for webapi compatibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Review the new Sprites exec API and document how it can improve the existing sprites integration in PR #103 and PR #160. Key findings: - Exec sessions replace tmux entirely (persistent, reconnectable) - Filesystem API replaces shell-based file operations - Services API replaces nohup+polling for long-running processes - Network Policy API enables security restrictions - Port notifications enable dev server URL forwarding Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sprites Exec API — opportunities for this PRI reviewed the new Sprites exec API ( 1. Use Services API instead of
|
- Use String.fromCharCode(0) and String.fromCharCode(1) for ttyd protocol instead of ASCII characters '0' and '1' - ttyd expects actual byte values (0x00 for input, 0x01 for resize) - Add findDaemonSession() to auto-detect tmux daemon session - Add 'no-ttyd' state with install instructions UI - Use -- separator in ttyd command for proper argument parsing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Architecture
Backend Components
cmd/taskweb/: Host web service (OAuth, sprites orchestration)cmd/taskweb-dev/: Local development server (bypasses OAuth)internal/hostdb/: Host database (users, OAuth accounts, sprites, sessions)internal/auth/: OAuth providers (Google, GitHub) and session managementinternal/sprite/: Fly Sprites SDK integrationinternal/webserver/: Host HTTP serverinternal/webapi/: HTTP API running inside each spriteFrontend Features
Test plan
cd web && npm install && npm run dev- frontend starts on :5173make dev-web- API server starts on :8081🤖 Generated with Claude Code