Skip to content

feat(logs): open the workflow from the log details panel - #6275

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/logs-open-workflow-from-details
Aug 5, 2026
Merged

feat(logs): open the workflow from the log details panel#6275
waleedlatif1 merged 3 commits into
stagingfrom
improvement/logs-open-workflow-from-details

Conversation

@mzxchandra

Copy link
Copy Markdown
Contributor

Summary

The workflow name in a log's details panel was static text. The only way to get from a log to its workflow was the row's right-click context menu, which is undiscoverable and unavailable once the details panel is what you're looking at.

The label is now a link to the workflow editor. It opens in a new tab so the log list keeps its filters, scroll position, and open panel.

On hover or keyboard focus, the leading workflow icon morphs into SquareArrowUpRight. That cross-fade is not new: it reuses the grid-stacked opacity/scale/blur technique already used by the resource header breadcrumb (resource-header.tsx:468-473), so the two morphs in the app behave identically.

Because LogDetailsContent is shared, this lands in all three places it renders: the logs sidebar, the Chat resource panel, and the tables view.

Not clickable when there is nowhere to go: Sim agent jobs (no workflow of their own) and deleted workflows both keep the existing static text.

Second commit is a refactor

The logs list, its context menu, and the details panel each had their own copy of workflow?.id || workflowId, and the list and the panel disagreed on what counts as a deleted workflow. resolveLogWorkflowId and workflowEditorPath in logs/utils.ts are now the single source of truth.

That helper also returns null for Sim agent jobs. Only the context menu's "Open Workflow" item adopts the stricter predicate; cancel and retry keep the previous hasWorkflow check so their gating is unchanged.

Type of Change

  • New feature
  • Other: small refactor to remove duplicated workflow-id resolution

Testing

Verified end to end in a local dev instance against a real execution log, driving the browser rather than eyeballing the diff:

  • Rendered element is a real <a> with href=/workspace/<ws>/w/<wf>, target="_blank", rel="noopener noreferrer", accessible name default-agent (opens in a new tab).
  • Icon morph measured mid-transition (opacity 0.76 / 0.24, blur interpolating), settling at workflow-icon 0 opacity and arrow at full 14px. The label's x-position is 1037.5 at rest, mid-transition, and settled — the fixed-size grid wrapper means the text never shifts.
  • Keyboard focus produces the same morph plus a 2px focus ring, verified via computed box-shadow.
  • Light and dark mode both check out (all themed tokens resolve).

Automated:

  • New unit tests at logs/utils.test.ts cover all branches of resolveLogWorkflowId (nested id, workflowId fallback, precedence, Sim agent job, deleted workflow, empty strings, missing trigger) and workflowEditorPath — 8 tests, passing.
  • bun run type-check: 0 errors.
  • biome check: clean.

Reviewers should focus on

  • The group-hover-hover Tailwind variant (tailwind.config.ts). New and additive, mirroring the existing hover-hover. It gates the icon morph on a genuinely hover-capable pointer so touch devices don't land in a half-applied hover state (background tinted by hover-hover, icons swapped by a bare group-hover). Nothing else uses it yet.
  • The context menu predicate split (log-row-context-menu.tsx). Deliberately surgical: only "Open Workflow" moved to the stricter check. Worth a second opinion on whether cancel/retry should follow.

Known, not introduced here

The full vitest suite has load-sensitive flaky tests unrelated to this change: tools/params.test.ts, lib/knowledge/connectors/sync-engine.test.ts, and files/.../markdown-parse.test.ts time out under full parallel load but pass in isolation (138/138 in 14s). They fail on this branch and on staging alike; nothing in this diff touches them.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

At rest, the label looks exactly as it does today. On hover it gains a background tint and the icon becomes an outbound arrow; on keyboard focus it additionally gains a focus ring.

State Icon Extras
Rest workflow glyph none — visually unchanged from today
Hover outbound arrow background tint, label brightens
Focus outbound arrow background tint + 2px focus ring

The logs list, its context menu, and the details panel each resolved a
log's workflow id with their own copy of `workflow?.id || workflowId`,
and the list disagreed with the details panel on what counts as a
deleted workflow. Extract `resolveLogWorkflowId` and
`workflowEditorPath` so the three surfaces cannot drift.

`resolveLogWorkflowId` also returns null for Sim agent jobs, which have
no workflow of their own. Only the context menu's "Open Workflow" item
adopts that stricter predicate; cancel and retry keep using the previous
`hasWorkflow` check so their gating is unchanged.
The workflow name in a log's details panel was static text, so the only
way to reach the workflow was the row's right-click context menu. Make
the label a link to the workflow editor, opening in a new tab so the
log list keeps its filters, scroll position, and open panel.

On hover or keyboard focus the leading workflow icon morphs into
SquareArrowUpRight, reusing the grid-stacked cross-fade already used by
the resource header breadcrumb. Sim agent jobs and deleted workflows
have no reachable workflow and stay static text.

Adds a `group-hover-hover` variant so the morph is gated on a real
hover-capable pointer, matching the existing `hover-hover` variant and
keeping touch devices out of a half-applied hover state.
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 5, 2026 4:27am

Request Review

@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Summary

Cursor Bugbot is generating a summary for commit 83ea4df. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes workflow names in log details open the corresponding workflow editor in a new tab and centralizes workflow-target resolution.

  • Adds an accessible linked workflow label with hover and focus icon transitions.
  • Reuses workflow resolution and editor-path helpers across details, list, and context-menu behavior.
  • Adds a hover-capability-aware Tailwind group variant and focused utility tests.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code failure identified.

Workflow navigation is consistently gated on a resolved target, the generated editor path matches existing workspace routing, and the new Tailwind variant is supported by the installed configuration.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx Adds the new-tab workflow link, accessible label, static fallback, and hover/focus icon transition without an identified defect.
apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx Restricts Open Workflow availability to logs with a navigable workflow while preserving cancel and retry gating.
apps/sim/app/workspace/[workspaceId]/logs/logs.tsx Routes context-menu workflow navigation through the shared resolution and path helpers.
apps/sim/app/workspace/[workspaceId]/logs/utils.ts Introduces centralized workflow-target resolution and workspace-scoped editor-path construction.
apps/sim/app/workspace/[workspaceId]/logs/utils.test.ts Covers workflow-ID precedence, fallback, excluded jobs, missing IDs, and editor-path generation.
apps/sim/tailwind.config.ts Adds a valid hover-capability-gated group variant used by the workflow-link transition.

Reviews (1): Last reviewed commit: "feat(logs): open the workflow from the l..." | Re-trigger Greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@waleedlatif1

@waleedlatif1

Copy link
Copy Markdown
Collaborator

@mzxchandra can you include a video

… link

Drops the group-hover-hover Tailwind variant this branch added and moves
the details-panel workflow link to plain group-hover:, matching the
variant already used throughout the app. tailwind.config.ts is untouched
by the branch again; all colors, radii, and the focus ring come from
existing design tokens.
@waleedlatif1
waleedlatif1 merged commit 5718def into staging Aug 5, 2026
29 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/logs-open-workflow-from-details branch August 5, 2026 05:27
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