Uh oh!
There was an error while loading. Please reload this page.
feat(logs): open the workflow from the log details panel - #6275
Conversation
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.
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryCursor Bugbot is generating a summary for commit 83ea4df. Configure here. |
Greptile SummaryThe PR makes workflow names in log details open the corresponding workflow editor in a new tab and centralizes workflow-target resolution.
Confidence Score: 5/5The 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.
|
| 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
commented
Aug 5, 2026
waleedlatif1
commented
Aug 5, 2026
@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.
Uh oh!
There was an error while loading. Please reload this page.
Conflict resolutions of substance: - files serve + public-share content routes: kept the branch's byte-range media streaming and added staging's `ServeOptions` / `preview=1` HEIC derivative path. The two are disjoint (`isMediaContentType` is audio/video only), so both branches now coexist ahead of the buffered compile path. - `hooks/use-file-content-source.tsx` is deleted on this branch; staging's additions to it (the `preview` URL flag and the `ImageDimensionsSource` capability) moved to `resources/file-source.ts`, and the workspace adapter now resolves from the mounted source rather than a second React context. - `UnsupportedPreview`: the branch's download-carrying variant replaces the moved copy in `preview-shared`, so the image preview's new decode-failure fallback lands on the version that works on chrome-less hosts. - logs: staging's workflow deep-link (#6275) ported into `LogView` through a new `resources/log-source.ts`, so the unit reads the href off its source instead of hand-building a workspace path. - `public-file-view`: kept the branch's `Navbar` + `h-dvh` scroll port, which supersedes staging's header layout fix on the header it replaced. - `test-build.yml`: took staging's single `check:audits` step; `run-audits.ts` derives the list from package.json, so `check:resources` is picked up. - API route baseline raised to the merged tree's real count (1008).
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
LogDetailsContentis 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.resolveLogWorkflowIdandworkflowEditorPathinlogs/utils.tsare 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
hasWorkflowcheck so their gating is unchanged.Type of Change
Testing
Verified end to end in a local dev instance against a real execution log, driving the browser rather than eyeballing the diff:
<a>withhref=/workspace/<ws>/w/<wf>,target="_blank",rel="noopener noreferrer", accessible namedefault-agent (opens in a new tab).box-shadow.Automated:
logs/utils.test.tscover all branches ofresolveLogWorkflowId(nested id,workflowIdfallback, precedence, Sim agent job, deleted workflow, empty strings, missing trigger) andworkflowEditorPath— 8 tests, passing.bun run type-check: 0 errors.biome check: clean.Reviewers should focus on
group-hover-hoverTailwind variant (tailwind.config.ts). New and additive, mirroring the existinghover-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 byhover-hover, icons swapped by a baregroup-hover). Nothing else uses it yet.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, andfiles/.../markdown-parse.test.tstime 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
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.