Skip to content

feat(next-steps): a layout option to keep one suggestion per row - #92

Open
interrobang-dev wants to merge 1 commit into
hamzafer:mainfrom
interrobang-dev:next-steps-layout
Open

interrobang-dev wants to merge 1 commit into
hamzafer:mainfrom
interrobang-dev:next-steps-layout

Conversation

@interrobang-dev

Copy link
Copy Markdown

Why

next-steps picks its shape from the window: one row when the list fits, one per row when it doesn't. That is a good default, since it saves rows above the prompt. But in a wide terminal almost every list fits, so the suggestions run along one line, and the third one can start a long way to the right of the first. One per row reads more like a menu: 1, 2, 3 stand in a column on the left, each suggestion starts at the same place, and you read down the list and press the number next to the one you want.

It also keeps the band the same from turn to turn. With auto the shape follows both the window width and the length of the suggestions, so one list can sit on a single line and the next, a little longer, splits into rows. With rows it is always a short list, so you know where to look before you read it.

What

A layout user config, following language (#69).

  • auto is the default, and then the band draws exactly as today: one row when it fits, one per row otherwise, with the wide-character handling from next-steps: wide characters count as two columns #72.
  • rows skips only the width check, so the list is one per row however wide the terminal is. The height check stays: a band too short for one per row still gets the one row, cut at its end, so rows never makes the band scroll.
  • It is a picker in /config ("options": ["auto", "rows"]); a stored value outside them counts as unset, so it falls back to auto.

Changes

File
hooks/register.tsx layout read in register(on, options) next to language; one guard on the width check
.claude-plugin/plugin.json userConfig.layout, version 0.2.1 → 0.3.0
.claude-plugin/marketplace.json version bump
README.md, docs/mods.md one line each, in the style of language
site/mods/next-steps/index.html version 0.3.0
tests/next-steps.test.ts 3 tests

Checks

  • claude plugin validate . and claude plugin validate mods/next-steps → passed
  • claude plugin test mods/next-steps → 21 pass, 0 fail (18 existing + 3)
  • Changed a mod: version bumped in its plugin.json and in .claude-plugin/marketplace.json
  • Verified the new tests are load-bearing, each failing alone while the other 20 stay green:
    • dropping the layout guard fails layout rows keeps one per row in a wide band
    • skipping the width check for everyone fails one row when the list fits, by default
    • letting rows skip the height check too fails layout rows still takes the one row in a short band

Note

I've been running this from a local copy with layout: rows and language: Korean, in a wide terminal on Windows. Thanks for next-steps; it has become part of how I work.

This branch has not been deployed

No deployments
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