Task edit UX: render edit form as a centered modal#546
Open
bborn wants to merge 1 commit into
Open
Conversation
When editing a task from detail view (press e), the form now renders as a compact, centered modal sized to its content instead of a full-screen form whose body sprawled to fill the whole screen. All fields (project, title, details, attachments, type, executor) are visible at once. The body textarea autogrows within bounds (6–14 lines) and is capped to fit the screen, so short tasks get a tight modal and long ones get a scrollable editing area. The "Discard changes?" confirmation now appears at the top of the modal (right under the header) when escaping with unsaved changes, so it's immediately visible. Only the edit form is modal; the new-task form keeps its full-screen layout. 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.
What
When editing a task from detail view (
e), the edit form now renders as a centered modal sized to its content, instead of a full-screen form whose body textarea sprawled to fill the entire screen.This makes all fields — project, title, details, attachments, type, executor — visible at once, which was the main pain point.
The "Discard changes?" confirmation (shown when pressing
escwith unsaved edits) now appears at the top of the modal, right under the header, so it's immediately visible.How
modalflag onFormModel, set only byNewEditFormModel(the new-task form keeps its full-screen layout).View()wraps the form in a content-sized box (min(90, width-8), capped) and centers it on screen via lipgloss — consistent with the existing delete/quit confirm modals.calculateBodyHeightautogrows the body to its content within bounds (6–14 lines) and caps it to fit the screen, so short tasks get a compact modal and long ones get a scrollable editing area.SetSizesizes inputs to the modal width; applied at construction so the modal renders correctly before any resize.Before / After
Before: full-screen box, body stretched to fill all vertical space, discard prompt at the bottom near the help line.
After (120x40):
Tests
Added
TestEditFormIsModal,TestEditFormDiscardWarningAtTop, andTestEditFormModalBodyHeightBounded. Fullinternal/uisuite passes.🤖 Generated with Claude Code