Skip to content

feat(cas): add a compactMode prop for narrow host panels [JAR-10410] - #219

Open
andrewwan-uipath wants to merge 2 commits into
developfrom
feat/cas-compact-mode
Open

andrewwan-uipath wants to merge 2 commits into
developfrom
feat/cas-compact-mode

Conversation

@andrewwan-uipath

@andrewwan-uipath andrewwan-uipath commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

https://uipath.atlassian.net/browse/JAR-10410
Adds a compactMode prop that turns on Apollo's spacing.compactMode. It gives smaller text, tighter message spacing and a shorter input, for the Flow and agent builder debug chats (Slack thread).

  • Defaults to false, so existing hosts are unchanged.
  • When on, the widget's 16px text overrides are dropped so Apollo's compact tokens apply.
  • Works with both renderers: Material reads spacing.compactMode, and Wind maps it to data-density="compact".
  • Can be toggled at runtime through Apollo's new setSpacing (apollo-ui#1658), the same way theme and renderer already update.
  • Storybook gets a compactMode control.

Dependencies

Bumps @uipath/apollo-react from 7.11.4 to 7.43.0 for setSpacing, along with @uipath/apollo-wind 2.95.3 and @uipath/apollo-core 5.15.3 to match what it pins. This also covers the apollo upgrade from #210, which only changed dependencies. npm also sorted peerDependencies alphabetically; their versions didn't change.

Testing

  • New tests: the default keeps 16px text, compact passes { compactMode: true }, and a runtime toggle calls setSpacing both ways.
  • Against apollo-react 7.43.0: all 427 package tests, typecheck, eslint, prettier and the build pass.
  • The other packages that use apollo-wind/apollo-core (decisions-and-reasons, external-auth, datatable, pdf-viewer, multi-file-upload) pass their tests, and the full workspace build passes.

Demos

Screen.Recording.2026-11-23.at.5.14.48.PM.mov

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Package Line Coverage
datatable 88.29%
multi-file-upload 87.27%
conversational-agent-chat 91.66%
validation-station 99.33%
classification-station 91.66%
document-viewer 89.38%
external-auth 97.26%
pdf-viewer 96.26%
decisions-and-reasons 98.50%

Passes Apollo's spacing.compactMode through so debug chats (Flow and
agent builder) can use the denser layout. Compact mode drops the widget's
16px text overrides so Apollo's compact tokens apply. Works on both
renderers, and can be toggled at runtime through Apollo's new
setSpacing.

Bumps apollo-react to 7.43.0 for setSpacing, with apollo-wind 2.95.3 and
apollo-core 5.15.3 to match what it pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Unavailable Apollo 7.43.0 internals and mock-only tests leave compact-mode toggling, font override resets, and normal-density restoration unverified in the real Material and Wind renderers.

No open issues 🎉

What changed in this PR

Adds an opt-in compactMode prop to the conversational agent chat widget for narrow host panels, preserving the existing text sizing by default.

Changes:

  • Configures compact spacing at initialization and supports runtime toggling through Apollo’s setSpacing.
  • Adds a Storybook control and tests for default, compact, and runtime-toggle behavior.
  • Upgrades Apollo dependencies to support spacing updates, incorporating the dependency upgrade scope of #210.
File Description
packages/​conversational-agent-chat/​src/​types.ts Declares and documents compactMode.
packages/​conversational-agent-chat/​src/​ConversationalAgentChat.tsx Applies spacing on initialization and prop changes.
packages/​conversational-agent-chat/​src/​ConversationalAgentChat.stories.tsx Adds a compact-mode control, defaulting to false.
packages/​conversational-agent-chat/​src/​__tests__/​ConversationalAgentChat.test.tsx Tests spacing defaults and runtime toggling.
packages/​conversational-agent-chat/​src/​__tests__/​ConversationalAgentChat.surface.test.tsx Adds setSpacing to the service mock.
packages/​conversational-agent-chat/​src/​__tests__/​ConversationalAgentChat.settingsRenderer.test.tsx Adds setSpacing to the service mock.
packages/​conversational-agent-chat/​package.json Upgrades Apollo React, Wind, and Core dependencies.
package-lock.json Records updated Apollo and transitive dependencies.

Review effort: Balanced

@andrewwan-uipath andrewwan-uipath changed the title feat(cas): add a compactMode prop for narrow host panels feat(cas): add a compactMode prop for narrow host panels [JAR-10410] Nov 24, 2026
# Conflicts:
#	packages/conversational-agent-chat/src/__tests__/ConversationalAgentChat.test.tsx

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