8000 Add scrolling support to Parent Mode menu by jmahmood · Pull Request #25 · jmahmood/CardBrick · GitHub
[go: up one dir, main page]

Skip to content

Add scrolling support to Parent Mode menu - #25

Merged
jmahmood merged 1 commit into
masterfrom
claude/parent-mode-scroll-598w9f
Jul 7, 2026
Merged

jmahmood merged 1 commit into
masterfrom
claude/parent-mode-scroll-598w9f

Conversation

@jmahmood
@jmahmood jmahmood commented Jul 7, 2026
Copy link
Copy Markdown
Owner

Summary

Implemented scrolling functionality for the Parent Mode menu to handle cases where the menu entries exceed the visible display area.

Key Changes

  • Added top variable to track the scroll position of the menu list
  • Introduced visible variable that dynamically adjusts based on whether a notice is displayed (6 lines with notice, 7 without)
  • Modified the menu rendering loop to only display entries within the current visible window (top to top + visible)
  • Updated index calculation to keep the currently selected item within the visible viewport using top = min(max(top, index - visible + 1), index)

Implementation Details

  • The scroll position automatically adjusts when navigating with arrow keys to ensure the selected menu item stays visible
  • The notice message (displayed when no decks are available) reduces the visible menu area from 7 to 6 lines to accommodate the notice text
  • The menu gracefully handles both small lists (no scrolling needed) and larger lists (scrolling enabled)

https://claude.ai/code/session_01Ddufwnk7A9JuijaK6XdTuH

The menu had grown to 10 entries, pushing the last rows past the
footer at 640x480. Reuse the top/visible windowing idiom from the
multi-select screens, with one fewer visible row when the
'No decks yet' notice needs space below the list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ddufwnk7A9JuijaK6XdTuH
@jmahmood
jmahmood merged commit ce4bc28 into master Jul 7, 2026
3 checks passed
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.

2 participants

0