Repository navigation
ADFA-6214 | Polish Chat UX, Input Scroll, Shortcuts, and Data-Loss Fix - #109
Conversation
1cc14f1 to
01dc347
Compare
bb4a36a to
bba04ef
Compare
…214] Title chats from the backend and queue prompts behind an in-flight title; grow the prompt with scrolling, Shift+Enter to send, folding right-aligned user bubbles, copy actions and a directional sidebar toggle. Gemini/OpenAI settings get Material 3 styling.
94e119b to
1f8fe70
Compare
alome007
left a comment
There was a problem hiding this comment.
IMPORTANT
- viewmodel/ChatViewModel.kt:1288 - title timeout cancels another plugin's generation
- fragments/ChatFragment.kt:352 - "Naming chat…" survives a rename during the first run
MINOR
- viewmodel/ChatViewModel.kt:1724 - cleared chat can still receive the old title (plausible, not reproduced)
- adapters/ChatAdapter.kt:282 - copy action on tool-activity rows
- plugin/AiCorePlugin.kt:268 - chat-title tooltip describes the pre-PR naming
Paths are under plugins/AI-Core/src/main/kotlin/com/itsaky/androidide/plugins/aicore/. Each finding was re-checked against 1f8fe70. This repo has no written approve/request-changes rule (CLAUDE.md covers the plugin-review skill only), so the default applied. Checked and clean: title settling across stop, session switch and retry; setup-notice clearing; the shortcut handler; the prompt height cap; removed resource and dependency references; Gemini/OpenAI pane styling.
Daniel-ADFA
left a comment
There was a problem hiding this comment.
IMPORTANT
- viewmodel/ChatViewModel.kt:1288 - title timeout cancels another plugin's generation
- fragments/ChatFragment.kt:352 - "Naming chat…" survives a rename during the first run
MINOR
- viewmodel/ChatViewModel.kt:1724 - cleared chat can still receive the old title (plausible, not reproduced)
- adapters/ChatAdapter.kt:282 - copy action on tool-activity rows
- plugin/AiCorePlugin.kt:268 - chat-title tooltip describes the pre-PR naming
Paths are under plugins/AI-Core/src/main/kotlin/com/itsaky/androidide/plugins/aicore/. Each finding was re-checked against 1f8fe70. This repo has no written approve/request-changes rule (CLAUDE.md covers the plugin-review skill only), so the default applied. Checked and clean: title settling across stop, session switch and retry; setup-notice clearing; the shortcut handler; the prompt height cap; removed resource and dependency references; Gemini/OpenAI pane styling.
- Drop the global cancelGeneration() on title timeout; the timed-out await already cancels the title's own future, and the global cancel could kill another plugin's generation on the shared service. - Settle the "Naming chat…" placeholder when the user renames the chat. - Cancel an in-flight title request on Clear Chat, and let only the current request settle the placeholder. - Show the copy action only on user and agent messages. - Reword the chat-title tooltip for generated titles.
Daniel-ADFA
left a comment
There was a problem hiding this comment.
Round 2, verified against 1de3b03. Each prior finding was re-read at the new head, not taken from the replies.
IMPORTANT
- viewmodel/ChatViewModel.kt:1294 - title timeout no longer stops the backend request (reply in its thread)
- viewmodel/ChatViewModel.kt:1731 - Clear Chat strands another chat's "Naming chat…" (reply in its thread)
Re-check of round 1
- Title timeout cancels other plugins' work: fixed as reported (no global cancel), but see the new IMPORTANT in that thread.
- "Naming chat…" survives a rename: fixed.
renameSessionsettles when the new name is non-empty (ChatViewModel.kt,if (trimmed != null) settleTitle). clearMessages()leaves the title job running: fixed for the current chat, but see the new IMPORTANT in that thread.- Copy action on tool rows: fixed.
copyableisUSER || AGENT(ChatAdapter.kt:283). - Chat-title tooltip: fixed. Summary and detail describe the backend-written title and the fallback to it.
Both threads with live issues are unresolved. The CHANGES_REQUESTED from round 1 still stands for them.
Daniel-ADFA
left a comment
There was a problem hiding this comment.
Round 3, verified against 9783fd8. Approving: what remains is MINOR.
MINOR
- viewmodel/ChatViewModel.kt:1733 - clearing one chat still cancels another chat's title through the global cancel
- viewmodel/ChatViewModel.kt:1253 - Stop on a prompt queued behind a title cancels the title
Both are graded MINOR, not IMPORTANT, because they end on this PR's own failure path: the placeholder settles, the chat keeps its prompt as its title, and nothing is stuck or lost. The one cost is that the chat is not re-asked until the process restarts. They share one cause: cancelGeneration() cannot tell a chat run from a title request, so a follow-up that gives titles their own cancel handle fixes both.
Re-check of round 2
- Title timeout left the backend running: fixed.
future.cancelJobOnCancel(job)is now wired in Geminigenerate/generateWithHistory, OpenAIgenerate/generateWithHistory, and localrunGeneration. - Clear Chat stranded another chat's "Naming chat…": fixed.
clearMessages()cancels and nullstitleRequestonly for its own session, so the other chat'sfinallysettles its placeholder.
Description
This PR addresses multiple UX pain points in the Agent chat interface to improve context visibility, interaction fluidity, and application reliability.
PromptScrollGuardandPromptHeightCapto allow vertical scrolling inside a multiline chat input. This ensures the user can read long prompts without accidentally dragging the parent bottom sheet.KeyboardShortcutHandlerthat allows sending messages viaShift + Enteron hardware keyboards, while explicitly preservingEnterfor inserting newlines.sendPromptlogic now refuses the send and leaves the typed text intact if the API key is missing. Additionally, backend setup warnings (flagged viaisSetupError) are automatically purged from the transcript once a valid API key is saved.Details
1dpheight,@color/plugin_outline_variant) to the API settings XML layouts.index.htmlguide to reflect the new shortcuts, collapsible messages, and automated chat naming behaviors.DEMO:
https://drive.google.com/file/d/1V7wBrhiPVKrHgCcuPUDbV5aW_mWDBT7u/view?usp=sharing
Ticket
ADFA-6214
Observation
KeyboardShortcutHandlerlogic is completely decoupled fromKeyEventand Android views, making the shortcut rules fully unit-testable without a device runtime.supersedeTitleRequestmechanism. If a user sends a new prompt rapidly, the system safely cancels the pending title generation so it doesn't hold up the next run.ChatViewModelmanages the expanded/folded state of user bubbles so that message states survive view rebuilds.