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

Show Language Server Logs #9745

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Conversation

somebody1234
Copy link
Collaborator

@somebody1234 somebody1234 commented Apr 19, 2024

Pull Request Description

Important Notes

None

Testing instructions

Just make sure that:

  • the new project sessions tab works (and does not show up for non-projects)
  • logs show up as expected.

Screenshots

Project sessions list:
image

Logs modal:
image

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@somebody1234 somebody1234 added CI: No changelog needed Do not require a changelog entry for this PR. x-new-feature Type: new feature request g-dashboard labels Apr 19, 2024
}, [logsRaw])

return (
<Modal centered className="bg-dim">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use ariaComponents.Dialog type="fullscreen" here?

const { getText } = textProvider.useText()

React.useEffect(() => {
if (logsRaw instanceof Promise) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use please useQuery here fetching is useEffect is a bad practice

{getText('logs')}
</aria.Heading>
<pre className="relative overflow-auto whitespace-pre-wrap">
<code>{logs}</code>
Copy link
Contributor

Choose a reason for hiding this comment

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

Btw what's the order of the logs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's a single string here. but i the endpoint returns the logs from oldest to newest (i.e. the same orer as they would appear in a terminal)

Copy link
Contributor

Choose a reason for hiding this comment

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

can we reverse scrolling then? I think showing the oldest logs isn't what users want(often they're looking for the recent error). We can either use bottom-to-top scrolling(using col-reverse order hack in flex) or stream logs in reverse order from lambda

@MrFlashAccount
Copy link
Contributor

Small question, do we limit the amount of logs to show simultaneously?

@somebody1234
Copy link
Collaborator Author

Small question, do we limit the amount of logs to show simultaneously?

for the time being no

@MrFlashAccount
Copy link
Contributor

MrFlashAccount commented May 15, 2024

Small question, do we limit the amount of logs to show simultaneously?

for the time being no

What'll happen if a user has more than, lets say 1 000 000 entries(50mb) of logs? Are we going to process and display all of them?

@somebody1234
Copy link
Collaborator Author

@MrFlashAccount we're assuming that won't happen for the time being - we definitely want pagination and scrollback at some point, however i think it's not something we should be adding as an afterthought on a random PR

@somebody1234
Copy link
Collaborator Author

code review should be addressed - not 100% sure the dialog still works properly, but we can't test it unless the logs PR is deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. g-dashboard x-new-feature Type: new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants