PromptHint: engine draws " · " after the mode label even when a hook's rewritten hint is empty

Open Beginner friendly
#111,195 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
cli

Research direction

Start by locating PromptHintPart and reading how it draws the mode label and dim separator when a render hook rewrites the hint. Reproduce the issue using the ui.render hook from the report with an empty hint in bypass permissions mode. Done when the separator is omitted for an empty rewritten hint and remains correct for non-empty hints.

Written by the indexing model from the issue text.

Description

area:plugins area:tui bug platform:macos

Version: Claude Code 2.1.311, macOS, terminal surface

What happens: A mod hooks ui.render on { component: 'PromptHint' } and strips (shift+tab to cycle) from e.props.hint. In bypass permissions mode the engine has already removed the mode label from hint, so the rewritten hint is "". The engine still draws [mode label] · [hint], which leaves a dangling separator: ⏵⏵ bypass permissions on ·

Expected: When the rewritten hint is empty, no separator is drawn.

Cause: In PromptHintPart, the mode label and the dim " · " are drawn together whenever the site reports the line as rewritten, whatever the hint's text. A mod can't get around it: hint, tail and a custom tree all draw to the right of the separator, and an absolutely positioned Box can't reach it because the site clips it.

Repro:

on('ui.render', { component: 'PromptHint' }, ($, e, next) =>
  next({ ...e, props: { ...e.props, hint: '' } }))

Switch to bypass permissions mode (or any mode with a label) and look at the hint line under the prompt.

Suggested fix: Draw " · " only when the hint is non-empty.

Dominant language
TypeScript
Stars
156k
Forks
25k
Avg merge
16h 19m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.