Skip to content

Span view #629

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
merged 6 commits into from
Jun 13, 2025
Merged

Span view #629

merged 6 commits into from
Jun 13, 2025

Conversation

skull8888888
Copy link
Collaborator

@skull8888888 skull8888888 commented Jun 12, 2025

Important

Enhance span and trace views with new color variables, refactor stats shields, and improve UI layout.

  • Behavior:
    • Introduced new color variables --tool, --llm, and --llm-foreground in globals.css for styling enhancements.
    • Updated ProgressionChart in progression-chart.tsx to use flex-wrap for better layout handling.
    • Refactored SpanStatsShields and TraceStatsShields in stats-shields.tsx to simplify props and improve functionality.
  • Components:
    • Renamed StatsShields to SpanStatsShields and TraceStatsShields in span-view.tsx, trace-view.tsx, and trace.tsx.
    • Added ToolsList and extractToolsFromAttributes in stats-shields.tsx to handle tool extraction and display.
  • Styles:
    • Updated tailwind.config.js to include new color variables for tool and llm.
    • Adjusted SPAN_TYPE_TO_COLOR in utils.ts to use new llm color variable.

This description was created by Ellipsis for 695110d. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 98c9e97 in 1 minute and 39 seconds. Click for details.
  • Reviewed 405 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 10 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/app/globals.css:82
  • Draft comment:
    New CSS custom properties (--tool, --llm, --llm-foreground) are added for theming. Consider adding inline comments documenting their intended usage for maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. frontend/components/traces/span-view.tsx:69
  • Draft comment:
    The early return for spans with a 'gen_ai.prompt.user' attribute bypasses the usual span view. Confirm that this behavior is intentional for all cases.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
3. frontend/components/traces/span-view.tsx:109
  • Draft comment:
    Refactored usage of StatsShields to SpanStatsShields by passing the complete attributes, which centralizes token and cost calculation. Ensure that the data shape of attributes is consistent.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. frontend/components/traces/stats-shields.tsx:44
  • Draft comment:
    ToolsComponent renders a dropdown of tools. Consider reviewing accessibility attributes (e.g., ARIA labels) to ensure it meets standards.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. frontend/components/traces/stats-shields.tsx:94
  • Draft comment:
    The regex in extractToolsFromAttributes depends on keys matching 'llm.request.functions.{index}.name'. Verify that the attribute keys always adhere to this naming convention.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
6. frontend/components/traces/stats-shields.tsx:229
  • Draft comment:
    SpanStatsShields computes token counts and costs using nullish coalescing. It would be good to ensure that the attribute values are always numeric or handle unexpected types.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
7. frontend/tailwind.config.js:67
  • Draft comment:
    New color definitions for 'tool' and 'llm' have been added. Confirm that these values align with the design requirements.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
8. frontend/lib/traces/utils.ts:7
  • Draft comment:
    The LLM color mapping is now using hsl(var(--llm)). Ensure that the '--llm' variable is correctly defined in the CSS for consistent theming.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
9. frontend/components/traces/trace-view/header.tsx:87
  • Draft comment:
    TraceStatsShields is now used in the header, replacing the older StatsShields. This update improves consistency; ensure the sticky positioning works as expected in different viewports.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
10. frontend/components/traces/trace.tsx:26
  • Draft comment:
    Trace view now utilizes TraceStatsShields. The refactoring appears sound; double-check that all trace attributes needed for token and cost display are present.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_Njq37MHpdZCLU74N

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed b67d15c in 2 minutes and 28 seconds. Click for details.
  • Reviewed 357 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/components/shared/traces/trace-view.tsx:16
  • Draft comment:
    Verify that the new TraceStatsShields component’s import and usage matches its updated prop signature.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify something, which violates the rule against asking for confirmation or verification. It does not provide a specific suggestion or point out a specific issue with the code.
2. frontend/components/traces/stats-shields.tsx:83
  • Draft comment:
    Ensure the regex in extractToolsFromAttributes covers all expected function attribute naming patterns.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the author to ensure that the regex covers all expected patterns, which is a form of asking for confirmation or verification. This violates the rule against asking the author to ensure behavior is intended or to double-check things.
