Files
loki/scripts
g-butandClaude Opus 4.7 bebc82ffcf refactor(brand): zsh typing-hook contract derived from APP_SLUG
Last hidden 3-way contract between brand and runtime:

  scripts/install-cockpit-hooks.sh   writes hooks that emit
                                     /tmp/cockpit-typing-<PANE_ID>
  src/lib/zellij.ts                  reads files starting with cockpit-typing-
  scripts/cockpit-daemon.sh          (already routed)

If a rename only touches the install script, existing user shells keep
writing the old prefix while zellij.ts reads the new one — dispatch fires
while the user is typing, garbling input. No static gate would catch it.

Both sides now derive from APP_SLUG. The install script sources _brand.sh
and uses unquoted heredoc with backslash-escaped $-references so the
generated .zshrc block has APP_SLUG baked in literally at install time
(no dependency on the user having APP_SLUG exported at shell startup).
The MARKER + function names + tab variable name + tmp path are all
slug-derived.

After a rename, users need to re-run install-cockpit-hooks.sh to refresh
their .zshrc with the new prefix. The new MARKER means the install is
detected as fresh, not idempotent — by design, since the old hooks need
to be manually removed or they'll keep writing the old prefix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 00:19:28 +02:00
..