Skip to content

Add claude-session-tint plugin - #323

Open
dotcomjack wants to merge 3 commits into
ccplugins:mainfrom
dotcomjack:add-claude-session-tint
Open

Add claude-session-tint plugin#323
dotcomjack wants to merge 3 commits into
ccplugins:mainfrom
dotcomjack:add-claude-session-tint

Conversation

@dotcomjack

Copy link
Copy Markdown

Adds claude-session-tint under Workflow Orchestration.

What it does. Tag a terminal window with a project. It wears that project's color quietly while it works, brightens when a Claude Code response finishes while you are looking at a different window, and drops back the moment you focus it. Built for running many sessions in parallel and not knowing which one is waiting on you.

The part that may be most useful to this list: typing ,api into the Claude Code input box runs a command with no model turn. No tokens, no assistant message in the transcript. It is a UserPromptSubmit hook returning decision:"block" with hookSpecificOutput.suppressOriginalPrompt, so Claude Code never queries the model. That pattern is terminal- and OS-independent and is reusable for any in-session command.

Two non-obvious details, documented in the source:

  • the hook must be wired non-async, since an async hook returns after the prompt already reached the model and cannot gate it
  • it exits 2 as well as printing the JSON, because an earlier success branch can return before the blocking decision is applied

Honest scope. The window coloring is macOS Terminal.app only, because Terminal.app is the one terminal with no native tab colors, which is the reason it exists. On iTerm2, Ghostty or kitty you already have tab colors; the hook is still useful on its own. It no-ops rather than erroring elsewhere.

Notes for review

  • This looks like the first hooks-based entry in the list. Everything I checked ships commands or agents, so please tell me if hooks belong somewhere other than hooks/hooks.json here.
  • Category is a guess. Workflow Orchestration was the closest fit for parallel-session management, but the existing entries there are mostly agent personas. Happy to move it.
  • Vendored to match the repo's model (all 118 existing entries use ./plugins/<name>, none use an external source). Upstream is https://github.com/dotcomjack/claude-session-tint if you would rather link out.
  • marketplace.json diff is 17 insertions and 0 deletions; I preserved the file's original lack of a trailing newline so the diff stays minimal.

MIT licensed.

@dotcomjack

Copy link
Copy Markdown
Author

Updated the vendored copy to v1.2.0 before this lands, so you are not merging a stale snapshot.

A user reported that the colour did nothing when several tabs share one Terminal window, and they were right. Terminal renders only the selected tab's body and gives the tab bar no colour of its own, so painting a background tab was invisible exactly when it mattered, and selecting that tab cleared it before you saw it. It was a silent no-op for multi-tab users.

v1.2.0 gives a tab that shares a window a marker in front of its tab title instead of the background wash, stripped the moment you select the tab. The marker is located with a zero-width U+2060 sentinel rather than a stored copy of the title, so it is stripped rather than restored and can never overwrite a title the user set with /rename. Single-tab windows are unchanged.

Diff here is the vendored tabtint.sh, the plugin manifest version, and the marketplace entry version and description. Still MIT, still no external runtime dependencies.

@dotcomjack

Copy link
Copy Markdown
Author

One more push, v1.2.1. An adversarial review of the shipped v1.2.0 code found three defects, one of which would have been unpleasant for your users:

A tab whose title read back empty had its entire name replaced by a lone marker glyph, and nothing could remove it afterwards because the cleanup path correctly refused to write an empty title but dropped its own tracking flag anyway. That is now declined outright, falling back to the background wash.

Also fixed a retry that could never fire, and cut an AppleScript helper from 730ms to ~381ms per call by not counting tabs for every window before testing for a match.

Sorry for the churn on an open PR. I would rather you merged the version that does not eat tab names.

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