Skip to content
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

feat: logs explorer context log line redirection #7142

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ahmadshaheer
Copy link
Collaborator

@ahmadshaheer ahmadshaheer commented Feb 18, 2025

Summary

Related Issues / PR's

close #5053

Screenshots

Before:

2025-02-18.09-30-26.mov

After:

2025-02-18.09-28-50.mov

Affected Areas and Manually Tested Areas


Important

Adds click functionality to log items in ContextLogRenderer.tsx, enabling redirection to specific log views by updating URL query parameters.

  • Behavior:
    • Adds click functionality to log items in ContextLogRenderer.tsx, redirecting to a specific log view by updating QueryParams.activeLogId.
    • Uses useSafeNavigate to handle navigation safely.
  • UI Components:
    • Wraps RawLogView in a Button in ContextLogRenderer.tsx to make logs clickable.
    • Updates CSS in ContextLogRenderer.styles.scss to style log items as clickable.
  • Imports:
    • Adds Button and QueryParams imports in ContextLogRenderer.tsx.

This description was created by Ellipsis for bf319c2. It will automatically update as commits are pushed.

@github-actions github-actions bot added enhancement New feature or request docs required labels Feb 18, 2025
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.

👍 Looks good to me! Reviewed everything up to bf319c2 in 2 minutes and 24 seconds

More details
  • Looked at 97 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 drafted comments based on config settings.
1. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:158
  • Draft comment:
    Avoid inline styles for the Skeleton component. Consider using a CSS class or styled component for consistent theming.
  • 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.
2. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:175
  • Draft comment:
    Avoid using inline styles for the Skeleton component. Use a dedicated CSS class or external stylesheet instead.
  • 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.
3. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:112
  • Draft comment:
    Ensure that wrapping logId in extra quotes is intended. Verify that QueryParams.activeLogId should be stored with quotes.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
4. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:131
  • Draft comment:
    Consider moving the key prop from the child component to the wrapping Button element to ensure proper keying in list rendering.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
5. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:112
  • Draft comment:
    Avoid wrapping logId in extra double quotes unless explicitly required. Extra quotes may lead to unexpected URL encoding issues.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 30% vs. threshold = 50%
    Double quotes in URL parameters can indeed cause encoding issues. However, without seeing how QueryParams.activeLogId is used elsewhere or understanding the URL parameter requirements, I can't be 100% sure if the quotes are actually problematic or if they're intentionally required. The comment makes a reasonable point about potential issues, but lacks strong evidence that this is definitely wrong.
    I don't have visibility into how this URL parameter is parsed or used elsewhere in the codebase. The quotes could be intentional if the receiving code expects them.
    While URL encoding issues are a valid concern, without more context about the URL parameter requirements, I can't be certain that removing the quotes is the right approach.
    Given the lack of strong evidence that the quotes are definitely problematic, and following the principle of assuming comments are not useful by default, this comment should be removed.
6. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:131
  • Draft comment:
    Consider moving the key prop from the inner RawLogView to the outer Button element so that the list items have consistent keys.
  • Reason this comment was not posted:
    Comment was on unchanged code.
7. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:170
  • Draft comment:
    Inline styles used for Virtuoso (dynamic height calculation) and Skeleton components: consider moving dynamic CSS into a styled component or CSS variable if possible to align with best practices.
  • 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.

Workflow ID: wflow_Me5o7TeHrmlNHoJg


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

👍 Looks good to me! Incremental review on 49c82d2 in 34 seconds

More details
  • Looked at 38 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:16
  • Draft comment:
    Removed safeNavigate in favor of manual window.open. Confirm that using window.open preserves navigation behavior and meets accessibility/security standards.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
2. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:115
  • Draft comment:
    Ensure the URL query parameters are encoded properly when constructing the link.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
3. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:111
  • Draft comment:
    Good change: replacing safeNavigate with window.open meets the requirement for opening the explorer page in a new tab while using 'noopener,noreferrer' for security. Ensure that urlQuery.toString() properly encodes parameters.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
4. frontend/src/container/LogDetailedView/ContextView/ContextLogRenderer.tsx:119
  • Draft comment:
    Ensure urlQuery is a stable dependency; if its reference changes frequently, it may trigger unnecessary re-renders.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None

Workflow ID: wflow_t5cs5GOyZe9Q1dJw


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ahmadshaheer
Copy link
Collaborator Author

currently redirecting to the log line won't work properly. we can review/merge this PR after #7109 gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs required enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LOGS[FE]: Logs context in the explorer page
1 participant