{{ message }}
Repository navigation
Feat workbench refine new - #4092
Open
lijiayang619 wants to merge 2 commits into
Open
lijiayang619 wants to merge 2 commits into
lijiayang619 wants to merge 2 commits into
Conversation
added 2 commits
October 14, 2026 14:25
…ersation on refresh - Workbench composer: replace the landing-example category prefix with a pill tag (gray idle, blue hover with remove cross), align input typography with the execution-mode label, and restore the white composer background. - Thread list: vertical more icon, #191919 3%/5% hover and selected overlays for workbench rows, drop the transient blue completed dot, and fall back to relative time for conversations created in-session. - Sidebar: collapse trigger placement and spacing refinements; landing examples get hover/active backgrounds. - Thread root: localized radial glow behind the landing composer area only. - Model selector: showIcon switch so the workbench trigger hides the built-in Cpu icon. - WorkbenchPage: sync conversation_id into the URL via history.replaceState so a refresh reopens the active conversation. - vitest: add the oxc jsx option to the workbench config (rolldown fails to parse every .tsx suite without it).
…before child effects A hard refresh inside a workbench conversation landed back on the composer landing screen. The URL still carried conversation_id, but the restore never started: on mount, React runs child effects before parent effects, so WorkbenchPage's URL-sync effect (whose delete branch strips the param while the active thread is still a draft placeholder) wiped conversation_id before WorkbenchSessionProvider's mount effect could read it. The provider then saw an empty query string and never seeded the remote thread list runtime, and no conversation detail request was ever issued. - Read the deep-linked id synchronously in a useState initializer in WorkbenchSessionProvider so the value is captured during the first render, before any child effect can clean the URL. - Skip the first invocation of WorkbenchPage's URL-sync effect: on a deep link it would otherwise delete the param while the restore is still starting; later runs keep writing/removing the id as before. - Add a regression test that reproduces the race (a child effect wipes conversation_id on mount) and covers the fetch fallback, a late threadId change, and the no-param case.
lijiayang619
requested review from
Dallas98,
WMC001,
YehongPan,
hhhhsc701 and
jeffwu-1999
as code owners
October 14, 2026 07:36
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
URL restoration, icon visibility, attachment access, localization, and regression coverage have unresolved defects.
5 open findings
What changed in this PR
Refines the Workbench UI and adds deep-linked conversation restoration.
Changes:
- Synchronizes active conversations with URL parameters.
- Updates composer, sidebar, thread list, landing, and model selector UI.
- Adds Workbench session restoration tests and Vitest JSX configuration.
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| /> | ||
| )} | ||
| {!compact && workbenchResources && ( | ||
| {!compact && workbenchResources && !workbenchPresentation && ( |
| </span> | ||
| <button | ||
| type="button" | ||
| aria-label={t("chat.composer.removeWorkbenchTag", "移除标签")} |
| {...props} | ||
| > | ||
| <CpuIcon className="size-4" /> | ||
| {showIcon && <CpuIcon className="size-4" />} |
Comment on lines
+329
to
+339
| if (Number.isInteger(conversationId) && conversationId > 0) { | ||
| if (url.searchParams.get("conversation_id") !== String(conversationId)) { | ||
| url.searchParams.set("conversation_id", String(conversationId)); | ||
| window.history.replaceState({}, "", url.toString()); | ||
| } | ||
| return; | ||
| } | ||
| if (url.searchParams.has("conversation_id")) { | ||
| url.searchParams.delete("conversation_id"); | ||
| window.history.replaceState({}, "", url.toString()); | ||
| } |
Comment on lines
+90
to
+94
This branch has not been deployed
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.



No description provided.