1135 Commits

Author SHA1 Message Date
Dex
8545aacb3a Merge pull request #383 from balanceiskey/sundeep/eng-1832-feedback-loom-from-weave-team
Improve keyboard shortcuts and session interaction behavior
2025-07-30 11:34:16 -07:00
Dex
0307e26000 Merge pull request #386 from dexhorthy/race-fixes
[ci] separate make targets, always run tests w/ and without race, remove tests from 'make check'
2025-07-30 11:33:27 -07:00
dexhorthy
31f59f632c remove tui refs 2025-07-30 11:27:09 -07:00
dexhorthy
3e96825d9a remove tui 2025-07-30 11:21:23 -07:00
dexhorthy
4866487000 Merge branch 'main' of github.com:humanlayer/humanlayer into race-fixes 2025-07-30 11:15:17 -07:00
Allison Durham
a47e167777 Simplify agent system by removing specialized agents and reverting co… (#384)
* Simplify agent system by removing specialized agents and reverting commands

Remove 4 specialized agents (debugger, git-commit-creator, linear-searcher,
linear-ticket-reader) and revert their associated commands to direct
implementations. This reduces agent count from ~10 to ~6, improving
auto-routing efficiency.

Commands now handle their tasks directly instead of delegating to agents,
while keeping the ultrathink enhancement in linear.md as requested.

Part of ENG-1834 to drastically simplify the agent system.

* Update .claude/agents/thoughts-analyzer.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update .claude/agents/web-search-researcher.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update .claude/agents/codebase-locator.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* formatting

* test fix for race conditions

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-30 11:14:19 -07:00
dexhorthy
f739f64d28 update checks to not run tests 2025-07-30 11:14:17 -07:00
dexhorthy
ef00c0fea9 lets go 2025-07-30 11:10:12 -07:00
dexhorthy
569a01bb90 makefile race tweeaks 2025-07-30 11:04:24 -07:00
dexhorthy
0d9852dae1 Merge branch 'main' of github.com:humanlayer/humanlayer 2025-07-30 11:04:02 -07:00
Dex
f223b9a5b6 Merge pull request #382 from humanlayer/temp-mid-4
part II of "add make setup" for macos build
2025-07-30 10:35:47 -07:00
Sundeep Malladi
16db2b72a5 mct 2025-07-30 12:24:36 -05:00
Sundeep Malladi
124837c17f fix: improve keyboard shortcuts and session interaction behavior
- Enable 'e' archive hotkey when selections exist without focus
- Add handleRowClick to toggle selection when selections exist instead of activating
- Persist response input in localStorage to prevent data loss
- Change status from "waiting_for_input" to "ready_for_input" for clarity
- Add Escape key to clear selections, or switch from archived view if no selections

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 12:14:47 -05:00
Dex
f92294e65f Update .github/workflows/release-macos.yml
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-30 12:01:58 -05:00
Sundeep Malladi
88da1b7076 Sundeep/eng 1672 seeing situations where taskgroup loaders remain displayed (#381)
* fix: Handle Task tool array content format in claudecode-go (ENG-1672)

Task tools send content as an array format while regular tools use string format,
causing unmarshal failures that silently drop Task tool results. This left
spinners running indefinitely in the WUI.

Changes:
- Add custom ContentField type with UnmarshalJSON to handle both formats
- Update Content struct to use ContentField instead of string
- Add error logging for unmarshal failures in parseStreamingJSON
- Update hld references to use content.Content.Value
- Add comprehensive tests for both content formats
- Update WUI TaskGroup styling for better focus indication

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* mct

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-30 09:06:50 -07:00
dexhorthy
76e3924e20 cleanup and release notes fixes 2025-07-29 19:19:23 -07:00
dexhorthy
1789b1d619 fix: install correct mockgen version in macOS release workflow
The workflow was failing because mockgen wasn't installed. Now installing
go.uber.org/mock/mockgen@latest to match what's used in main.yml and the
project's go.mod dependency.
2025-07-29 18:29:02 -07:00
dexhorthy
2c3d12bd6b Merge branch 'main' of github.com:humanlayer/humanlayer into temp-mid-4 2025-07-29 18:19:55 -07:00
dexhorthy
7150ef5b73 gh actions debug 2025-07-29 18:19:42 -07:00
Dex
db20f6f0db Merge pull request #377 from balanceiskey/sundeep/eng-1828-session-states-not-changing-in-sessiontable-view-as-events
Fix session status update issues
20250730
2025-07-29 17:18:20 -07:00
Dex
0d38531cc5 Merge pull request #379 from dexhorthy/dexter/eng-1719-implement-fallback-to-non-snapshot-diff-when-snapshot
fix: implement fallback to non-snapshot diff when snapshot rendering fails
2025-07-29 17:16:37 -07:00
dexhorthy
4018018cd9 fix: implement fallback to non-snapshot diff when snapshot rendering fails
When snapshot-based diff rendering encounters errors (e.g., "string to change not found"),
gracefully fall back to the simpler non-snapshot diff view instead of showing an error.
This ensures users always see their diffs even with stale snapshots.
2025-07-29 17:05:57 -07:00
dexhorthy
838a6f8484 Merge branch 'main' of github.com:humanlayer/humanlayer 2025-07-29 17:03:42 -07:00
Dex
ad30d3efc2 Merge pull request #378 from dexhorthy/dexter/eng-1831-macos-build-broken-post-hldsdk-typescript-stuff
dexter/eng 1831 macos build broken post hldsdk typescript stuff
2025-07-29 17:02:44 -07:00
dexhorthy
f81c5a7242 fix: add make setup to macOS build workflow 2025-07-29 16:16:12 -07:00
dexhorthy
074e799786 fix: add make setup to macOS build workflow 2025-07-29 15:09:01 -07:00
Sundeep Malladi
d087553fb5 remove accidental deps 2025-07-29 15:33:07 -05:00
Sundeep Malladi
465e6cab14 Add test dependencies and configure Vite to ignore test files
- Adds @types/bun dependency for TypeScript support in tests
- Configures Vite to ignore *.test.ts files in watch mode
- Updates bun.lock with new dependencies

These changes support the new test infrastructure while preventing test files
from triggering unnecessary rebuilds during development.
2025-07-29 14:49:14 -05:00
Sundeep Malladi
484a9a9dcf Add Bun fetch mocking test utility
Creates a test file to verify Bun's fetch mocking capabilities, demonstrating:
- Basic response mocking
- Error response mocking
- URL-based conditional responses
- Mock reset behavior
- Request object handling

This establishes patterns for mocking HTTP requests in future tests.
2025-07-29 14:48:52 -05:00
Sundeep Malladi
de5eee48d3 Add comprehensive tests for AppStore event handling
Adds extensive test coverage for event-driven workflows:
- Session status updates across all state locations
- refreshActiveSessionConversation behavior and error handling
- Event-driven workflows for new approvals and resolved approvals
- Edge cases including rapid status changes and null active sessions

Also adds test-utils.ts with mock session creation helpers.
2025-07-29 14:48:21 -05:00
Sundeep Malladi
d71391eb4e Add event handling for approval status synchronization
Implements event handlers in Layout.tsx that respond to approval events:
- onNewApproval: Updates session status to WaitingInput and refreshes conversation
- onApprovalResolved: Updates session status to Running and refreshes conversation

This ensures the UI stays synchronized with approval state changes.
2025-07-29 14:47:57 -05:00
Sundeep Malladi
bf3e4174d5 Fix refreshActiveSessionConversation method parameter name
The method was passing 'sessionId' instead of 'session_id' to the daemon client,
causing conversation refresh to fail. This corrects the parameter name to match
the API contract.
2025-07-29 14:47:33 -05:00
Allison Durham
47cec3e13e feat: Add thinking keywords to Claude commands and agents (ENG-1819) (#376)
Add strategic thinking prompts to encourage Claude's thinking mode activation:
- Add "ultrathink" to 5 high-complexity files requiring deep analysis
- Add "think deeply" to 10 medium-complexity files
- Place keywords at points where reasoning quality matters most

This brings thinking keyword coverage from 21% to 100% across all Claude
command and agent files, improving response quality and reasoning depth.
2025-07-29 11:57:52 -07:00
Sundeep Malladi
1119c97436 Remove legacy types and transformation logic in daemon client (#372)
* Remove legacy types and transformation logic in daemon client

* Satisfy the linter

* Leftover merge issues
2025-07-29 12:23:01 -05:00
Allison Durham
3aef649e38 feat(wui): Add keyboard shortcut hints for interrupting running sessions (#373)
Display Ctrl+X keyboard hint in session header and help text when session
is in running or starting state to improve discoverability of interrupt
functionality

ENG-1739
2025-07-29 09:15:56 -07:00
Dex
8b12f4529c Merge pull request #374 from dexhorthy/dexter/eng-1814-phase-2-of-daemon-shutdown
feat(hld): Phase 2 of daemon shutdown - persistent dev database and interrupted states
2025-07-29 09:12:48 -07:00
Allison Durham
7445b44b0f Add display handlers for NotebookRead and NotebookEdit tools (#369)
- Add tool name and path display for NotebookRead showing notebook path and optional cell ID
- Add tool name and path display for NotebookEdit showing action type, notebook path, and cell ID
- Add FileText icon mappings for both notebook tools
- Implement approval preview for NotebookEdit showing cell details and new content

These changes ensure notebook tools display properly in the WUI instead of showing "Unknown Subject" or empty text.
2025-07-29 08:32:31 -07:00
Allison Durham
abf0959105 Fix grep tool output rendering in WUI (ENG-1801) (#371)
- Fix false error detection when grep results contain "error" in content
- Add mode-aware display showing appropriate units (files/lines/matches)
- Parse tool parameters to detect grep output_mode
- Enhance count mode to show "Found X matches in Y files"
- Only mark actual grep errors (invalid regex) with error styling
2025-07-29 08:31:29 -07:00
dexhorthy
06d8ba3d8e Merge branch 'main' of github.com:humanlayer/humanlayer into rose-pine 2025-07-28 16:11:26 -07:00
dexhorthy
1ab481bf19 Merge branch 'main' of github.com:humanlayer/humanlayer into dexter/eng-1814-phase-2-of-daemon-shutdown 2025-07-28 14:40:45 -07:00
dexhorthy
5a09507f5d daemon: phase 2 shutdown - persistent dev database and interrupted states
- Add clone-nightly-db-to-dev-db make target to clone nightly db with backup
- Update daemon-dev to use persistent ~/.humanlayer/daemon-dev.db instead of creating copies
- Clarify markOrphanedSessionsAsFailed behavior for interrupting/interrupted states
- Add test coverage for new interrupting and interrupted session statuses
- Update CLAUDE.md to document nightly vs dev database usage

This prepares the daemon for handling interrupted session states while making
development easier with a persistent dev database.
2025-07-28 14:27:32 -07:00
Allison Durham
bbdfb36441 Allison/eng 1818 fix wui event timestamp and react rendering errors after (#368)
* Fix SSE event timestamp handling in SDK client

- Add timestamp field to HumanLayerEvent type definition
- Include timestamp when emitting SSE events from stream handler
- Ensures timestamp data is properly passed through to consumers

* Fix RecentPath type handling across SDK and WUI

- Update SDK RecentPath type to use null for missing timestamps
- Add conditional rendering guards in WUI for null timestamp values
- Prevent React errors from attempting to render null as children
- Improve type safety in timestamp formatting logic

* formatting
2025-07-28 13:26:09 -07:00
Dex
e99a95e95d feat(hld): Phase 1 of implement interrupted session states for graceful shutdown (#364)
* feat(wui): add feedback button with keyboard shortcut

- Add feedback button next to theme selector with MessageCircle icon
- Implement global hotkey Cmd+Shift+F to open GitHub issue form
- Add tooltips to both feedback button and theme selector
- Change default theme from solarized-dark to catppuccin
- Use Tauri's openUrl API for secure external link handling

* feat(hld): implement interrupted session states for graceful shutdown

Replace StatusCompleting with StatusInterrupting and add StatusInterrupted
to properly track sessions that were interrupted via ctrl+x. This allows
interrupted sessions to be resumed later, distinguishing them from
naturally completed sessions.

- Add new session states: interrupting and interrupted
- Fix bug where interrupted sessions were marked as completed
- Update UI to display interrupted status without warning styling
- Update tests to reflect new state terminology

* Enhance worktree script to accept base branch parameter

* Rename session interrupt status from 'completing' to 'interrupting'

---------

Co-authored-by: Allison Durham <allison@humanlayer.dev>
2025-07-28 13:16:57 -07:00
Sundeep Malladi
377e9cba2f Remove unused Rust code (REST Phase 3) (#366)
* Remove Rust daemon client module and dependencies

This commit removes the entire JSON-RPC daemon client implementation
from the Rust codebase as part of Phase 3 migration to REST API:

- Delete all daemon_client module files (client.rs, connection.rs,
  error.rs, mod.rs, subscriptions.rs, types.rs)
- Remove unused dependencies from Cargo.toml: tokio, async-trait,
  thiserror, chrono, futures, dirs
- Update Cargo.lock to reflect removed dependencies

The frontend was already migrated to use HTTP in Phase 2, making this
Rust bridge code obsolete.

* Simplify Tauri application setup

Remove all daemon-related code from lib.rs, leaving only the minimal
Tauri setup with required plugins. This completes the removal of
JSON-RPC infrastructure from the WUI.

The application now consists of just the Tauri builder with plugins
for clipboard, filesystem, opener, and notifications - making the
codebase much simpler and faster to compile.
2025-07-28 14:52:02 -05:00
dexhorthy
42862981c1 Merge branch 'main' of github.com:humanlayer/humanlayer into rose-pine 2025-07-28 12:39:18 -07:00
Allison Durham
06f6194fac fix ordering to install/build sdk first prior to wui (#365) 2025-07-28 12:07:43 -07:00
dexhorthy
cb7eac78b2 Merge branch 'main' of github.com:humanlayer/humanlayer into rose-pine 2025-07-28 11:47:29 -07:00
dexhorthy
597547d8b2 update formatter! 2025-07-28 11:47:21 -07:00
dexhorthy
8bd853fe93 Merge branch 'main' of github.com:tomnagengast/humanlayer 2025-07-28 11:21:12 -07:00
Sundeep Malladi
5ca1ff1f42 Swap WUI daemon connection for REST API (#355)
* feat(hld): enable HTTP server by default on port 7777

Changed default HTTP port from 0 (disabled) to 7777 to support REST API migration.
Added configuration documentation for HTTP server environment variables.

* feat(wui): migrate from JSON-RPC to REST API communication

Replaced Tauri-based JSON-RPC client with HTTP client using HLD SDK.
Added legacy type interfaces to maintain backward compatibility with
existing UI code that expects snake_case properties.

- Created HTTP client with connection retry and SSE support
- Added configuration for daemon URL with environment variables
- Updated type definitions to use SDK types with legacy mappings
- Added SDK dependency and built it for local development

The WUI remains a Tauri desktop app - only daemon communication changed.

* feat(wui): implement HTTP client with camelCase to snake_case transformations

- Add HTTPDaemonClient class with complete REST API implementation
- Implement transform functions for Session, Approval, and Message types
- Handle both camelCase (SDK) and snake_case (UI) property formats
- Add connection retry logic with 3 attempts
- Support SSE event subscriptions with automatic reconnection
- Replace Tauri-based client with HTTP implementation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wui): update type imports to handle enum values correctly

- Import SessionStatus, ApprovalStatus, and EventType as values (not type-only)
- Add Legacy interfaces to maintain backward compatibility with snake_case UI
- Map SDK types to legacy types for gradual migration
- Add comprehensive TODO explaining future refactor plan
- Fix SessionSnapshot to map to FileSnapshotInfo

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wui): update hooks to use new HTTP client API

- Replace unlisten with unsubscribe for event subscriptions
- Fix SDK method signatures (health, listApprovals, getRecentPaths)
- Update event structure access (event.type instead of event.event.type)
- Fix approvals response handling (array directly, not object)
- Update continueSession response property names
- Add proper subscription cleanup in all hooks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wui): update UI components for new API response formats

- Remove references to non-existent ApprovalStatus.Resolved
- Add null checks for date/time formatting functions
- Fix model enum mapping (claude-3-5-sonnet-20241022 → sonnet)
- Update event handlers to use correct event structure
- Fix approvals response handling in Layout component
- Remove non-existent bulk_archive_sessions property reference

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wui): correct EventType import from SDK const object

- EventType is exported as a const object in SDK, not an enum
- Import as type-only since values are passed as string literals
- Fixes "Indirectly exported binding name 'EventType' is not found" error

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wui): properly re-export SDK const objects for enums

- SessionStatus and ApprovalStatus are const objects in SDK, not enums
- Import with aliases and re-export as const assignments
- Export both the value and type for each
- Fixes "Indirectly exported binding name is not found" errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(sdk): build HLD SDK as ES modules for browser compatibility

- Change tsconfig.json module format from commonjs to ES2020
- Fix "exports is not defined" error when SDK loads in browser
- Revert namespace import workarounds now that SDK exports ESM
- SDK now uses standard ES module syntax (export/import)

This was the root cause of all the import/export binding errors.
The SDK was built as CommonJS which doesn't work in browser environments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add client identification headers to daemon CORS config

Add X-Client and X-Client-Version headers to the allowed CORS headers
in the HTTP server to support client identification in REST API calls.

* fix(api): update session creation response format across components

* refactor(wui): use useDaemonConnection hook in Layout component

- Remove duplicate connection logic from Layout.tsx
- Use centralized connection management from useDaemonConnection hook
- Enable periodic health checks every 30 seconds
- Single source of truth for daemon connection state
- Clean up debug logging added during investigation

This fixes the missing periodic health checks by properly utilizing
the hook that was designed for connection management.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(wui): consolidate SSE connections and fix session loading

Major refactoring to eliminate duplicate SSE connections and improve performance:

- Consolidated all SSE subscriptions to a single connection in Layout.tsx
- Added activeSessionDetail to Zustand store to centralize session state
- Removed duplicate SSE connections from useSession hook
- Updated useConversation to read from and update the store
- Fixed session loading to show skeleton UI properly
- Added proper loading/error states in activeSessionDetail
- Removed unnecessary useSession hook abstraction
- Fixed daemon client method names (getConversation not getSessionMessages)

This should significantly reduce browser connection usage and prevent the
server lockup issues when navigating in/out of SessionDetail views.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* brf

* fix: TypeScript errors after SSE consolidation cleanup

- Import SessionStatus in appStore.ts
- Fix launchSession return type to use CreateSessionResponseData
- Update useSessions to use correct response properties (sessionId/runId)
- Fix parameter handling in http-client for both camelCase and snake_case
- Convert getRecentPaths response from string[] to RecentPath[]
- Add missing properties to minimal session object in SessionDetailPage
- Fix undefined handling in useSessionActions

Remaining errors are related to event IDs that might be undefined in SessionDetail components.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remaining TypeScript errors for undefined event IDs

- Add checks for undefined event IDs before using them
- Filter events with undefined IDs in navigation and approval hooks
- Use non-null assertions after filtering
- Add undefined checks in mouse event handlers
- Prefix unused parameters with underscore

All TypeScript errors are now resolved.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add missing tweak

* Add REST API support for session title editing

- Add title field to Session and UpdateSessionRequest schemas in OpenAPI spec
- Update UpdateSession handler to process title field updates
- Add title field mapping in SessionToAPI response conversion
- Regenerate Go API types with title field support
- Add integration test for title update functionality

This completes the backend REST API foundation for title editing,
replacing the broken HTTP client stub with proper REST endpoint support.

* Fix WUI title editing to use REST API instead of broken stub

- Update HLD SDK client to accept title parameter in updateSession method
- Fix TypeScript export conflicts in generated SDK APIs
- Regenerate TypeScript SDK models with title field support
- Replace broken updateSessionTitle stub with working REST API call

Title editing now properly persists changes via REST API instead of
silently failing. This completes the JSON-RPC to REST API migration
for session title editing functionality.

* random

* ci fix (maybe)

* Add HLD TypeScript SDK setup to repository initialization

Include dependency installation and build steps for hld/sdk/typescript
in the setup script to ensure the HLD SDK is properly initialized
alongside other components.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Allison Durham <allison@humanlayer.dev>
2025-07-28 11:16:11 -07:00