Repository navigation
feat(app-shell): workbench home ask-AI box opens the drawer with the question - #39908
Merged
Merged
Conversation
The page the built-in workbench app's Home menu entry mounts, drawn in the app shell from the retired desktop home's sections: greeting and summary, an ask-AI slot, today's three columns (my tasks / awaiting approval / notifications), recents, the empty environment's add-app entries, and from 1280 px a right rail with my apps and add app. The ask-AI slot and the task column are their own modules for #39878 and #39873 to fill. Claude-Session: https://claude.ai/code/session_01Q4EjjPnSQ8vC4cCFntmXL7 Co-authored-by: Claude <noreply@anthropic.com>
…; main column fills when no rail Claude-Session: https://claude.ai/code/session_01Q4EjjPnSQ8vC4cCFntmXL7 Co-authored-by: Claude <noreply@anthropic.com>
Matches the workbench menu order (Home, Approvals, Tasks, Notes) the maintainer asked for in #39896: approvals, then my tasks, then notifications. Claude-Session: https://claude.ai/code/session_01Q4EjjPnSQ8vC4cCFntmXL7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjPnSQ8vC4cCFntmXL7 Co-authored-by: Claude <noreply@anthropic.com>
From 1280 px the page is one four-track grid: Today's three columns and the 「My apps」 rail each take a track, so the rail is exactly a Today column wide. Side by side, the Today columns stretch to one height of at least a header and three rows, and 「My apps」 is at least that tall, so the first row's tops and bottoms line up whether a column is empty or full. 「Add app」 is its own card, and the rail no longer repeats the doors the empty environment expands in the main column. 「Recently accessed」 appears with its first item instead of an empty strip. Home's activity card and the connect-assistant card take the same card shell as the others. Claude-Session: https://claude.ai/code/session_01Q4EjjPnSQ8vC4cCFntmXL7 Co-authored-by: Claude <noreply@anthropic.com>
…omeRecentRows Claude-Session: https://claude.ai/code/session_01Q4EjjPnSQ8vC4cCFntmXL7 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:cloud@hotlong · hotlong · session_01Q4EjjQzFqHGjUAXt8kBQhV L1: ACCEPT at head
|
This was referenced Dec 6, 2026
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.
Requested by Jack · project thread
Refs #39878
Was stacked on #39895, which has landed;
main(with it) is merged into this branch.What changes
The first slice of #39878 as revised on 2026-12-06 (「最小上线切片」): a prominent ask-AI box under the workbench home's greeting. Suggestions, attachments and the phone app list placement are later slices.
WorkbenchAskSlot.tsx): full width under the greeting, placeholder 「问问你的数据,或让 AI 帮你做事…」 / "Ask about your data, or have AI do something for you…". Enter or the send button opens the right-side drawer (the phone sheet belowmd) on a newaskconversation whose first message is the question; the workbench page does not navigate (objectstack#34608: AI lives only in the drawer). Shift+Enter breaks the line; an Enter that ends an IME composition (pinyin, kana) sends nothing. Drawn only where anaskagent is served, otherwise the slot collapses. It replaces the 「Ask AI」 button the slot held, and is drawn for admins too (the card: admins can have AI change apps from here), soHomeAiActions' maker exclusion does not apply.ambientAppPackage) and the conversation is created with no package — it is filed under 「All」 in the drawer history.ChatDockControl.open(target, handoff)documents that a handoff's prompt "is held in memory and sent once as the target thread's first message", anduseConsoleChatDockholds it — but the body never received it ({...thread}spread ahandoffpropChatDockPaneldoes not declare), so nothing delivered it (declared ≠ enforced). Now:ChatDockPanel/ChatDockMobileSheetforwardhandofftoChatDockConversation;ChatDockConversationputs the prompt into the existing first-send stash (pendingFirstMessageRef) only once the fresh thread it was opened with is in view with no conversation yet — never into a thread that already exists, eachseqonce, a still-held first message joined rather than replaced — and bumps a signal thatChatPanepasses touseDeferredFirstSend's existingpendingSignal, which then creates the conversation and replays the send exactly like a typed first message;useConsoleChatDock: the body moving its own thread (its first send naming the fresh thread, a history row, +) spends the held handoff, so a body mounted again (drawer reopened, phone sheet shown again) never sends it twice.useOpenAssistantalready carries it in navigation state to the pre-drawer address, which routes back into the drawer.workbench.ask.placeholder/workbench.ask.sendin all 11 packs (zh-Hant regenerated bygen:zh-hant).Why
The maintainer asked for an in-app AI entry on the workbench home (#39871 phase 1, #39878's 2026-12-06 revision): a box under the greeting that opens the right-hand AI panel with the question, scoped to all apps, hidden when the runtime serves no AI.
Verification
WorkbenchHomePage.test.tsx›WorkbenchAskSlot: placeholder and accessible names from the packs; Enter and the send button callopen({ agent: 'ask', fresh: true }, { handoffPrompt })with the trimmed question and empty the box, no navigation; Shift+Enter, IME Enter (isComposing, keyCode 229) and a blank box send nothing; with no drawer host it navigates to/ai/ask?new=1with the question in state; noaskagent → empty slot.ChatDockConversation.hostProps-38454.test.tsx› handoff: held + signalled on a fresh ask thread; sameseqnot taken twice, a secondseqjoined; an existing thread never receives it (mutation-checked: dropping the fresh/no-conversation gate fails this pin); a blank prompt sends nothing.vitest runoverapp-shell/src/{layout,console/home,console/workbench,console/ai}+packages/i18n: 389 files, 4182 passed, 13 skipped, 0 failed.type-checkfor@object-ui/app-shelland@object-ui/i18nclean; eslint on every touched file: no new finding (one intentionalsetStatein an effect is annotated with why);check:i18n-keys,check:i18n-drift,check:new-line-citations(0 new),check:empty-changeset,check:changeset-fixed,check:adr-0087-registration,check:test-source-alias,check:doc-authoringpass.os dev(showcase,--fresh; verify tree = this branch + feat(workbench): the built-in Workbench app (工作台), served by os dev and os serve #39896's head merged locally, not pushed; both have since landed onmain; Console fromui/source over Vite). The open runtime serves no AI agent, so/api/v1/ai/agents, the conversation create and/agents/ask/chatwere stubbed in Playwright, recording what the console sends:{}), then one/agents/ask/chaton that conversation whose only user message is the typed question,context.agentName: 'ask',uiLocaleen / zh-CN.Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic. (nopackages/specchange)pnpm lintpasses.main, one pull request. (was stacked on feat(app-shell): workbench home — greeting, ask-AI slot, today's three columns, recents, my-apps rail (workbench:home) #39895 by the dispatch order;mainmerged in after it landed)packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4EjjRhgTtzifTZgBfaW8D