Skip to content

Add task manager UI and APIs for project/agent/task orchestration#952

Closed
nullne wants to merge 5 commits intoslopus:mainfrom
nullne:claude/analyze-web-merge-wDzxQ
Closed

Add task manager UI and APIs for project/agent/task orchestration#952
nullne wants to merge 5 commits intoslopus:mainfrom
nullne:claude/analyze-web-merge-wDzxQ

Conversation

@nullne
Copy link
Copy Markdown

@nullne nullne commented Mar 31, 2026

Summary

This PR introduces a comprehensive task management system for the Happy platform, enabling users to create and manage projects, configure agents, and orchestrate tasks through a web-based UI. It includes backend APIs for CRUD operations on projects, agents, and tasks, along with a complete web interface for task management.

Key Changes

Backend APIs (happy-server)

  • Project Routes (projectRoutes.ts): CRUD endpoints for managing projects with agent associations
  • Agent Routes (agentRoutes.ts): CRUD endpoints for managing global agent configurations
  • Task Routes (taskRoutes.ts): CRUD endpoints for task creation, status updates, and chat message handling
  • Machine Routes (updated): Added display name and host info fields to machine metadata
  • Database Schema (Prisma): Added Agent, Project, ProjectAgent, and Task models with proper relationships and TaskStatus enum
  • Dev Encryption Utility (devEncryption.ts): Encryption/decryption helpers for development environments

Frontend UI (happy-app)

  • Task Manager Screen (tasks/index.web.tsx): Main web-only task management interface
  • Task Manager Sidebar (TaskManagerSidebar.tsx): Sidebar component displaying machines, agents, projects, and tasks with CRUD operations
  • Task Detail View (TaskDetailView.tsx): Real-time chat interface for task execution with message polling and agent status tracking
  • New Task Modal (NewTaskModalWeb.tsx): Modal for creating new tasks with agent selection and execution modes
  • Zustand Store (useTaskManager.ts): State management hook for projects, agents, tasks, and machines with async actions

API Clients (happy-app)

  • Projects API (apiProjects.ts): Client functions for project CRUD operations
  • Agents API (apiAgents.ts): Client functions for agent CRUD operations
  • Tasks API (apiTasks.ts): Client functions for task management and chat messaging
  • Machines API (apiMachinesRest.ts): Client functions for fetching machine information

Utilities & Scripts

  • Machine Info Reporter (report-machine-info.mjs): Script to detect and report host machine capabilities (agents, IP, platform)
  • CLI Auth Seeder (seed-cli-auth.mjs): Script for programmatic CLI authentication in development
  • Makefile: Development commands for Docker Compose orchestration
  • Docker Compose: Service configuration for local development

Internationalization

  • Added "Tasks" tab label and comprehensive task manager translations across all supported languages (English, Spanish, Catalan, Italian, Japanese, Portuguese, Polish, Russian, Chinese Simplified/Traditional)

UI Integration

  • Updated TabBar and MainView to include Tasks tab (web-only)
  • Added Tasks route to app navigation stack
  • Platform-specific routing (web shows task manager, other platforms redirect to home)

Notable Implementation Details

  • Task execution uses polling mechanism (2-second intervals) to fetch chat messages and agent status
  • Agent types are mapped from CLI tool names (claude, codex, gemini, openclaw) to internal agent type identifiers
  • Projects can have multiple agents assigned and are bound to specific machines
  • Tasks create happy sessions for actual agent conversation execution
  • Development encryption utility supports local key-based encryption for sensitive data
  • All API endpoints require authentication via Bearer token

https://claude.ai/code/session_01N4xG3rktLwK5tFWuNwA5AV

claude and others added 5 commits March 30, 2026 23:12
Introduces the core data layer for the agent-native IM system:
- Prisma schema: Agent, Project, ProjectAgent (M:N), Task models with TaskStatus enum
- Server routes: full CRUD for agents, projects (with agent linking), and tasks
- happy-web: new Expo web package with IM-style layout (sidebar + task detail),
  zustand store, API client, settings page for agent/project management

https://claude.ai/code/session_01He3k7YMAse61ksPTHbaPZp
feat: add Agent/Project/Task data models, CRUD APIs, and happy-web IM UI
…nt, task chat

- Add Makefile with `make up` (docker-compose for server + web), `make cli`
  (daemon on host), `make seed` (programmatic auth), `make machine-info`
- Add Dockerfile.web for happy-web Expo dev server in container
- Add docker-compose.yml orchestrating server (PGlite) + web services
- Add dev-only /v1/auth/dev-token endpoint (gated by DEV_AUTH_ENABLED)
- Add 401 auto-retry interceptor in web API client
- Add DB migrations for Agent/Project/Task tables, machine display info,
  project githubUrl
- Add machine PATCH endpoint for displayName + hostInfo (hostname, IP,
  platform, agents, daemonPort, workspaceRoot)
- Add POST /v1/tasks/:id/run to spawn agent sessions via daemon control
  server, with auto-generated workspace paths (ROOT/project-slug/task-slug)
- Add GET/POST /v1/tasks/:id/chat with server-side NaCl encryption proxy
  for reading/writing session messages in dev mode
- Add YOLO mode (--dangerously-skip-permissions) toggle on task creation
- Redesign web UI: agents + machines in sidebar, inline project CRUD with
  github URL, multi-step agent creation (machine -> type -> model),
  simplified task creation (single prompt + plan/execute mode), real-time
  chat UI with agent status tracking and auto-task-completion

Made-with: Cursor
- Remove packages/happy-web entirely (14 files)
- Remove dev token auth endpoint (POST /v1/auth/dev-token)
- Add project/task/agent management UI to happy-app (web only)
- New API layer: apiProjects, apiAgents, apiTasks, apiMachinesRest
- New Zustand store: useTaskManager with auth-bound actions
- Web-only task manager screen with sidebar + detail layout
- Add i18n support for task manager (all 10 languages)
- Remove Dockerfile.web and docker-compose web service

https://claude.ai/code/session_01N4xG3rktLwK5tFWuNwA5AV
@bra1nDump bra1nDump closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants