Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions design-system/packages/ui/src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import {
type LucideIcon,
} from "lucide-react";
import { classNames } from "../../internal/classNames";
import { CloudGit } from './cloudGit';
import { Galaxy } from './galaxy';
import { LayersPlus } from './layersPlus';
import { PlayingCardsFan } from './playingCardsFan';
Expand Down Expand Up @@ -136,6 +137,7 @@ export const iconNames = [
"circle",
"circle-arrow-right",
"clock",
"cloud-git",
"code",
"command-mac",
"commit",
Expand Down Expand Up @@ -267,6 +269,7 @@ const lineGlyphs = {
"circle": Circle,
"circle-arrow-right": CircleArrowRight,
"clock": Clock,
"cloud-git": CloudGit,
"git-pull-request": GitPullRequest,
"history": History,
"target": Target,
Expand Down
11 changes: 11 additions & 0 deletions design-system/packages/ui/src/components/Icon/cloudGit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createLucideIcon } from 'lucide-react';

// Lucide cloud-cog outline with the branch layout from assets/git.svg and solid nodes.
export const CloudGit = createLucideIcon('CloudGit', [
['path', { d: 'M4.2 15.1a7 7 0 1 1 9.93-9.858A7 7 0 0 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.2', key: 'cloud' }],
['path', { d: 'M9 13v7', key: 'branch-main' }],
['path', { d: 'M15 13v2.5a1 1 0 0 1-1 1h-4a1 1 0 0 0-1 1', key: 'branch-fork' }],
['circle', { cx: '9', cy: '13', r: '1.5', fill: 'currentColor', stroke: 'none', key: 'branch-top' }],
['circle', { cx: '9', cy: '20', r: '1.5', fill: 'currentColor', stroke: 'none', key: 'branch-bottom' }],
['circle', { cx: '15', cy: '13', r: '1.5', fill: 'currentColor', stroke: 'none', key: 'branch-tip' }],
]);
4 changes: 2 additions & 2 deletions design-system/packages/ui/tests/icon.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Icon, iconNames, canonicalIconNames, iconAliases } from "../dist/index.
import { Network } from "lucide-react";

