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

fix: Log search feedbacks #10088

Merged
merged 3 commits into from
Oct 22, 2024
Merged

fix: Log search feedbacks #10088

merged 3 commits into from
Oct 22, 2024

Conversation

gt2345
Copy link
Contributor

@gt2345 gt2345 commented Oct 21, 2024

Ticket

MD-529

Description

Address comments from log search bug bash.

Test Plan

  • Search pane and log pane have the same font size.
  • Search and click the last line of log, the log viewer window should be able to scroll to that location.
  • Holding the backspace to erase search text should work as expected.
  • Select a log that's right after a very long log (experiment config), when closing the search pane, the selected log should still be positioned at the top. (This only happens for the first time when user close the search pane).
  • When regex is not enabled, the search should be case-insensitive.
  • Search for something and change filters such as agent id or container id, both search pane and log pane should update accordingly.

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@gt2345 gt2345 requested a review from a team as a code owner October 21, 2024 16:23
@cla-bot cla-bot bot added the cla-signed label Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 4.16667% with 23 lines in your changes missing coverage. Please review.

Project coverage is 50.39%. Comparing base (b155332) to head (d326014).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
.../react/src/pages/TrialDetails/TrialDetailsLogs.tsx 0.00% 16 Missing ⚠️
webui/react/src/pages/TrialDetails/LogViewer.tsx 12.50% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10088      +/-   ##
==========================================
- Coverage   54.39%   50.39%   -4.01%     
==========================================
  Files        1267      957     -310     
  Lines      159323   130590   -28733     
  Branches     3632     3631       -1     
==========================================
- Hits        86670    65815   -20855     
+ Misses      72519    64641    -7878     
  Partials      134      134              
Flag Coverage Δ
harness ?
web 53.93% <4.16%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
webui/react/src/pages/TrialDetails/LogViewer.tsx 17.37% <12.50%> (-0.05%) ⬇️
.../react/src/pages/TrialDetails/TrialDetailsLogs.tsx 11.11% <0.00%> (-0.11%) ⬇️

... and 310 files with indirect coverage changes

Copy link

netlify bot commented Oct 21, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit d326014
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6717f9ef8ae759000802c1d6
😎 Deploy Preview https://deploy-preview-10088--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@jgongd jgongd left a comment

Choose a reason for hiding this comment

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

Nice, work as expected!

Copy link
Contributor

@EmilyBonar EmilyBonar 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!

Comment on lines 484 to 490
onClick={() => {
setSearchOn((prev) => !prev);
searchOn && setLogViewerOn(true);
searchOn &&
selectedLog &&
setScrollToIndex(logs.findIndex((l) => l.id === selectedLog.id));
}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this should be extracted out into a named function

@@ -92,6 +93,9 @@ const TrialDetailsLogs: React.FC<Props> = ({ experiment, trial }: Props) => {

useEffect(() => {
settings.searchText?.length && setSearchOn(true);
setSearchInput((prev) =>
prev === (settings.searchText || '') ? prev : settings.searchText || '',
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit: I think this could be slightly simplified to (prev === settings.searchText ? prev : settings.searchText) ?? ''

@gt2345 gt2345 merged commit 935fa66 into main Oct 22, 2024
82 of 94 checks passed
@gt2345 gt2345 deleted the gt/529-log-search-feedbacks branch October 22, 2024 20:00
@gt2345 gt2345 changed the title fix: Log searche feedbacks fix: Log search feedbacks Oct 22, 2024
gt2345 added a commit that referenced this pull request Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants