Files
humanlayer/humanlayer-wui
Allison Durham c4acfdfc67 implement getsessionleaves json rpc endpoint to show only (#265)
* Add CLAUDE.md to mark TUI as archived (ENG-1507)

Add documentation file for AI assistants clarifying that the TUI
is archived and no new features should be added. Development
efforts should focus on the WUI instead.

* feat(hld): implement getSessionLeaves JSON-RPC endpoint

Add new JSON-RPC endpoint that returns only leaf nodes of session trees,
filtering out any sessions that have children. This reduces UI clutter
by showing only the most recent sessions in each branch.

- Add database migration 5 to create index on parent_session_id
- Implement HandleGetSessionLeaves that builds parent-child map and filters leaves
- Sort results by last activity (newest first)
- Return empty array instead of nil for consistency
- Add comprehensive unit tests covering various tree structures
- Add integration test for the new endpoint
- Create DatabasePath test utility for proper test isolation
- Fix integration tests to use isolated databases instead of user's database

* formatting

* refactor(hld): adopt DatabasePath test utility in SQLite store tests

Replace manual temp directory creation with the standardized DatabasePath
test utility helper. This improves test consistency and automatically handles
environment variable setup and cleanup.

Updated test functions:
- TestSQLiteStore: uses "sqlite" suffix
- TestGetSessionConversationWithParentChain: uses "sqlite-parent" suffix
- TestSQLiteStoreIntegration: uses "sqlite-integration" suffix
- TestSQLiteStorePersistence: uses "sqlite-persist" suffix
- TestSQLiteStoreWithMockSession: uses "sqlite-mock" suffix

* feat(hld): add getSessionLeaves method to all daemon clients

Implements Phase 2 of the SessionLeaves endpoint by adding client support
across all daemon client libraries (Go, TypeScript, and Rust). This method
returns only leaf sessions (sessions with no children) to reduce UI clutter
when users have multiple session continuations.

- Add GetSessionLeaves to Go client interface and implementation
- Add TypeScript types and method to DaemonClient
- Add Rust types, trait method, and Tauri command
- Register new command in Tauri invoke handler

* feat(wui): switch to getSessionLeaves endpoint for session display

Update WUI to use the new getSessionLeaves JSON-RPC endpoint instead of
listSessions. This ensures only leaf sessions (sessions without children)
are displayed, reducing clutter when users have multiple session
continuations.

Part of ENG-1491
2025-07-02 13:43:27 -07:00
..
2025-06-13 14:58:56 -05:00
2025-06-13 14:28:55 -05:00
2025-06-13 14:58:56 -05:00
2025-06-24 16:39:44 -05:00
2025-06-13 14:58:56 -05:00

humanlayer-wui

Web/desktop UI for the HumanLayer daemon (hld) built with Tauri and React.

Development

# Install dependencies
bun install

# Start dev server
bun run tauri dev

# Build for production
bun run build

Quick Start for Frontend Development

Always use React hooks, never the daemon client directly:

import { useApprovals } from '@/hooks'

function MyComponent() {
  const { approvals, loading, error, approve } = useApprovals()
  // ... render UI
}

Documentation

Status

⚠️ Experimental - APIs may change