Minor improvements

This commit is contained in:
Siddharth Ganesan
2026-01-27 11:03:13 -08:00
parent be95a7dbd8
commit 72594df766
8 changed files with 13 additions and 15 deletions

View File

@@ -31,7 +31,6 @@ const DEFAULT_ENABLED_MODELS: Record<CopilotModelId, boolean> = {
'claude-4.5-opus': true,
'claude-4.1-opus': false,
'gemini-3-pro': true,
'auto': true,
}
// GET - Fetch user's enabled models

View File

@@ -528,7 +528,6 @@ const TraceSpanNode = memo(function TraceSpanNode({
const isDirectError = span.status === 'error'
const hasNestedError = hasErrorInTree(span)
const showErrorStyle = isDirectError || hasNestedError
const isCached = span.cached === true
const { icon: BlockIcon, bgColor } = getBlockIconAndColor(span.type, span.name)
@@ -587,7 +586,7 @@ const TraceSpanNode = memo(function TraceSpanNode({
isIterationType(lowerType) || lowerType === 'workflow' || lowerType === 'workflow_input'
return (
<div className={cn('flex min-w-0 flex-col', isCached && 'opacity-40')}>
<div className='flex min-w-0 flex-col'>
{/* Node Header Row */}
<div
className={cn(
@@ -613,10 +612,7 @@ const TraceSpanNode = memo(function TraceSpanNode({
<div className='flex min-w-0 flex-1 items-center gap-[8px]'>
{!isIterationType(span.type) && (
<div
className={cn(
'relative flex h-[14px] w-[14px] flex-shrink-0 items-center justify-center overflow-hidden rounded-[4px]',
isCached && 'grayscale'
)}
className='relative flex h-[14px] w-[14px] flex-shrink-0 items-center justify-center overflow-hidden rounded-[4px]'
style={{ background: bgColor }}
>
{BlockIcon && <BlockIcon className='h-[9px] w-[9px] text-white' />}
@@ -627,7 +623,6 @@ const TraceSpanNode = memo(function TraceSpanNode({
style={{ color: showErrorStyle ? 'var(--text-error)' : 'var(--text-secondary)' }}
>
{span.name}
{isCached && <span className='ml-1 text-[10px] text-[var(--text-tertiary)]'>(cached)</span>}
</span>
{isToggleable && (
<ChevronDown

View File

@@ -246,7 +246,6 @@ export function getCommandDisplayLabel(commandId: string): string {
* Model configuration options
*/
export const MODEL_OPTIONS = [
{ value: 'auto', label: 'Auto' },
{ value: 'claude-4.5-opus', label: 'Claude 4.5 Opus' },
{ value: 'claude-4.5-sonnet', label: 'Claude 4.5 Sonnet' },
{ value: 'claude-4.5-haiku', label: 'Claude 4.5 Haiku' },

View File

@@ -1042,7 +1042,9 @@ export const WorkflowBlock = memo(function WorkflowBlock({
<div
ref={contentRef}
onClick={handleClick}
className='workflow-drag-handle relative z-[20] w-[250px] cursor-grab select-none rounded-[8px] border border-[var(--border-1)] bg-[var(--surface-2)] [&:active]:cursor-grabbing'
className={cn(
'workflow-drag-handle relative z-[20] w-[250px] cursor-grab select-none rounded-[8px] border border-[var(--border-1)] bg-[var(--surface-2)] [&:active]:cursor-grabbing'
)}
>
{isPending && (
<div className='-top-6 -translate-x-1/2 absolute left-1/2 z-10 transform rounded-t-md bg-amber-500 px-2 py-0.5 text-white text-xs'>

View File

@@ -17,6 +17,7 @@ import { ParallelOrchestrator } from '@/executor/orchestrators/parallel'
import type { BlockState, ExecutionContext, ExecutionResult } from '@/executor/types'
import {
computeDirtySet,
resolveContainerToSentinelStart,
type RunFromBlockContext,
validateRunFromBlock,
} from '@/executor/utils/run-from-block'
@@ -130,9 +131,14 @@ export class DAGExecutor {
// Compute dirty set (blocks that will be re-executed)
const dirtySet = computeDirtySet(dag, startBlockId)
// Resolve container IDs to sentinel IDs for execution
// The engine needs to start from the sentinel node, not the container ID
const effectiveStartBlockId = resolveContainerToSentinelStart(startBlockId, dag) ?? startBlockId
logger.info('Executing from block', {
workflowId,
startBlockId,
effectiveStartBlockId,
dirtySetSize: dirtySet.size,
totalBlocks: dag.nodes.size,
dirtyBlocks: Array.from(dirtySet),
@@ -162,7 +168,7 @@ export class DAGExecutor {
}
// Create context with snapshot state + runFromBlockContext
const runFromBlockContext = { startBlockId, dirtySet }
const runFromBlockContext = { startBlockId: effectiveStartBlockId, dirtySet }
const { context, state } = this.createExecutionContext(workflowId, undefined, {
snapshotState: sourceSnapshot,
runFromBlockContext,

View File

@@ -22,7 +22,7 @@ function buildParallelSentinelStartId(parallelId: string): string {
* Checks if a block ID is a loop or parallel container and returns the sentinel-start ID if so.
* Returns null if the block is not a container.
*/
function resolveContainerToSentinelStart(blockId: string, dag: DAG): string | null {
export function resolveContainerToSentinelStart(blockId: string, dag: DAG): string | null {
if (dag.loopConfigs.has(blockId)) {
return buildLoopSentinelStartId(blockId)
}

View File

@@ -21,7 +21,6 @@ export const COPILOT_MODEL_IDS = [
'claude-4.5-opus',
'claude-4.1-opus',
'gemini-3-pro',
'auto',
] as const
export type CopilotModelId = (typeof COPILOT_MODEL_IDS)[number]

View File

@@ -98,8 +98,6 @@ export interface TraceSpan {
total?: number
}
providerTiming?: ProviderTiming
/** Whether this span represents a cached (not re-executed) block in run-from-block mode */
cached?: boolean
}
export interface WorkflowLog {