feat(card): archive-style ───── dividers between numbered options in kb-mode#134
Merged
Merged
Conversation
…kb-mode After PR #133 fixed line collapse, numbered options stayed on their own rows but with the same gap as any other line — visually still a wall of text. Mirror the /archive list affordance: split the prompt at every numbered-option line ("1.", "❯ 2.", " 3.") into its own block and join the blocks with the same ───── rule the session list uses. The trailing hint paragraph (Enter / Esc legend) becomes its own block too, so the option run ends cleanly. Plain prompts without numbered options (ExitPlanMode, plain confirmations) keep the cheap hard-break + paragraph join — no spurious dividers in prose. Source rule lines in the pane are dropped to avoid double dividers. The box-frame (fenced code block) path is untouched; the new helper only runs on the non-box branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Time4Mind
added a commit
that referenced
this pull request
Jun 17, 2026
…ath (#136) The #134 archive-style option dividers only ran in _render_card's frameless branch. But real AskUserQuestion panes frame each option's preview in box-drawing glyphs (│ ┌ ├), so _BOX_FRAME_RE always matched and rendering took the code-fence branch — which emitted the sanitized body as one monospace block with NO dividers. The feature never fired for the panes users actually see (the frameless tests passed because they call _format_kb_prompt directly or feed frameless prompts). Splice literal ───── rule lines between numbered options inside the fenced path too (new _rule_between_options). Inside the fence they render as plain monospace dividers — same visible separation without dropping the fence, which still prevents telegramify's blockquote-collapse ("✂ N lines hidden") and MarkdownV2 escaping on the long boxed region. Each option keeps its trailing preview lines; existing source rules are absorbed so separators never double up. Updates test_box_frame_path_unaffected -> test_box_frame_path_no_hard_breaks (hard-break trick still excluded; dividers now expected) and adds test_options_separated_by_divider. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code