Skip to content

Commit abe28a7

Browse files
Welly Shenclaude
andcommitted
Simplify comments
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e88f0a1 commit abe28a7

6 files changed

Lines changed: 9 additions & 16 deletions

File tree

packages/agents-manager/src/components/agent-chat/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ export default function AgentChat( {
282282

283283
return (
284284
<AgentUI.Container
285-
// Remount on dock/undock so the floating panel re-seeds — the seed
286-
// props are read at mount only.
285+
// Remount on dock/undock so the mount-only seed props re-apply.
287286
key={ isDocked ? 'embedded' : 'floating' }
288287
{ ...floatingPanelProps }
289288
className={ clsx( 'agenttic', { dark: isDocked } ) }

packages/agents-manager/src/components/agent-dock/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ export default function AgentDock( {
153153
onUndock: ( isResponsiveUndock ) => {
154154
recordBigSkyTracksEvent( 'ai_chat_undocked' );
155155

156-
// The responsive undock opens the chat at the right corner (where
157-
// the sidebar was) at the default size — persist that as the new
158-
// floating state. Manual pop-outs keep the persisted values.
156+
// The responsive undock opens right at the default size; persist that
157+
// as the new floating state. Manual pop-outs keep the persisted values.
159158
if ( ! isResponsiveUndock ) {
160159
return;
161160
}

packages/agents-manager/src/components/agent-history/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ export default function AgentHistory( {
4545

4646
return (
4747
<AgentUI.Container
48-
// Remount on dock/undock so the floating panel re-seeds — the seed
49-
// props are read at mount only.
48+
// Remount on dock/undock so the mount-only seed props re-apply.
5049
key={ isDocked ? 'embedded' : 'floating' }
5150
{ ...floatingPanelProps }
5251
className={ clsx( 'agenttic', { dark: isDocked } ) }

packages/agents-manager/src/components/support-guide/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ export default function SupportGuide( {
5656

5757
return (
5858
<AgentUI.Container
59-
// Remount on dock/undock so the floating panel re-seeds — the seed
60-
// props are read at mount only.
59+
// Remount on dock/undock so the mount-only seed props re-apply.
6160
key={ isDocked ? 'embedded' : 'floating' }
6261
{ ...floatingPanelProps }
6362
className={ clsx( 'agenttic', { dark: isDocked } ) }

packages/agents-manager/src/components/support-guides/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ export default function SupportGuides( {
126126

127127
return (
128128
<AgentUI.Container
129-
// Remount on dock/undock so the floating panel re-seeds — the seed
130-
// props are read at mount only.
129+
// Remount on dock/undock so the mount-only seed props re-apply.
131130
key={ isDocked ? 'embedded' : 'floating' }
132131
{ ...floatingPanelProps }
133132
className={ clsx( 'agenttic', { dark: isDocked } ) }

packages/agents-manager/src/constants.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ export const UNIFIED_CHAT_AGENT_ID = 'wpcom-workflow-unified_chat';
66

77
export const LOCAL_TOOL_RUNNING_MESSAGE = 'local_tool_running';
88

9-
// `agenttic-ui` persists the floating panel side under this key and reads it
10-
// ahead of the `initialChatPosition` prop. Keep in sync with `STORAGE_KEY` in
11-
// `agenttic-ui/src/utils/chatStorage.ts`.
9+
// `agenttic-ui` reads this key ahead of `initialChatPosition` when seeding the
10+
// panel side. Keep in sync with `STORAGE_KEY` in its `chatStorage.ts`.
1211
export const AGENTTIC_CHAT_POSITION_STORAGE_KEY = 'agenttic-chat-position';
1312

14-
// Free-drag seed far past the right edge — `agenttic-ui` clamps it into the
15-
// inset viewport, landing the floating panel exactly at the right corner.
13+
// Free-drag seed `agenttic-ui` clamps into the viewport — lands the panel at the right corner.
1614
export const FLOATING_RIGHT_CORNER_SEED = Object.freeze( { x: Number.MAX_SAFE_INTEGER, y: 0 } );

0 commit comments

Comments
 (0)