In sequential workflows, multiple collapsible turn-activity panels shared
the same SessionRunRecord and displayed identical aggregate metrics (tool
calls, approvals, etc.) instead of per-agent counts.
Root cause: ChatPane grouped thinking messages correctly per agent, but
passed the full unfiltered run object to every TurnActivityPanel, so
summarizeActivity() counted all events from the entire run for each panel.
Changes:
- Extract filterEventsByAgent() and summarizeActivity() to
runTimelineFormatting.ts as pure, testable helpers
- Add agentNames (derived from thinking message authors) and isLastRunPanel
to the DisplayItem turn-activity variant in ChatPane
- TurnActivityPanel now filters run.events through filterEventsByAgent()
so each panel only counts events belonging to its agents
- Git summary / discard actions only render on the last panel of a run
- Per-agent timing derived from scoped events instead of run-level start
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
For builder-based orchestration modes (group-chat, handoff), the loop edge
maxIterations, workflow settings.maxIterations, and mode-specific settings
(e.g. groupChat.maxRounds) were independently editable but only the mode
settings controlled runtime behavior. This caused confusion when changing
one did not update the others.
Changes:
- Add syncBuilderModeEdgeIterations() to keep loop edge maxIterations in
sync with the authoritative mode settings for builder-based modes
- Wire sync into normalizeWorkflowDefinition so edges are consistent on
load/normalization
- Update scaffoldGraphForMode to accept optional settings instead of
hardcoded iteration values (4 for handoff, 5 for group-chat)
- Sync settings.maxIterations <-> groupChat.maxRounds bidirectionally
when either changes in the UI
- Make loop edge controls read-only in the graph inspector for
builder-based modes with explanatory text
- Add 8 consistency tests validating built-in workflows, scaffold
behavior, and normalization sync
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The optimistic fold previously required prior thinking messages in the
pending group (pendingThinking.length > 0) before it would absorb an
unclassified pending assistant message. When the first assistant message
in a turn arrived before any thinking messages were classified, it
briefly rendered as a full chat message, then snapped into the
collapsible panel once the message-reclassified event arrived.
Remove the pendingThinking.length guard so any trailing pending,
unclassified assistant message during an active turn is folded into
the turn-activity panel immediately, regardless of whether prior
thinking messages exist.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The WorkflowValidator rejected loop edges with an 'always' condition,
but maxIterations already guarantees termination at runtime (enforced by
WorkflowConditionEvaluator). This made built-in templates like
Collaborative Group Chat fail validation immediately.
Relax the check so 'always' conditions are accepted when maxIterations
provides the termination guarantee. The condition error now only fires
when neither a non-default condition nor a maxIterations cap is present.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The panel was only emitted as a DisplayItem when classified thinking
messages existed. During most of the turn, thinking messages haven't
been reclassified yet, so the panel appeared late with all activities
already populated.
Two fixes:
- After the message loop, inject a turn-activity item for any active
run that wasn't already attached to a thinking group. This makes the
panel appear as soon as the run record exists.
- Remove the guard that required run events to exist before rendering.
The panel now shows in its 'Working' state immediately when the run
starts, and populates progressively as events arrive.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the separate RunTimeline in the ActivityPanel with a generalized
TurnActivityPanel that renders inline in the chat pane between user
messages and assistant responses.
The new component:
- Shows all turn activities (thinking steps, tool calls, approvals,
handoffs, run status) in a single collapsible panel
- Merges chat thinking messages with run timeline events into a
chronological activity stream
- Auto-expands when a turn starts, auto-collapses on completion
- Displays a compact summary header (elapsed time, tool call count,
handoff count, etc.) when collapsed
- Includes post-run git change summary with discard/commit actions
- Uses subtle entrance animations for rows
Removed components:
- ThinkingProcess.tsx (subsumed by TurnActivityPanel)
- RunTimeline.tsx (no longer needed as a standalone component)
The ActivityPanel retains its agents, session usage, and turn events
(diagnostics/hooks) sections.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the OpenTelemetry and Filter Sensitive Data toggles from the
workflow settings panel. The backend does not consume these settings,
so exposing them is misleading. The domain model and DTOs are retained
so existing workflow definitions remain valid.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add inline descriptions to workflow settings, orchestration mode,
edge inspector, node inspectors, and condition editor properties
so users understand what each option does at a glance.
- Execution Mode: explains off-thread vs lockstep behavior
- Max Iterations: clarifies it prevents runaway loops
- State Scopes: describes shared state containers
- Edge Kind: explains direct, fan-out, fan-in semantics
- Loop Edge: describes iterative cycle behavior
- Reasoning: explains effort vs answer quality tradeoff
- Triage Agent, Tool-Call Filtering, Max Rounds, etc.
- Result Variable, Require Approval, Port ID, Condition
Also enhances FormField component with optional description prop.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Show agent activity label in chat header (Thinking…, Using bash…, etc.)
instead of an anonymous pulsing dot
- Fix ThinkingProcess elapsed timer to tick live every second using
useElapsedTimer hook instead of stale useMemo computation
- Show completed/failed subagents for 3s grace period with fade-out
transition instead of instantly hiding them
- Transition activity labels to Completed state for 1.5s grace period
on session idle instead of abrupt removal
- Eliminate message flash during thinking reclassification by folding
trailing pending assistant messages into the thinking group
optimistically when they follow existing thinking messages
- Stabilize ThinkingProcess isActive flag by checking for pending
messages in the group rather than relying solely on array position
- Skip rendering empty pending messages inside ThinkingProcess steps
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously, CopilotAgentBundle.CreateAsync spawned a separate
CopilotClient (and thus a separate Copilot CLI process) for each
agent in a workflow. When multiple CLI processes started concurrently,
their auto-login mechanisms could race on token refresh, causing
subsequent agents to fail with 'Session was not created with
authentication info or custom provider'.
Share one CopilotClient across all agents in the bundle. Each agent
still gets its own CopilotSession on the shared client. The bundle
owns the client and disposes it after all agents.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scratchpad sessions were hardcoded to only use single-mode workflows.
The handleCreateScratchpad handler filtered for orchestrationMode === 'single'
and auto-selected the first match without any user choice.
Now clicking 'New Scratchpad' opens the WorkflowPicker (same as regular
sessions), letting users choose from all available workflows including
sequential, concurrent, handoff, and group-chat. When only one workflow
exists, it still auto-creates for a seamless single-click experience.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When creating a new session with >1 workflow available, a searchable
popover appears letting users choose which workflow to use. Workflows
are grouped by orchestration mode with mode badges, agent counts,
and favorite indicators. Keyboard navigation (↑↓ Enter Escape) and
fuzzy search are supported.
If only one workflow exists, session creation works immediately
without showing the picker. Scratchpad auto-selects as before.
Wired into all session creation paths:
- Sidebar 'New Session' button
- Ctrl/Cmd+N keyboard shortcut
- Command palette 'New Session' action
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The merge logic was preserving stale persisted versions of builtin
workflows, only overlaying orchestrationMode. This meant edge fixes
(like the handoff loop marking) never reached users who already had
the old version saved.
Builtin workflows are now fully replaced on load so fixes propagate
automatically. Custom (non-builtin) workflows are preserved as-is.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The forward edges from triage to specialists participate in cycles
(triage→specialist + specialist→triage), so they must be marked with
isLoop, condition, and maxIterations to pass validation.
Fixes the Handoff Support Flow template and scaffoldGraphForMode()
for handoff mode. Updates the corresponding test expectation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The center column was a flex column with the canvas as flex-1 min-h-0
and the settings panel as shrink-0. When settings content grew tall
(especially with the orchestration mode panel expanded), the canvas
collapsed to zero height.
Switch the center column to a scrollable container with the canvas
having a guaranteed minimum height via clamp(360px, 50vh, 100%).
Settings flow naturally below and the whole column scrolls.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add first-class backend support for workflow orchestration modes,
including mode settings, graph scaffolding, mode-aware validation,
and real Agent Framework handoff/group-chat execution paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Delete src/shared/domain/pattern.ts and all pattern-specific renderer
components (PatternEditor, NewSessionModal, pattern-graph directory,
patternGraph lib) and their tests
- Migrate all renderer imports from @shared/domain/pattern to
@shared/domain/workflow (ReasoningEffort, reasoningEffortOptions,
WorkflowOrchestrationMode, AgentNodeConfig, WorkflowDefinition)
- Update App.tsx: remove workflowToPattern bridge, createDraftPattern,
NewSessionModal; sessions now created directly with default workflow
- Update ChatPane, ActivityPanel, Sidebar to accept WorkflowDefinition
instead of PatternDefinition and derive agents/mode from workflow
- Update SettingsPanel: remove PatternsSection nav item, pattern editing
state, and pattern-related props; update text references
- Update RunTimeline and modeAccent/modeVisuals records to use
WorkflowOrchestrationMode (drop magentic mode entry)
- Update sessionActivity.ts to use generic agent interface
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the invented code-executor node type entirely. Rename
function-executor to invoke-function to match Agent Framework's
InvokeFunctionTool declarative action. Update InvokeFunctionConfig to
use functionName, arguments, requireApproval, and resultVariable
properties matching the upstream schema.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevents users from adding duplicate start or end nodes, which made the
workflow invalid with no way to recover since those node kinds are
protected from deletion.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- add shared workflow template and serialization helpers for YAML, Mermaid, and DOT export
- add pattern-to-workflow upgrade and template application flows in AryxAppService
- persist built-in and custom workflow templates in workspace state and expose new IPC/preload methods
- cover the new backend slice with shared and app-service tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create CodeExecutorInspector with implementation directive editor,
input/output type fields, and directive help callout
- Create FunctionExecutorInspector with built-in function selector
and key-value parameter editor
- Create RequestPortInspector with port ID, request/response type
fields, prompt editor, and info callout
- Wire all three inspectors into WorkflowGraphInspector routing,
keeping PlaceholderNodeInspector as fallback for unknown kinds
- Enhance WorkflowSettingsPanel with OpenTelemetry and sensitive
data filtering toggles, and a state scopes editor with initial
values support
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add MVP code-executor and function-executor runtime support, request-port
bridging through Aryx user input, state-scope helpers, lockstep execution
mode handling, and validation/tests for new workflow node kinds.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align settings terminology with Agent Framework docs where 'Workflows'
is the top-level concept. 'Orchestration' now only appears as
'Orchestration Mode' in the pattern editor, correctly referring to the
specific mode (sequential, concurrent, etc.) within a workflow.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the restriction that prevented users from deleting built-in
patterns (those with IDs prefixed 'pattern-'). Built-in patterns are
intended as starting points, not permanent fixtures.
Changes:
- Add deletedBuiltinPatternIds field to WorkspaceState to track which
built-in patterns the user has removed
- Update mergePatterns to skip deleted built-ins during workspace load,
preventing them from being re-added
- Remove the isBuiltinPattern guard from AryxAppService.deletePattern;
when a built-in is deleted, its ID is recorded in the tracking list
- Enable the delete button in SettingsPanel and PatternEditor for all
patterns (keep the 'Built-in pattern' label for context)
- Add 3 tests covering built-in deletion, custom deletion, and
selectedPatternId fallback
Users can still restore deleted built-ins via workspace reset.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce a workspace-level agent library that allows users to define
agents once and reference them from multiple orchestration patterns.
Domain model:
- Add WorkspaceAgentDefinition type with name, model, instructions, etc.
- Extend PatternAgentDefinition with optional workspaceAgentId and overrides
- Add resolution helpers that merge workspace agent base with per-pattern overrides
- Extend WorkspaceSettings with agents array and normalize on load
IPC & main process:
- Add saveWorkspaceAgent/deleteWorkspaceAgent IPC channels and handlers
- Resolve workspace agent references in buildEffectivePattern before
sending to sidecar (no C# changes needed)
Settings UI:
- Add 'Agents' tab under Orchestration in the Settings panel
- Create WorkspaceAgentEditor component using ToolingEditorShell
- Show usage count (which patterns reference each agent)
Pattern editor integration:
- Add agent picker dropdown: 'New inline agent' or 'From library'
- Show linked badge (chain icon) on referenced agent graph nodes
- Show linked workspace agent banner in the inspector
- Add 'Save to Agent Library' action to promote inline agents
- Add 'Unlink' action to convert referenced agents back to inline
Tests:
- Add unit tests for resolution helpers (resolvePatternAgent,
resolvePatternAgents, findWorkspaceAgentUsages, normalize)
- Update existing tooling test for new agents field
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a prompt file overrides the turn model, the original agent's
reasoning effort was carried through even when the target model does
not support it. This caused session.create failures for models like
Claude Opus 4.5 which reject reasoning effort configuration.
Now: if the target model's reasoning capabilities are unknown
(supportedReasoningEfforts undefined) or it's an unresolved model
reference, reasoning effort is stripped entirely.
Also adds a model override badge on assistant messages when the run
used a different model than the session's primary agent. The badge
reads the actual model from the run record (SessionRunRecord.agents)
rather than inferring from the prompt invocation metadata.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Surface prompt model and argumentHint metadata across the UI:
- InlinePromptPill: send model in promptInvocation, show model badge
in dropdown, show argumentHint preview, support armed-prompt state
for prompts with argumentHint (prompt stays pinned, hint becomes
composer placeholder, user types additional context before sending)
- ChatPane: armed-prompt state management, argumentHint-driven
placeholder, send button enabled when prompt is armed, clear armed
state on session change
- PromptInvocationChrome: model badge in transcript, parent-repo badge
and shortened source path display for ancestor-relative paths
- ProjectSettingsPanel: model and argumentHint on prompt cards,
parent-repo badge on instructions and prompts with ancestor paths,
.claude/rules mentioned in instructions description and empty state
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- parse prompt model and argument-hint metadata and persist model on prompt invocations
- expand markdown-linked file context in scanned prompt and instruction bodies
- discover .claude/rules instructions and support Claude-style paths metadata
- discover customization roots up to the nearest parent repository and watch them for changes
- apply per-turn prompt model overrides before sidecar execution
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update InlinePromptPill to build ProjectPromptInvocation from
selected prompt file and send it via onSubmit instead of pasting
raw resolved text as chat content
- Thread promptInvocation through ChatPane.onSend and App.tsx to
the sendSessionMessage IPC call
- Add PromptInvocationChrome component for user messages that were
triggered by a prompt file, showing prompt name, agent badge,
tool count, source path, and expandable resolved body
- Surface prompt agent and tools metadata in InlinePromptPill
dropdown list items and ProjectSettingsPanel PromptCard
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Show application mode badges (always/file/task/manual) on instruction cards
- Display instruction name, description, and applyTo glob when present
- Update section descriptions to reflect recursive scanning paths
- Update empty states to list all discovery locations
- Add InstructionModeBadge component for visual mode indicators
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>