3. frontend/components/traces/span-view.tsx:38
  • Draft comment:
    Consider handling error states from the SWR fetches for span and events to improve resiliency.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. frontend/components/traces/span-view.tsx:44
  • Draft comment:
    Check for navigator.clipboard availability before calling writeText to avoid runtime errors in non-secure contexts.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. frontend/components/traces/trace-view/header.tsx:67
  • Draft comment:
    Review the use of passHref on the Link component; in Next.js 13 it may be unnecessary if the child forwards its ref.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. frontend/components/traces/trace.tsx:39
  • Draft comment:
    Ensure that the traceViewRef methods (e.g. toggleBrowserSession) are implemented and correctly typed in TraceViewHandle.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. frontend/components/traces/stats-shields.tsx:160
  • Draft comment:
    Consider providing a fallback display (e.g. '0.00000') when cost values are null to ensure consistent formatting.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
8. frontend/components/shared/traces/trace-view.tsx:100
  • Draft comment:
    If searchParams can change over time, consider adding it to the dependency array of the useEffect that sets the initial span.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. frontend/components/traces/stats-shields.tsx:46
  • Draft comment:
    Consider adding an accessible aria-label to the ToolsList trigger button to improve usability for assistive technologies.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The button already has meaningful text content ("X tools") and icons. Screen readers will read this text content. An aria-label would actually override this existing accessible text. The button's purpose is already clear from its content. Additionally, this is a UI-focused suggestion rather than a logic issue. The comment comes from a good place of wanting to improve accessibility. Maybe there's some specific accessibility guideline about dropdown triggers that I'm not aware of? Even if there are specific dropdown accessibility guidelines, the existing text content already makes the button's purpose clear. Adding an aria-label would be redundant or potentially worse by overriding the existing accessible text. Delete this comment. The button is already accessible through its text content, and adding an aria-label could actually reduce accessibility by overriding the existing text.

Workflow ID: wflow_5DotGNLGYnW0OG7W

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 8533415 in 35 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/components/evaluations/progression-chart.tsx:133
  • Draft comment:
    The addition of 'flex-wrap' ensures that label items can wrap when there isn’t enough horizontal space. Please verify that this behavior aligns with the intended UI design and that wrapping does not affect the clickable areas or overall alignment in unexpected ways.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_TrCwm24FnY1Z3xnI

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed bc433a1 in 1 minute and 50 seconds. Click for details.
  • Reviewed 85 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/components/traces/span-view.tsx:101
  • Draft comment:
    Updated Playground button styling: Icon size reduced (16→14), margin shortened (mr-2→mr-1), and added text-xs and h-6 classes. Confirm these visual adjustments align with the design guidelines.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. frontend/components/traces/stats-shields.tsx:48
  • Draft comment:
    Updated dropdown button styling: Added 'h-6' and removed 'p-1' (using 'px-2' only). Verify that these spacing adjustments are consistent with other UI components.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. frontend/components/traces/stats-shields.tsx:137
  • Draft comment:
    The InfoIcon has been removed from the token count shield. Confirm that its removal was intentional for a cleaner look.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. frontend/components/traces/stats-shields.tsx:159
  • Draft comment:
    The cost label now displays cost?.toFixed(3) while the tooltip shows cost?.toFixed(5). This inconsistency in decimal precision might confuse users—confirm if this is intended.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. frontend/components/traces/stats-shields.tsx:233
  • Draft comment:
    Simplified model label markup: now directly using a with 'h-6 flex items-center' classes. This appears to improve alignment—please ensure it meets the overall design consistency.
  • Reason this comment was not posted:
    Confidence changes required: 20% <= threshold 50% None
6. frontend/lib/utils.ts:266
  • Draft comment:
    The pluralize function now prepends the count to the noun (e.g., returns '1 tool' instead of just 'tool'). Verify that this behavioral change does not break existing usage.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify that a behavioral change does not break existing usage, which is against the rules. It does not provide a specific suggestion or ask for a specific test to be written. Therefore, it should be removed.

Workflow ID: wflow_pBUAGAippOlAPJ71

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@skull8888888 skull8888888 merged commit d037e19 into dev Jun 13, 2025
3 checks passed
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 695110d in 59 seconds. Click for details.
  • Reviewed 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/components/traces/stats-shields.tsx:3
  • Draft comment:
    Remove unused 'InfoIcon' import from lucide-react. It isn’t used in this file, so its removal improves readability.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_WdVhSTR7vuqWIumH

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@skull8888888 skull8888888 deleted the span-view branch June 13, 2025 15:40
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