Skip to content

fix(staged): cap New Note modal height to prevent overflow on long prompts - #646

Merged
matt2e merged 10 commits into
mainfrom
long-prompt-causes-new-note-dialog-too-tall
Apr 22, 2026
Merged

fix(staged): cap New Note modal height to prevent overflow on long prompts#646
matt2e merged 10 commits into
mainfrom
long-prompt-causes-new-note-dialog-too-tall

Conversation

@matt2e

@matt2e matt2e commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Caps the New Note modal's max-height to the viewport so long prompts no longer push the dialog off-screen
  • Uses a flex cascade through the form and HashtagInput wrapper divs so only the text editor scrolls, keeping the rest of the modal chrome (title, buttons, hashtags) fixed
  • Unifies the text editor row count across all New Session modes (was 4 for review, now 12 for all)
  • Removes the fixed min-height and resize: vertical on the editor in favor of flex-based sizing with overflow-y: auto

Test plan

  • Open New Note modal with a very long prompt — modal should stay within viewport
  • Verify the text editor area scrolls independently when content overflows
  • Check New Session modal in all modes (note, commit, review) — editor height should be consistent
  • Resize browser window to small viewport — modal should adapt without overflow

🤖 Generated with Claude Code

matt2e and others added 10 commits April 21, 2026 16:53
…ompts

Add max-height and overflow-y scroll to the modal so the Start button
remains visible when a large amount of text is pasted into the prompt.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move overflow scrolling from the modal body to the hashtag editor
itself by removing overflow-y from .modal-body and adding a max-height
to the editor, so the dialog chrome (buttons, header) stays fixed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use flex layout to cascade the modal's max-height constraint down
through the body, form-group, and HashtagInput wrappers to the
contenteditable editor. The editor fills available space and scrolls
internally, keeping the Start button and other dialog chrome visible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous flex-based fix removed the 240px min-height, causing the
text box to collapse to zero height when empty. Restore the min-height
so the editor has a usable default size, and add overflow-y: auto so
it scrolls internally when content exceeds available space.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Revert the over-engineered flex cascade that caused the text box to
collapse to zero height when empty. Instead, keep the original
min-height: 240px and simply add a max-height + overflow-y: auto on
the editor so it scrolls internally when content is long.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The review mode was passing rows=4 to HashtagInput while other modes
used rows=12. Since HashtagInput sets an inline min-height based on
rows, the review dialog appeared much shorter. Use rows=12 for all
modes so the dialog height is consistent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…om property

Replace the magic 200px in the editor's max-height calc with a named
CSS custom property --modal-chrome-height, defined on .modal with a
comment explaining the height budget. This makes the relationship
between the modal's max-height and the editor's max-height explicit
and easy to update if the chrome (header, buttons, padding) changes.

No visual change — purely a readability refactor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The --modal-chrome-height custom property underestimated the actual
chrome height, so the buttons were still clipped at the bottom when
the editor was at maximum height. Replace the fragile calc()-based
max-height with a flex cascade: modal-body and form-group get
flex: 1 + min-height: 0 so the modal's max-height constraint flows
down to the editor, which uses flex: 1 + min-height: 240px to fill
available space and scroll internally.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous flex cascade fix didn't work because the
.hashtag-input-wrapper and .hashtag-input-container divs inside
HashtagInput broke the flex chain — they were plain block elements
that grew to fit content. Add flex: 1 + min-height: 0 + display: flex
on both wrappers so the modal's max-height constraint reaches the
contenteditable editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove resize: vertical which allowed users to drag-resize the editor
beyond the modal's max-height, defeating the scroll constraint.

Remove min-height: 240px which was dead code — the inline style from
rows=12 sets min-height: 18em which always wins over the stylesheet
rule.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e
matt2e requested review from baxen and wesbillman as code owners April 22, 2026 05:20
@matt2e
matt2e merged commit f60cbc5 into main Apr 22, 2026
5 checks passed
@matt2e
matt2e deleted the long-prompt-causes-new-note-dialog-too-tall branch April 22, 2026 05:30
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