Skip to main content

:LovelaceHealth

Check the Lovelace Lattice daemon connection and pairing/trust status.

Command Signature

vim
:LovelaceHealth

Alias: :LHealth

Description

The :LovelaceHealth command performs a health check of the Neovim extension's connection to the Lattice daemon and displays pairing/trust status. It renders results in a dedicated buffer with clear status indicators.

What it checks:

  • Daemon connection status and socket accessibility
  • Daemon IPC connectivity (ping)
  • Pairing / trust status (pairing.status)

When to use:

  • After initial installation
  • When troubleshooting connection issues
  • Before submitting important tasks
  • After daemon restart or upgrade

Usage

Basic Usage

vim
:LovelaceHealth

Opens a split window showing health check results.

From Lua

lua
require("lovelace.commands").health()

Output Format

The health check buffer displays results in sections:

## Connection Status

✓ Connected to Lattice daemon
  Socket: ~/.lovelace/lattice/daemon.sock

## Ping

✓ pong

## Pairing / Trust

✗ Device not set up

To pair this Neovim client:
  :LovelaceAuth

Status Indicators

SymbolMeaningDescription
Check passedComponent working correctly
Check failedComponent has issues
WarningComponent working with caveats
InformationAdditional context provided

Common Scenarios

Scenario 1: Fully Operational

All checks pass, extension ready to use:

## Connection Status

✓ Connected to Lattice daemon
  Socket: ~/.lovelace/lattice/daemon.sock

## Pairing / Trust

✓ Device is set up

Next step: Submit your first task with :LovelaceTask

Scenario 2: Connected but Not Paired / Trusted

Daemon is running but pairing/trust setup is required:

## Connection Status

✓ Connected to Lattice daemon
  Socket: ~/.lovelace/lattice/daemon.sock

## Pairing / Trust

✗ Device not set up
To pair this Neovim client:
  :LovelaceAuth

Next step: Run :LovelaceAuth to initiate pairing

Scenario 3: Daemon Not Running

Socket exists but daemon is not responding:

## Connection Status

✗ Not connected to daemon

To start the daemon:
  lattice-ctl daemon start
  lattice-ctl daemon status

Next step: Start daemon with lattice-ctl daemon start

Scenario 4: Socket Not Found

Socket file doesn't exist:

## Daemon Connection
✗ Socket not found
ℹ Checked locations:
  - ~/.lovelace/lattice/daemon.sock
  - /tmp/lovelace-daemon.sock

## Troubleshooting
1. Verify daemon is installed: lattice-ctl --version
2. Start the daemon: lattice-ctl daemon start
3. Override socket path via config `daemon.socket_path` or env `LATTICE_SOCKET`

Next step: Install and start Lattice daemon

Scenario 5: Custom Socket Path

Using non-standard socket location:

## Daemon Connection
✗ Socket not found at default locations
⚠ Custom socket path configured: /custom/path/socket.sock
✓ Connection successful

## Pairing / Trust
✓ Device is set up

No action needed - Configuration is working correctly

Troubleshooting

Health Check Doesn't Open

Symptom: Running :LovelaceHealth shows no output or error

Solutions:

  1. Check plugin is loaded:

    vim
    :lua print(vim.inspect(package.loaded["lovelace"]))
    
  2. Verify installation:

    vim
    :Lazy
    " Check lovelace.nvim is installed
    
  3. Check for errors:

    vim
    :messages
    " Look for Lua errors
    

Connection Check Hangs

Symptom: Health check freezes at "Checking connection..."

Solutions:

  1. Timeout and kill process:

    vim
    <C-c>  " Cancel health check
    
  2. Check daemon process:

    bash
    ps aux | grep lattice-daemon
    
  3. Increase timeout:

    lua
    require("lovelace").setup({
      daemon = {
        retry_count = 1  -- Reduce retry attempts
      }
    })
    

Socket Path Issues

Symptom: "Socket not found" but daemon is running

Solutions:

  1. Find actual socket path:

    • The daemon default is ~/.lovelace/lattice/daemon.sock
    • You can override it via LATTICE_SOCKET or plugin config daemon.socket_path
  2. Configure correct path:

    lua
    require("lovelace").setup({
      daemon = {
        socket_path = "/actual/path/to/socket.sock"
      }
    })
    
  3. Verify socket permissions:

    bash
    ls -la ~/.lovelace/lattice/daemon.sock
    # Should be readable by your user
    

Pairing / Trust Issues

Symptom: Health check shows "Device not set up"

Solutions:

  1. Initiate pairing:

    vim
    :LovelaceAuth
    
  2. Approve the pairing code on a trusted device (for example: ada pair approve <code>)

Integration with Workflows

Pre-Task Verification

Before submitting important tasks:

vim
:LovelaceHealth
" Verify all checks pass
:LovelaceTask
" Submit task with confidence

Post-Installation Verification

After setting up the extension:

vim
:LovelaceHealth
" Check 1: Daemon connection
" Check 2: Pairing / trust

:LovelaceAuth
" If pairing is needed

:LovelaceHealth
" Verify pairing succeeded

Debugging Session

When tasks aren't working:

vim
:LovelaceHealth
" Identify which component is failing

:messages
" Check for detailed error messages

" Fix identified issues, then re-verify
:LovelaceHealth

Related Commands

CommandPurpose
:LovelaceAuthPair / trust this Neovim client
:LovelaceSessionView session information
:LovelaceTasksList all tasks

Next Steps

Related Documentation