Skip to content

feat(hooks): links band — every Basalt doc of the session, one key away - #16

Merged
A-PachecoT merged 1 commit into
mainfrom
feat/basalt-links-mod
Oct 4, 2026
Merged

A-PachecoT merged 1 commit into
mainfrom
feat/basalt-links-mod

Conversation

@A-PachecoT

Copy link
Copy Markdown
Member

Why

Agents publish Basalt docs mid-conversation and the URL scrolls away with the chat: today the person scrolls up, copies the link and pastes it into the browser, every time.

What

A Claude Code function-hooks module (plugins/basalt/hooks/register.tsx), declared under modules in hooks.json beside the three shell hooks:

  • Scans every row the session appends (CLI output, MCP results, model text, subagents) for app.basalt.cofoundy.ai links.
  • Band above the prompt: ⬣ basalt 5 docs space › … › title [ Abrir ] [ Copiar ] [ Todos ] — o opens, c copies, l / /basalt-links opens a side pane with every doc of the session.
  • The pane stays pinned across reloads and sessions until the person closes it.
  • Long nested names: title survives (middle cut), then the space, then the nearest folders (crumb, tested at 100/120/160/200 columns).
  • Brand tokens from products/basalt/tokens/colors.css; mark = SVG (desktop) → PNG (kitty/Ghostty direct) → ⬣ in Molten under tmux/screen/zellij/herdr.

Plugin bumped to 0.3.0. Clients without function hooks keep the shell hooks unchanged.

Verification

  • claude plugin validate plugins/basalt — pass (the 4 warnings are pre-existing, about unquoted ${CLAUDE_PLUGIN_ROOT} in the shell hooks)
  • claude plugin test plugins/basalt — 4/4
  • tsc against Claude Code 2.1.288 plugin types — clean
  • bash scripts/validate-skills.sh — pass
  • bash plugins/basalt/hooks/tests/run.sh — 101/101
  • Prototyped live in a hot-reloaded session (band, pane, open/copy, pinning, herdr fallback).

Not verified

  • The band's render is checked by hand, not by a mounted UI test (the test kit could not seed session state).
  • The PNG mark inside herdr: Claude Code draws the alt there even though herdr passes kitty graphics (a manual printf placement renders), so the module picks ⬣ under a multiplexer.

Agents publish docs mid-conversation and the URL scrolls away with the chat.
A function-hooks module (hooks/register.tsx, beside the shell hooks) scans every
row the session appends — CLI output, MCP results, model text, subagents — for
app.basalt.cofoundy.ai links and keeps them in a band above the prompt:

- o opens the latest doc, c copies it, l (or /basalt-links) opens a side pane
  with all of them; the pane stays pinned across reloads and sessions until
  the person closes it.
- Long nested names fit the band: the title survives (cut in the middle), then
  the space, then the nearest folders, collapsed to "…".
- Basalt brand tokens: Molten only on the mark, Signal Teal for counts and
  links, Column Grey chip behind the wordmark.
- The mark is the SVG on desktop, a PNG on kitty/Ghostty run directly, and ⬣ in
  Molten under a multiplexer, where Claude Code draws no pictures.

Clients without function hooks keep the three shell hooks unchanged. Bumps the
plugin to 0.3.0.

Verified: claude plugin validate plugins/basalt (pass), claude plugin test
plugins/basalt (4/4), tsc against Claude Code 2.1.288 types,
scripts/validate-skills.sh (pass), hooks/tests/run.sh (101/101).
@A-PachecoT
A-PachecoT merged commit bdd2142 into main Oct 4, 2026
1 check passed
@A-PachecoT
A-PachecoT deleted the feat/basalt-links-mod branch October 4, 2026 03:37
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.

1 participant