Repository navigation
fix: truncate long node names in workflow execution details #8298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+5
−5
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's my review of the diff:
Observations
1.
data.name— inconsistent optional chaining{{ data.name }},:title="data.name", anddata?.run_time(with?.). Ifdatacan be undefined,data.namewill throw. Make it consistent: usedata?.name(and:title="data?.name"), or ensuredatais always defined via a prop validator/required: true.2. Truncation requires both parent and element to shrink
min-w-0on both containers andshrink-0on the icon/suffix — good.<h6 class="truncate">needsmin-w-0too (oroverflow: hidden) in some flex layouts. Tailwind'struncateincludesoverflow-hidden; text-overflow: ellipsis; white-space: nowrap, but ifh6is itself a flex item inside.flex-align-center, addingmin-w-0explicitly to it is safer.3. Layout structure mismatch
flex-between(presumablyjustify-content: space-between), and you addedgap-2. Withjustify-content: space-betweenthe gap has no effect when the two children fill the width, and truncation works because the left group shrinks. Consider usingjustify-between+min-w-0is fine, but double-check the.flex-betweenutility doesn't also setalign-itemsincorrectly for your icon alignment.4.
:size="24"vsclass="shrink-0"componentforwardsclassandsizeto its root element (Vue fallthrough). IfnodeIconComponentis a fragment or doesn'tinheritAttrs,shrink-0may be dropped silently.5. Accessibility
:title="data.name"gives a native tooltip, which is acceptable, but consider a real tooltip component for keyboard/touch accessibility. Also addaria-labelif the truncated text is critical.6. Unchanged line — potential issue
<span v-if="!isRunning">{{ data?.run_time?.toFixed(2) || '0.00' }} s</span>—toFixedreturns a string like"0.00", which is truthy, so|| '0.00'only triggers whentoFixedis skipped (undefined/null run_time). That's fine, but0→"0.00"is also truthy, so behavior is correct. No change needed, just confirming intent.7.
tokenCount(context)(props.data?.message_tokens || 0) + ...— using||vs??is harmless for numbers here; but if a token value could legitimately be0, both behave the same. Prefer?? 0for clarity/consistency.Suggested refined snippet
Summary
The changes are directionally correct for handling long names via truncation. Main fixes: (a) consistent optional chaining on
data, (b) ensuremin-w-0on the<h6>itself, (c) verifyclassfallthrough on the dynamic component.