Skip to content

feat(#4342) logfile view - chunk navigation#5390

Open
vetri15 wants to merge 13 commits into
codecentric:masterfrom
vetri15:issue-4342-logile-view
Open

feat(#4342) logfile view - chunk navigation#5390
vetri15 wants to merge 13 commits into
codecentric:masterfrom
vetri15:issue-4342-logile-view

Conversation

@vetri15
Copy link
Copy Markdown

@vetri15 vetri15 commented May 24, 2026

Implemented logfile chunk navigation and recovery improvements.

  • Added previous/next chunk navigation
  • Show skipped and remaining byte counts
  • Render only complete log lines across chunk boundaries
  • Automatically reset and resume follow mode after logfile compression
  • Improved tail-follow scroll behavior and manual chunk navigation

vetri15 added 5 commits May 3, 2026 01:15
Add byte-range logfile chunk navigation for skipped content, with a compact follow/page up/page down toolbar that switches between live tailing and manual browsing. Also parse logfile window metadata, show skipped bytes for manual chunks, and add localized navigation labels.
Added previous/next chunk navigation
Show skipped and remaining byte counts
Render only complete log lines across chunk boundaries
Automatically reset and resume follow mode after logfile compression
Improved tail-follow scroll behavior and manual chunk navigation
@vetri15 vetri15 marked this pull request as ready for review May 24, 2026 09:58
@vetri15 vetri15 requested a review from a team as a code owner May 24, 2026 09:58
@vetri15
Copy link
Copy Markdown
Author

vetri15 commented May 24, 2026

Hi @cdprete,

I created a new PR for issue #4342, as I realized my previous approach would not be sufficient to implement this feature cleanly.

I think the previous PR(#5326) can be closed. Could you please review the new PR and let me know if any further changes are needed?

It took longer than I initially expected because of the edge cases involved.

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 24, 2026

Hi @vetri15.

You can close the old PR yourself if you think the new one supersedes it.

Could you please review the new PR and let me know if any further changes are needed?

I try to do it asap.

It took longer than I initially expected because of the edge cases involved.

No worries.

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 24, 2026

@SteKoe @erikpetzold @ulischulte @hzpz can you maybe allow the pipeline to run in the meantime so that we make sure there are no potential issues? Tnx

@vetri15
Copy link
Copy Markdown
Author

vetri15 commented May 24, 2026

Yeah, you were right @cdprete.

I have closed the old PR.

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 24, 2026

By the way, please be aware that there are issues with empty lines.
I don't know if your PR already covers it somehow, but for details have a look at #5388.

@vetri15 vetri15 changed the title Issue 4342 logile view feat(#4342) logfile view - chunk navigation May 24, 2026
@vetri15
Copy link
Copy Markdown
Author

vetri15 commented May 24, 2026

Hi @cdprete,

Thanks for pointing this out. I checked #5388 and updated this PR to handle empty log lines in the logfile view as well.

Empty strings are now rendered as <br> instead of an empty <pre>, so blank lines from the log file are preserved visually. I also brought over the related logfile styling from #5388 for tr, td, br, pre, and logfile links.

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 25, 2026

Hi @cdprete,

Thanks for pointing this out. I checked #5388 and updated this PR to handle empty log lines in the logfile view as well.

Empty strings are now rendered as <br> instead of an empty \<pre\>, so blank lines from the log file are preserved visually. I also brought over the related logfile styling from #5388 for tr, td, br, pre, and logfile links.

Hi @vetri15.

I just wanted to inform you I updated the styles in my PR as follows:

  • removed w-full from pre and br since on tr and td is already enough
  • changed the on-hover target from pre to td to respect also the empty new lines, but it seems like it's already working on your branch as it should

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 25, 2026

I tested this a bit and discovered the following bugs/issues:

  • the first line in the log file is lost:
image vs image even if it's actually returned by the call image
  • with the tailing disabled, entering the manual navigation mode requires to press the down arrow twice but, for some reason, if then the up arrow is pressed ('cause I want to check the previous chunk for example), it's again required to press the down arrow twice to properly navigate the content
  • the manual navigation puts the scrollbar at the bottom by default, while ideally should be at the top 'cause you want to read the current chunk top to bottom and not have to scroll with scrollbar to the top then to read it. Especially because it jumps over quite some lines
  • no errors are shown anymore, while they're there in the console. While this may be wanted for some specific errors (e.g.: 416), even errors like "Connection Refused" are not shown anymore, therefore someone presses the arrows but nothing really happens. To simulate this, just stop the backend server.
  • On server reboot it appears and the UI doesn't really recover from it unless it's manually reloaded, even if the server is up in the meantime:
image
  • As soon as the manual navigation renders some remaining lines on, let's say, a new page (so not a continuation of the current one) the styles are broken. No scrollbars, no w-full and so on:
image
  • I think there may be some issues on how the ranges are calculated. Even by using the previous follow/tail mode, there are now way more 416 in the console:
image
  • The tooltip on the follow/tail button always says "Resume following" which is wrong if such a mode is already active

@vetri15
Copy link
Copy Markdown
Author

vetri15 commented May 25, 2026

Hi @cdprete , I have summarized the issues you mentioned before. have corrected most of them. need your input on the remaining ones.

bugs/issues comments status
the first line in the log file is not shown none
manual navigation mode taking two clicks to navigate none
the manual navigation puts the scrollbar at the bottom by default I was not able to replicate it , however my suspicion was when switching from follow mode to manual mode , the $nextTick(() => this.scrollToBottom();) from follow mode is spilling over to manual mode for one tick, so I added a guard check. I hope this is solved , if not please let me know
all errors were suppressed none
on server reboot it appears and the UI doesn't really recover from it unless it's manually reloaded Need some help replicating this scenario , I am testing this on a random springboot where if i stop and start an application it will start with a new instance Id. after doing some research, even in cloud environments only some carry the meta data like instance Ids when restarting. need your input on how to tackle this.
manual navigation renders some remaining lines with broken style I am not able to understand clearly , in manual mode we are traversing either previous or next chunk so either way it would be a continuation. correct me if my understanding is wrong
416 error message spam on console I am not able to replicate it , however while it might be cause. I did not handle the logfile compression in the ManualMetadataPolling , I have corrected it so the 416 error spam should be gone.
tool tip not showing proper label when in follow mode Have added a i18n label - "stop following" which would be seen when in follow mode.

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 25, 2026

Hi @vetri15.

I was not able to replicate it , however my suspicion was when switching from follow mode to manual mode , the $nextTick(() => this.scrollToBottom();) from follow mode is spilling over to manual mode for one tick, so I added a guard check. I hope this is solved , if not please let me know

I'll give it a new try as soon as I've some more time and I let you know.

Need some help replicating this scenario , I am testing this on a random springboot where if i stop and start an application it will start with a new instance Id. after doing some research, even in cloud environments only some carry the meta data like instance Ids when restarting. need your input on how to tackle this.

I'm using the servlet sample which is already part of the project. Maybe it helps.

I am not able to understand clearly , in manual mode we are traversing either previous or next chunk so either way it would be a continuation. correct me if my understanding is wrong

Yes and no. I mean, if "remaining" is not 0, you're now fetching it and rendering it.
As soon as this is the case, as it can be seen in the screenshot above, instead of rendering it as a continuation the new lines get somehow rendered as a new page and the styles are broken.

I am not able to replicate it , however while it might be cause. I did not handle the logfile compression in the ManualMetadataPolling , I have corrected it so the 416 error spam should be gone.

I'll give it a new try as soon as I've some more time and I let you know.

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