Repository navigation
fix(ai): the app AI page's first question box takes pasted and attached files - #39257
Merged
objectstack-fleet[bot] merged 5 commits intoDec 3, 2026
Merged
Conversation
Claude-Session: https://claude.ai/code/session_012dn2AcfwnfHMghyeNLFvob Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dn2AcfwnfHMghyeNLFvob Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dn2AcfwnfHMghyeNLFvob Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dn2AcfwnfHMghyeNLFvob Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dn2AcfwnfHMghyeNLFvob Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack@os-bob · os-bob · session_012dn2AcfwnfHMghyeNLFvob 维护者速读
席位核对 — ACCEPT · repo:objectstack@os-bob · head
|
objectstack-fleet
Bot
deleted the
claude/issue-39239-ask-home-attachments
branch
December 3, 2026 05:20
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.
Fixes #39239
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
PromptInput(AskHomeinui/packages/app-shell/src/console/ai/AppAskPage.tsx). It accepts the composer's list and size limit, by paste (the composer'shandlePaste), drop, or a new attach button beside the send button. Attached files show as the composer's chips, each with a remove button. The send is live once there is text or a file (as in the composer). The files go with the first question, and with a suggested question picked while files are attached. Test idsapp-ask-input,app-ask-send,app-ask-scopeare kept.prompt-input.tsxorchatAttachments.ts: they wereChatbotEnhanced's default props and its privatehandlePromptInputError. They move, unchanged, into a new sibling moduleui/packages/plugin-chatbot/src/chat/composerAttachments.tsx(CHAT_COMPOSER_ACCEPTED_FILE_TYPES,CHAT_COMPOSER_MAX_FILE_SIZE,useAttachmentRefusalNotice,AttachmentRefusedNotice,promptMessageFiles).ChatbotEnhancednow reads them from there (its defaults, its wording and itschat-attachment-refusednotice are byte-for-byte the same), and the package index exports them so the home box uses the same ones. No second list of MIME types is written.prompt-input.tsxneeded no edit:PromptInputand its parts are already exported throughAIElements.ChatbotEnhanced, the size refusal's inlinedefaultValuewas read bycheck:i18n-keysfor the first time (the aliasedtCounthad hidden it) and contradicted theenpack value that actually renders. The call site now carries theenvalue byte for byte; what users read is unchanged.useDeferredFirstSendalready holds and replaysfiles, andChatPane.tsxis untouched. Theaskcallback the home state receives is minted inui/packages/app-shell/src/layout/ChatDockConversation.tsx(askFirst), which stored only{ content }. It now takes(text, files?)and stores the files in the samependingFirstMessageRefthe composer's first send uses; a file-only first question is accepted there too.Files outside the claim's declared surface, and why
The claim's
File surface:namesAppAskPage.tsxfor "theaskpath to the first send",EmptyConversation.tsxandprompt-input.tsx. Measured onorigin/main1fe9c62, the fix needed three other files:ui/packages/app-shell/src/layout/ChatDockConversation.tsx: theaskpath itself is defined here (renderEmptyStateandaskFirst), not inAppAskPage.tsx. Two lines change.ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsxandui/packages/plugin-chatbot/src/index.tsx: the one source of the accepted list and the refusal wording is here; reusing it without a second list means moving it to a shared module and exporting it.EmptyConversation.tsxandprompt-input.tsxwere not edited.ChatPane.tsxandchatAttachments.tswere not touched.overlap-check.mjsbefore each push: clean againstorigin/main, #39250 (which sharesChatDockConversation.tsx) and #39063 (which sharesChatbotEnhanced.tsx).Tests
New file
ui/packages/app-shell/src/console/ai/__tests__/AskHome.attachments-39239.test.tsx(realAppAskPage, realPromptInput, realChatDockConversation;ChatPanestubbed to record the held first message and its files):chat-attachment-refusednotice naming it and the accepted list, while the supported file of the same paste attaches;Acceptance notes
InputGroupframe (rounded and shadowed to keep the large look) instead of a hand-styled textarea; the scope badge and the round send button stay.openFileDialogof the same attachment context..doc/.docxthe composer admits is named in the turn as not read.AGENTS.mdasks for a new pin of a component with a shared harness to go into that harness as a top-leveldescribe; that harness (AppAskPage-37788.test.tsx) is being edited by an in-flight PR on another branch, so this is reported as a conflict for the seat rather than decided here.Verification
Local runs (tests on head a66e26c; the derived gate list on b9a3723 plus the changeset commit)
vitest runofAskHome.attachments-39239.test.tsx+AppAskPage-37788.test.tsx: 2 files, 37 tests passed.vitest run packages/plugin-chatbot/(includes the existingChatbotEnhancedrefusal pins): 88 files, 852 tests passed.vitest run packages/app-shell/src/console/ai packages/app-shell/src/layout: 223 files, 1919 tests passed. The rest ofapp-shellis left toTest UI.turbo run type-check --filter=@object-ui/plugin-chatbotand--filter=@object-ui/app-shell(each runstsc --noEmitand the test project): both green.dispatch-gates.mjs --commands, 38 commands): all exit 0;--ranreconciliation: 38 derived, 38 run, 0 NOT-MEASURED, every line with its exit code. Alsocheck:i18n-keys,check:i18n-drift,check:phantom-deps,check:new-line-citations: exit 0.askFirststoring{ content }only (the pre-fix line) turns 3 of the 7 new pins red (send with files, file-only send, suggestion with files); restored,git diff HEADempty.Read first
ui/packages/app-shell/src/console/ai/AppAskPage.tsx(AskHome,AskHomeSend): the box, the send condition and the suggestion hand-off of attached files.ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsxwithchat/composerAttachments.tsx: the move must be behaviour-neutral for the composer.ui/packages/app-shell/src/layout/ChatDockConversation.tsx(askFirst).Two-minute check
Open an app's
ai:chatpage, paste a screenshot into the question box: a thumbnail chip appears. Type a question and send: the conversation opens with the question and the image attached. Paste a.zip: the amber notice names it and the accepted types.Generated by Claude Code