test("Icon exposes the complete named catalog without duplicate names", () => {
assert.equal(iconNames.length, 101);
assert.equal(canonicalIconNames.length, 98);
assert.equal(iconNames.length, 102);
assert.equal(canonicalIconNames.length, 99);
assert.deepEqual(Object.keys(iconAliases).sort(), ["circle", "download"]);
for (const name of ["thinking", "git", "duplicate", "chevron-left", "selected", "delete", "waitlist-message", "creative", "ultimate", "standard", "minimal", "arrow-down", "unselected"]) {
assert.ok(canonicalIconNames.includes(name), name);
Expand Down
4 changes: 2 additions & 2 deletions src/apps/miniapp-shell/src/generated/chat-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1391,15 +1391,14 @@
height: var(--openbitfun-control-chat-composer-control-height);
align-items: center;
align-self: center;
gap: var(--openbitfun-space-1);
padding: 0;
}
.openbitfun-chat-input__composer > [data-openbitfun-part=body] > [data-openbitfun-part=surface] .openbitfun-chat-input__actions-left {
justify-content: flex-start;
gap: var(--openbitfun-space-2);
}
.openbitfun-chat-input__composer > [data-openbitfun-part=body] > [data-openbitfun-part=surface] .openbitfun-chat-input__actions-right {
justify-content: flex-end;
gap: var(--openbitfun-space-1);
}
.openbitfun-chat-input__composer > [data-openbitfun-part=body] > [data-openbitfun-part=surface] .openbitfun-chat-input__model-usage-group,
.openbitfun-chat-input__composer > [data-openbitfun-part=body] > [data-openbitfun-part=surface] .openbitfun-model-selector {
Expand Down Expand Up @@ -1476,6 +1475,7 @@
}
.openbitfun-chat-input__composer > [data-openbitfun-part=body] > [data-openbitfun-part=surface][data-openbitfun-layout=expanded] .openbitfun-harness-selector__trigger {
height: var(--openbitfun-control-chat-composer-control-height);
padding-inline: var(--openbitfun-space-1);
border-radius: var(--openbitfun-radius-pill);
}
.openbitfun-chat-input--capsule .openbitfun-chat-input__content {
Expand Down
6 changes: 4 additions & 2 deletions src/web-ui/src/flow_chat/components/ChatInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -562,17 +562,16 @@
height: var(--openbitfun-control-chat-composer-control-height);
align-items: center;
align-self: center;
gap: var(--openbitfun-space-1);
padding: 0;
}

.openbitfun-chat-input__actions-left {
justify-content: flex-start;
gap: var(--openbitfun-space-2);
}

.openbitfun-chat-input__actions-right {
justify-content: flex-end;
gap: var(--openbitfun-space-1);
}

.openbitfun-chat-input__model-usage-group,
Expand Down Expand Up @@ -671,6 +670,9 @@
&[data-openbitfun-layout='expanded'] {
.openbitfun-harness-selector__trigger {
height: var(--openbitfun-control-chat-composer-control-height);
// The idle label's inset adds to the action gap and the add icon's
// own inset. Keep that visible spacing compact in every interaction state.
padding-inline: var(--openbitfun-space-1);
border-radius: var(--openbitfun-radius-pill);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/web-ui/src/flow_chat/components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6350,7 +6350,8 @@ export const ChatInput: React.FC<ChatInputProps> = ({
} : undefined}
workspaceId={executionWorkspaceId ?? ''}
repositoryPath={chatStripRepositoryPath}
workspaceLabel={chatStripWorkspaceLabel}
workspaceLabel={isAssistantWorkspace || chatInputModePolicy.fixedModeId === 'Claw'
? '' : chatStripWorkspaceLabel}
executionTarget={effectiveTargetSession?.config.executionTarget}
dispatchControl={dispatchControl}
worktreeControl={worktreeControl}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ export const ChatInputWorkspaceStrip: React.FC<ChatInputWorkspaceStripProps> = (
return (
<Tooltip content={workspaceTooltipContent} placement="top">
<span data-openbitfun-component="chat-input-workspace-strip" data-openbitfun-part="workspace" className="openbitfun-chat-input-workspace-strip__workspace">
<Icon name="folder-open" size="xs" aria-hidden />
<span className="openbitfun-chat-input-workspace-strip__workspace-name"><OverflowText>{label}</OverflowText></span>
</span>
</Tooltip>
Expand All @@ -621,6 +622,7 @@ export const ChatInputWorkspaceStrip: React.FC<ChatInputWorkspaceStripProps> = (
setWorkspaceMenuOpen(open => !open);
}}
>
<Icon name="folder-open" size="xs" aria-hidden />
<span className="openbitfun-chat-input-workspace-strip__workspace-name"><OverflowText>{label}</OverflowText></span>
</button>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import { HarnessProfileSelector } from './HarnessProfileSelector';

vi.mock('react-i18next', () => ({
useTranslation: () => ({
t: (key: string, options?: { defaultValue?: string }) =>
options?.defaultValue ?? key,
t: (key: string, options?: { defaultValue?: string; name?: string }) =>
key === 'chatInput.harness.modeLabel'
? `${options?.name} mode`
: options?.defaultValue ?? key,
}),
}));

Expand Down Expand Up @@ -76,7 +78,7 @@ describe('HarnessProfileSelector', () => {
'[data-testid="harness-profile-selector"]',
);
expect(trigger?.querySelector('.openbitfun-harness-selector__density-mark')).toBeNull();
expect(trigger?.textContent).toBe('chatInput.harness.profiles.Standard.name');
expect(trigger?.textContent).toBe('chatInput.harness.profiles.Standard.name mode');
expect(trigger?.dataset.harnessPending).toBeUndefined();
expect(
container.querySelector('[data-testid="harness-profile-pending-dot"]'),
Expand Down Expand Up @@ -401,7 +403,7 @@ describe('HarnessProfileSelector', () => {
expect(trigger?.dataset.harnessLocked).toBe('true');
expect(trigger?.dataset.harnessFixed).toBe('true');
expect(trigger?.disabled).toBe(false);
expect(trigger?.textContent).toBe('chatInput.harness.profiles.Standard.name');
expect(trigger?.textContent).toBe('chatInput.harness.profiles.Standard.name mode');

await act(async () => {
trigger?.dispatchEvent(new MouseEvent('click', { bubbles: true }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ export const HarnessProfileSelector: React.FC<HarnessProfileSelectorProps> = ({
: knownSelectedProfile
? t(`chatInput.harness.profiles.${knownSelectedProfile}.name`)
: t('chatInput.harness.unsupportedProfile', { id: selectedProfile });
const triggerLabel = primaryLabel;
const triggerLabel = presentation === 'standalone'
&& !legacySession
&& knownSelectedProfile
&& isSelectableProfile(knownSelectedProfile)
? t('chatInput.harness.modeLabel', { name: primaryLabel })
: primaryLabel;
const triggerTooltip = legacySession
? t('chatInput.harness.legacySessionNotice')
: !selectedProfileAvailable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ export const welcomePanelAppearanceDescriptor: AppearanceSurfaceDescriptor = {
{ id: 'root', propertyProfile: 'layout', visualRole: 'workspace' },
{ id: 'content', visualRole: 'card' },
{ id: 'greeting', visualRole: 'content' },
{ id: 'caption', propertyProfile: 'paint', visualRole: 'content' },
{ id: 'modeIcon', propertyProfile: 'paint', visualRole: 'decoration' },
{ id: 'modeChoices', visualRole: 'content' },
{ id: 'modeOption', propertyProfile: 'control', visualRole: 'control' },
{ id: 'modeName', propertyProfile: 'paint', visualRole: 'content' },
{ id: 'heading', propertyProfile: 'paint', visualRole: 'content' },
{ id: 'tagline', propertyProfile: 'paint', visualRole: 'content' },
{ id: 'divider', propertyProfile: 'paint', visualRole: 'divider' },
{ id: 'narrative', propertyProfile: 'paint', visualRole: 'content' },
{ id: 'openWorkspaceAction', propertyProfile: 'control', visualRole: 'control' },
{ id: 'workspaceAction', propertyProfile: 'control', visualRole: 'control' },
{ id: 'gitAction', propertyProfile: 'control', visualRole: 'control' },
{ id: 'workspaceMenu', propertyProfile: 'overlay', visualRole: 'popup' },
{ id: 'workspaceItem', propertyProfile: 'control', visualRole: 'control' },
{ id: 'cowork', visualRole: 'content' },
],
states: [
Expand Down
Loading
Loading