Skip to content

chore(web): use @parallelworks/ui 0.20, with the chat from @parallelworks/ui/ai - #369

Open
giraffesyo wants to merge 1 commit into
mainfrom
chore/ui-0.20
Open

giraffesyo wants to merge 1 commit into
mainfrom
chore/ui-0.20

Conversation

@giraffesyo

Copy link
Copy Markdown
Member

What was wrong or missing

Studio depended on @parallelworks/ai-chat 0.5.0 and @parallelworks/ui 0.17. The chat package has moved into @parallelworks/ui as @parallelworks/ui/ai, and ui 0.20 changed how workflow forms and graphs work. Both packages also shipped their own Tailwind build, which forced Studio to manage the cascade order between them.

What changed

  • Swapped @parallelworks/ai-chat for @parallelworks/ui/ai and upgraded @parallelworks/ui to ^0.20.0. ui's prebuilt stylesheet now includes the chat rules, so the separate chat stylesheet and its pw-ai-chat layer are gone. ui still emits a top-level base layer, so layers.css keeps declaring it first.
  • DependencyGraphPreview now comes from @parallelworks/ui/graph, since /workflow was renamed.
  • ui's workflow form and graph no longer embed the workflow parser. They call a WorkflowEngine supplied through UIProvider. Studio mounts UIProvider at the root with a loader that imports @parallelworks/workflow-parser (new dependency, ^0.6.0) on first use, so the parser stays out of the initial bundle. The form and the graph each sit in a Suspense boundary while it loads.
  • Starting values are unchanged: initializeValues is called as before, with no blank-default predicate, matching 0.17's default behavior.

How it was verified

  • pnpm build: web type-check and build plus the server build pass.
  • pnpm test: all 217 server tests pass. Web has 52 of 53 passing. The failure, test/attachmentsCursor.test.tsx, also fails without this change on my machine (Node 26, where localStorage is undefined when src/adapter.ts loads), and CI runs Node 22.
  • Ran pnpm dev and checked in headless Chromium:
    • Chat: renders the empty state, starters and composer, with no page errors.
    • Workflow graph (?embed=dag with a mocked two-job workflow): renders Build → Test.
    • Workflow form (Workflows tab with mocked collection and form endpoints, since there was no platform credential locally): renders with expressions resolved by the parser.
    • The only console errors were 503s from /api/query while the local index was loading.
  • Not checked: running a workflow against the platform, or sending a chat message to a real model (no credentials in this environment).

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.

1 participant