Dynamic Expanding Input Area for Long Messages #162
Labels
No labels
Epic 5
MCP
P1
PR-0
PR-1
api
api-layer
architecture
area:backend
area:frontend
arrow
authentication
backend
bug
chat
client
clipboard
common-module
compose
cross-cutting
cross-cutting-requirement
data-layer
data-models
database
desktop-client
documentation
duplicate
enhancement
epic
epic-1
epic-2
epic-3
epic-4
epic-5
epic-6
epic-7
epic-llm-config
error-handling
feature
frontend
good first issue
help wanted
implementation
infrastructure
installer
invalid
kotlin
ktor
llm
medium-priority
message
multiplatform
needs-review
needs-triage
packaging
performance
phase-1
phase-2
phase-3
phase-4
phase-5
phase3
phase:3
priority: high
question
refactor
refactoring
resource-sharing
security
server
server-module
services
session
session-management
settings
setup
shutdown
state
storage
streaming
sub-issue
tests
tooling
type:task
ui
ui/ux
user-accounts
user-management
ux
viewmodel
websocket
windows
windows-integration
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Torvian.eu/chatbot#162
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature Request
Currently the message input area has a maximum of 5 visible lines, making it difficult to enter long messages. This feature will allow the input area to dynamically expand into the scrollable message list area when users enter more than 5 lines of text.
Design
MessageListareaImplementation Plan
Steps
Add
isInputExpandedstate usingrememberSaveableandmanualExpandTogglestate inChatArea.SuccessStateDisplay, with derived logic combining newline count (inputContent.count { it == '\n' } >= 4) and manual toggle.Restructure
InputAreato haveTextFieldalone in first row, then add new action row below with expand/collapse toggle button (left) and Send/Stop button (right-aligned), acceptingisExpandedandonToggleExpansionparameters.Update
TextFieldinInputAreato removemaxLinesconstraint whenisExpanded == true, adjust shape/padding for cleaner look without adjacent button.Modify
MessageListLazyColumnto addInputAreaas last item whenisInputExpanded == truewithAnimatedVisibility, auto-scrolling to keep it visible while typing.Update
ChatArea.SuccessStateDisplayto wrap bottomInputAreainAnimatedVisibilitythat shows only when!isInputExpanded, passing expansion state and callbacks.Technical Details
rememberSaveable, no ViewModel changes needed\n) for simplicityConsiderations
KeyboardArrowUp/KeyboardArrowDownicons for expand/collapse button (most intuitive)