Skip to content

Packet Viewer Consistency in behavior#3189

Merged
clayandgen merged 1 commit intomainfrom
packet-viewer-consistency
Apr 9, 2026
Merged

Packet Viewer Consistency in behavior#3189
clayandgen merged 1 commit intomainfrom
packet-viewer-consistency

Conversation

@clayandgen
Copy link
Copy Markdown
Contributor

closes #3185

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.34%. Comparing base (d69e69b) to head (f7ff95c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3189      +/-   ##
==========================================
- Coverage   78.36%   78.34%   -0.03%     
==========================================
  Files         674      674              
  Lines       55386    55376      -10     
  Branches      728      728              
==========================================
- Hits        43402    43383      -19     
- Misses      11906    11915       +9     
  Partials       78       78              
Flag Coverage Δ
python 79.59% <ø> (ø)
ruby-api 82.95% <ø> (-0.41%) ⬇️
ruby-backend 81.52% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

this.derivedLast = config.derivedLast || false
this.menus[1].items[1].checked = this.derivedLast
this.valueType = config.valueType || 'FORMATTED'
this.menus[1].radioGroup = valueTypeToRadioGroup[this.valueType]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These were redundant calls

})
}
}
if (target && packet) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code change is to simplify the previous logic / make it more readable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm trying to logic my way through if (!target || !packet) (line 507), if (target && packet)/else (lines 518/526)... I guess if target or packet is not defined from the route parameters and config is missing target or packet, then 507 and 526 will both be executed. If target or packet is not defined from the route parameters but config has both defined, line 511 will be true and none of the rest of this function will execute. Does this sound right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That sounds right, I'm personally not a fan of watch and there's a decent amount of complicated logic/race conditions here. This PR is planned to fix the behavior, and then sometime soon I will convert this all to Composition API, make smaller components, and reduce to amount of friction on the created hook

}
this.changeUpdater(true)
}
this.changeUpdater(true)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Putting some code inside the else to prevent unnecessary secondary calls

Copy link
Copy Markdown
Contributor

@EmilyRagan EmilyRagan left a comment

Choose a reason for hiding this comment

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

Seems to work as expected, agreed that this logic is way overcomplicated and should be simplified in the future

@clayandgen clayandgen merged commit 399b00b into main Apr 9, 2026
54 of 55 checks passed
@clayandgen clayandgen deleted the packet-viewer-consistency branch April 9, 2026 17:46
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.

Packet Viewer behavior issues

2 participants