Skip to content

feat: add a button to clear logs in the pod logs viewer#27149

Open
gcadoret wants to merge 1 commit into
argoproj:masterfrom
gcadoret:feature/add-clear-button-on-pod-log-viewer
Open

feat: add a button to clear logs in the pod logs viewer#27149
gcadoret wants to merge 1 commit into
argoproj:masterfrom
gcadoret:feature/add-clear-button-on-pod-log-viewer

Conversation

@gcadoret
Copy link
Copy Markdown

@gcadoret gcadoret commented Apr 3, 2026

Description

This PR introduces a small UX improvement to the pod logs viewer by adding a "Clear logs" button.

Currently, users need to refresh or navigate away to reset the displayed logs. This change provides a quick and intuitive way to clear the log output directly from the UI, which improves usability when working with noisy or continuously updating logs.

Scope

  • UI-only change (no backend or API impact)
  • Does not modify existing log fetching or filtering logic
  • Adds unit test coverage for the new behavior

Motivation

When debugging applications, logs can quickly become cluttered. Providing a clear action helps users focus on new incoming logs without extra navigation steps.


Checklist

  • This does not need to be in the release notes (small UX improvement)
  • The title of the PR is clear and follows the guidelines
  • Closes [ISSUE #] (not applicable)
  • UI updated (CLI not impacted)
  • Documentation update required? (not required)
  • Documentation updated (not required)
  • DCO sign-off added to commits
  • Unit and/or e2e tests added
  • Build is green
  • This PR includes a clear explanation of the change

@gcadoret gcadoret requested a review from a team as a code owner April 3, 2026 19:51
@bunnyshell
Copy link
Copy Markdown

bunnyshell Bot commented Apr 3, 2026

❌ Preview Environment undeployed from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch 6 times, most recently from 8812d5c to 32762a8 Compare April 8, 2026 21:56
@gcadoret
Copy link
Copy Markdown
Author

gcadoret commented Apr 9, 2026

Friendly ping: this PR is ready for review. All checks are passing, and I’d appreciate feedback from a code owner when you have a moment. Thanks!

@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch 4 times, most recently from 0740491 to b160cb3 Compare April 14, 2026 20:46
@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch 2 times, most recently from b1e3b30 to ead3204 Compare April 19, 2026 13:58
@Qodo-Free-For-OSS
Copy link
Copy Markdown

Hi, The unit test mocks the shared Button as a native <button disabled>, so it will pass even if the real Button ignores disabled, hiding the production bug.

Severity: action required | Category: reliability

How to fix: Align mock with real Button

Agent prompt to fix - you can give this to your LLM of choice:

Issue description

The test double for Button behaves differently from the real component, so it can’t catch bugs related to disabled semantics.

Issue Context

The mock currently forwards disabled to a native <button>, while the real Button doesn’t.

Fix Focus Areas

  • ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.test.tsx[41-46]
  • ui/src/app/shared/components/button.tsx[6-36]

What to change

  • Prefer fixing Button to correctly forward disabled (see other finding).
  • Then update the test mock to match the real Button behavior (or, better, don’t mock Button at all if feasible).
  • Add an assertion that clicking the clear button when disabled does not invoke onClear (i.e., simulate click and ensure logs remain unchanged).

Qodo code review - free for open-source.

@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch 2 times, most recently from 329b102 to 8d92b30 Compare April 21, 2026 08:04
@gcadoret
Copy link
Copy Markdown
Author

/review

@gvago
Copy link
Copy Markdown

gvago commented Apr 21, 2026

Hey @gcadoret,

Qodo FOSS is not yet installed in argo.
One of the mainteners needs to add it.
But FYI, once installed, qodo is automatically triggered and the correct manual trigger (if needed) is "/agentic_review"

Cheers
Vago

@gcadoret
Copy link
Copy Markdown
Author

gcadoret commented Apr 21, 2026

@gvago

ok thanks you !

Cheers
Guillaume

@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch 9 times, most recently from 40bd7f7 to 93016e6 Compare April 24, 2026 17:56
@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch 4 times, most recently from 42d1db7 to 4b429fb Compare April 30, 2026 08:52
@gcadoret
Copy link
Copy Markdown
Author

Hello @gvago
Are you a code reviewer ? Could you please take a look on it ?
Thanks in advance !
Cheers,

@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch 4 times, most recently from 0e802e4 to dc7e53d Compare May 5, 2026 11:41
@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch from dc7e53d to 21246ff Compare May 8, 2026 13:59
@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch from 21246ff to 881a640 Compare May 18, 2026 13:14
@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch from 881a640 to 4a20524 Compare May 25, 2026 17:34
@gcadoret gcadoret requested a review from a team as a code owner May 25, 2026 17:34
Signed-off-by: Guillaume Cadoret <guillaume.cadoret@pluxeegroup.com>
Signed-off-by: Guillaume Cadoret <gcadoret@gmail.com>
@gcadoret gcadoret force-pushed the feature/add-clear-button-on-pod-log-viewer branch from 4a20524 to b9d36f9 Compare May 28, 2026 15:28
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.

3 participants