7 Commits
Author SHA1 Message Date
Vasco Schiavo 6dcc9f5b3e refactor: finish the microagent→skill rename in the frontend (#16672) 2026-08-18 11:03:26 +02:00
7d954a9f0f Remove obsolete V1 terminology (#71)
* Remove obsolete V1 terminology

Renames V1-labeled agent-server modules, types, hooks, and component paths
to neutral agent-server/conversation terminology. Drops the residual frontend
`v1_enabled` setting branching while preserving true external/API-version
contracts (e.g. `/api/v1` endpoint paths and provider URL versions).

Fixes #70.

Co-authored-by: openhands <openhands@all-hands.dev>

* Remove legacy V0 frontend code

Drops the V0 chat renderers, event-content helpers, V0 type aliases,
socket.io subscription/mocking infrastructure, V0-only hooks/tests, and
the residual V0/V1 commentary that the previous "Remove obsolete V1
terminology" commit left behind.

Resolved on top of the Phase-1 OSS cleanup that landed on main: kept
the agent-server-aligned settings/secrets services, mocks, and
WebClientFeatureFlags shape.

Co-authored-by: openhands <openhands@all-hands.dev>

* Merge remote-tracking branch 'origin/main' into openhands/remove-v1-terminology

Resolved conflicts:
- src/api/agent-server-adapter.ts: kept ExecutionStatus rename + main's
  getEffectiveLocalBackend usage.
- src/api/conversation-service/agent-server-conversation-service.api.ts
  and .types.ts: kept ConversationWorkspace rename + sandbox_id field
  from main, merged main's cloud branching with our renamed types.
- src/api/event-service/event-service.api.ts: kept agent-server import
  path + main's added cloud-proxy imports.
- src/api/git-service/agent-server-git-service.api.ts: kept renamed
  mapAnyGitStatusToClientStatus + class AgentServerGitService, renamed
  V1GitChange to AgentServerGitChange.
- src/components/features/chat/components/chat-input-actions.tsx: kept
  renamed pause/resume hooks + main's useActiveBackend import.
- src/hooks/mutation/conversation-mutation-utils.ts: merged renamed
  pauseConversation with main's cloud sandbox branch.
- src/hooks/mutation/use-new-conversation-command.ts: kept renamed
  AgentServerConversationService usage with main's added args.
- src/hooks/query/use-conversation-history.ts: kept renamed searchEvents
  with main's added forwarding params.
- src/hooks/query/use-paginated-conversations.ts: kept renamed types +
  main's useActiveBackend.
- src/hooks/query/use-unified-vscode-url.ts: kept renamed
  AgentServerConversationService.

Also propagated V1 -> agent-server / Conversation renames into files
that came from main:
- Cloud service file imports updated to agent-server-conversation-service
  paths and renamed types (V1AppConversation* -> AppConversation*,
  V1ExecutionStatus -> ExecutionStatus, V1RuntimeConversationInfo ->
  RuntimeConversationInfo, V1ConversationWorkspace -> ConversationWorkspace,
  V1Messages -> ConversationMessages).
- pauseV1Conversation -> pauseConversation, fetchV1ConversationData ->
  fetchConversationData, searchEventsV1 -> searchEvents,
  V1ConversationService -> AgentServerConversationService.
- Dropped v1_task_id / is_v1 fields on CreateConversationResponse;
  use the existing task_id field.

Verified locally: npm run typecheck, npm test (1479 passed, 12 skipped),
and npm run build all pass.

Co-authored-by: openhands <openhands@all-hands.dev>

* Merge origin/main into openhands/remove-v1-terminology

Resolved merge conflicts from main, including:
- Incoming cloud backend support (#145), automations, ACP tool events
- Renamed V1 references in merged cloud service files
- Fixed isV1Event → isAgentServerEvent rename and removed dead V0 type guard
- Fixed V1ConfirmationButtons → ConversationConfirmationButtons reference
- Fixed broken relative import path in generic-event-message-wrapper
- Renamed pauseV1Conversation → pauseConversation in cloud test
- Added { ref: "HEAD" } to agent-server-git-service calls to match test expectations

Verified:
- npm run typecheck ✅
- npm test ✅ (1572 passed)
- npm run build ✅

Co-authored-by: openhands <openhands@all-hands.dev>

---------

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
Co-authored-by: hieptl <hieptl.developer@gmail.com>
2026-05-09 00:37:03 +07:00
6ebe7b4e7e feat: add automations frontend on /automations subpath (#141)
* feat: add automations frontend on /automations subpath

Port automations frontend from automation-repo to agent-canvas.

## Changes

### New Routes
- /automations - List view of all automations
- /automations/:automationId - Automation detail view

### New Components
- Automation list components: card, card-skeleton, group, empty-state, error-state
- Automation detail components: header, sections (config, prompt, plugins, activity)
- Shared UI components: toggle-switch, metadata-chip, status-badge, kebab-menu, search-input

### API Integration
- automation-service.api.ts - API client for automation CRUD operations
- Uses existing openHands axios client (shared base URL with agent server)

### MSW Mock Server Handlers
- automation-handlers.ts - Mock handlers for testing
- automations.mock.ts - Sample automation data
- automation-runs.mock.ts - Sample automation run data

### Tests
- API tests: automation-service.test.ts, automation-handlers.test.ts
- Component tests: toggle-switch, metadata-chip, search-input, error-state
- Detail component tests: section-card, run-status-badge, not-found-state

### Hooks
- use-automations.ts - React Query hook for fetching automations list
- use-automation-detail.ts - React Query hook for fetching single automation
- use-has-permission.ts - Permission checking utility hook

### Types
- automation.ts - TypeScript types for automation entities

### Icons
- Added SVG icons: activity, bell, calendar, check-circle, chevron-down,
  chevron-left, clock, cog, database, exclamation-circle, git-branch,
  kebab-vertical, power, puzzle, search, sparkle, target, trash, x-circle, x-mark

Co-authored-by: openhands <openhands@all-hands.dev>

* feat: add local API key auth for automation backend

- Use VITE_AUTOMATION_API_KEY env var for frontend to authenticate
- Pass AUTOMATION_LOCAL_API_KEY to automation backend in dev mode
- Use dedicated axios instance with Bearer auth interceptor
- Add --refresh to uvx to ensure latest git commits are fetched
- URL-encode automation IDs in API paths

The default local API key is 'openhands-local-api-key' which matches
between the frontend and backend for local development.

Co-authored-by: openhands <openhands@all-hands.dev>

* fix: automation service tests and ingress port conflicts

- Fix automation-service.test.ts to mock axios instance correctly
  (was mocking openHands but service uses automationAxios)
- Use vi.hoisted() for mock functions available during vi.mock hoisting
- Change ingress test ports from 19000-19003 to 29000-29003 to avoid
  conflict with VS Code server on port 19000

Co-authored-by: openhands <openhands@all-hands.dev>

* fix: add CORS origins for automation backend in dev mode

The automation backend defaults CORS origins to app.all-hands.dev,
which blocks localhost requests. Add localhost origins for the
ingress port and Vite dev server port.

Co-authored-by: openhands <openhands@all-hands.dev>

* fix: update create-instructions styling and add missing i18n keys

- Use semantic color tokens (text-content, text-basic, bg-base-secondary,
  bg-base, border-default) instead of hardcoded neutral-* colors
- Add all AUTOMATIONS$ i18n keys for the automations frontend

Co-authored-by: openhands <openhands@all-hands.dev>

---------

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: hieptl <hieptl.developer@gmail.com>
2026-05-08 01:49:13 +07:00
Hiep Le c27acde8a0 refactor: remove organization concept (#83) 2026-05-04 20:02:32 +07:00
Graham Neubigandopenhands 254e2d7edd Decouple core components from react-router (#48)
Co-authored-by: openhands <openhands@all-hands.dev>
2026-04-30 06:51:07 -04:00
Graham Neubigandopenhands 18fc1fd9a9 [Phase 1] Strip SaaS-specific code from the OSS repo (#17)
* Strip SaaS-only frontend code

Co-authored-by: openhands <openhands@all-hands.dev>

* Fix static mock builds

Co-authored-by: openhands <openhands@all-hands.dev>

* Restore OSS settings route tests

* Restore pinned TypeScript client dependency\n\nCo-authored-by: openhands <openhands@all-hands.dev>

* Revert vendored TypeScript client workaround

Co-authored-by: openhands <openhands@all-hands.dev>

---------

Co-authored-by: openhands <openhands@all-hands.dev>
2026-04-25 16:27:55 -04:00
openhands 1c239d73a9 Port OpenHands frontend to direct agent_server integration
Co-authored-by: openhands <openhands@all-hands.dev>
2026-04-24 02:46:34 +00:00