Repository navigation
feat(chat): fragment comments to input demo MVP - #294
Merged
Merged
Conversation
Capture selected completed response text, collect localized quote/comment templates in the owning thread draft, and preserve explicit Send as the only generation action. Cover selection, draft lifecycle and production chat regressions; document the demo MVP boundary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 11, 2026
Merged
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.
Summary
Implements the user-approved demo MVP for #293, independently of #172. Select inline, multiline, cross-paragraph or code text within one completed, loaded assistant Markdown segment, open Comment, and explicitly Add to input. Additions append to the latest owning-thread draft without overwriting existing text; several comments and free-form instructions can be reviewed and edited before ordinary Send.
Reuses Milkdown selection capture, Common UI primitives, thread-scoped drafts and the existing submission path. Each template contains the capture-time quotation, short neighboring context and comment. Han characters in the comment choose Chinese labels, ASCII letters otherwise choose English, and remaining input falls back to UI language. Original text is never translated.
Selection reporting has a separate lifecycle from the editor: completing a response or changing active tabs does not remount Milkdown. Tool/thinking/permission and active streaming surfaces do not enable comments; selections spanning distinct text surfaces are rejected. Architecture documentation is updated.
Scope and limitations
alpha; development baseorigin/alphaat191a79c8434d4f1374fdd29160fec656f1780c5f. No merge, release or Issue closure is requested.Validation
pnpm typecheck,pnpm format,pnpm lint:fix,pnpm check:i18nandgit diff --checkpassed. Lint reports 0 errors and 350 existing warnings.VITE_CHAT_PERFORMANCE_FIXTURE=true pnpm --filter @huabu/web buildpassed.pnpm --filter @huabu/web exec playwright test --config e2e/chat-activation.config.ts: 8 tests passed, including all four fragment-feedback scenarios and existing activation, turn-completion, eviction and performance regressions.