Feat workbench refine new by lijiayang619 · Pull Request #4092 · ModelEngine-Group/nexent · GitHub
Skip to content

Feat workbench refine new - #4092

Open
lijiayang619 wants to merge 2 commits into
developfrom
feat_workbench_refine_new
Open

lijiayang619 wants to merge 2 commits into
developfrom
feat_workbench_refine_new

Conversation

@lijiayang619

Copy link
Copy Markdown
Contributor

No description provided.

ljy 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.
Copilot AI balanced review requested due to automatic review settings October 14, 2026 07:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.
File Description
frontend/​vitest.workbench.config.ts Enables TSX transformation.
frontend/​tests/​workbench/​WorkbenchSessionRestore.test.tsx Adds restoration tests.
frontend/​features/​workbench/​WorkbenchPage.tsx Synchronizes conversation URLs.
frontend/​features/​workbench/​providers/​WorkbenchSessionProvider.tsx Initializes deep links synchronously.
frontend/​features/​workbench/​lib/​workbench-composer-tag.ts Adds structured composer tags.
frontend/​features/​workbench/​components/​WorkbenchLandingExamples.tsx Refines landing examples.
frontend/​app/​[locale]/​newchat/​ui/​model-selector.tsx Adds icon visibility control.
frontend/​app/​[locale]/​newchat/​assistant-ui/​threadlist-sidebar.tsx Adjusts sidebar layout.
frontend/​app/​[locale]/​newchat/​assistant-ui/​thread.tsx Updates landing background.
frontend/​app/​[locale]/​newchat/​assistant-ui/​thread-list.tsx Refines history rows and statuses.
frontend/​app/​[locale]/​newchat/​assistant-ui/​composer.tsx Redesigns Workbench composer controls.

🧠 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants