Skip to content

feat(memory): wire the Claude Code status line on install — PAL becomes visible - #183

Merged
sandstream merged 1 commit into
mainfrom
claude/headroom-kit-integration-cmjw7t
Jun 30, 2026
Merged

sandstream merged 1 commit into
mainfrom
claude/headroom-kit-integration-cmjw7t

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Description

Closes the "why don't I see PAL in the terminal?" gap. PAL's "blocked-on-you" count only reached the agent (via the memory hook injection); the human never saw it unless they hand-edited ~/.claude/settings.json. kit statusline (which renders the setup score + ⚠N PAL count) was never wired anywhere. So kit memory install now wires it.

Type of Change

  • New feature (non-breaking change that adds functionality)

Changes Made

  • installStatusline / uninstallStatusline in memory/install.ts:
    • Sets settings.statusLine = { type: "command", command: "<abs kit> statusline" } (same absolute/wrapper invocation as the hooks, so it resolves in the hook shell).
    • Idempotent, and never clobbers a user's existing custom statusLine — returns foreign and leaves it untouched; uninstall removes only kit's own.
  • kit memory install wires it (skip with --no-statusline); kit memory uninstall removes it. Help text updated.

Pairs with the device-coupled PAL count (#182): the bar shows this device's real blocked-on-you, never an ephemeral session's.

Testing

Test Coverage

  • 3 new install tests: wires when absent + idempotent; never clobbers a foreign statusLine (and uninstall leaves it); uninstall removes only kit's
  • All tests pass (npm test) — 1972 pass, 0 fail

Manual Testing

KIT_CLAUDE_SETTINGS=… kit memory install → writes statusLine.command = "/…/kit statusline" and prints ✓ wired status line; a pre-existing custom statusLine is reported and left as-is.

🤖 Generated with Claude Code

https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg


Generated by Claude Code

…es visible

PAL's "blocked-on-you" count only reached the AGENT (via the memory hook); the
human never saw it in the terminal unless they hand-edited settings.json. So
`kit memory install` now also wires `statusLine` → `kit statusline`, making the
setup score + open-PAL ⚠ count visible in the Claude Code status bar.

  - installStatusline / uninstallStatusline in memory/install.ts: idempotent,
    uses the same absolute kit invocation as the hooks. NEVER clobbers a user's
    existing custom statusLine — reports "foreign" and leaves it; uninstall
    removes only kit's own.
  - memInstall wires it (skip with --no-statusline); memUninstall removes it.
    Help updated.

Pairs with the device-coupled PAL count (#182), so the bar shows THIS device's
real blocked-on-you, not an ephemeral session's. 3 new install tests
(added/idempotent, never-clobber-foreign, uninstall-only-ours). Smoke: install
writes statusLine = "<abs>/kit statusline". 1972 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit 5c46646 into main Jun 30, 2026
17 checks passed
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.

2 participants