Conversation
…ting No behaviour change: every view render-test screen and every API body the server tests fetch are byte-identical before and after (timestamps normalized), except the order of an application's workloads in AppView, now problems first like everywhere else (the view sorts them anyway). - Sort knows its next order, label, sorted column and comparison; the memory sort is no longer wired into six places. - skym_core::fixtures gains app, workload, host_overview and incident: tests set only what they assert on, so a new field needs no test edits. Server integration tests share down() and app_config() in tests/common. - The view's formatting (times, sizes, rates, CPU, a URL's answer) lives in ui/format.rs. - The server builds a workload summary in one place and reuses an app's workloads for AppView; app links come from links(). - App::apps_iter, app_summary and host_summary replace repeated lookups; the filter's text for an application lives in filter.rs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A behaviour-preserving clean-up before container CPU (iteration 2). A structural review of
mainfound no correctness issues. It did find duplication and hard-coded branches that iteration 2 would multiply.What changes
Sortnext,label,column(which header gets▼) andorder. The memory sort was spread over six== Sort::Memorychecks; with this, adding CPU means one variant plus its match arms.skym_core::fixtures::{app, workload, host_overview, incident}are built from minimal JSON, with serde defaults for the rest. Tests set only what they assert on (AppSummary { status: Warn, ..fixtures::app("x/shop") }). The full literals and copies are gone: 8AppSummary, 5IncidentView, 2HostOverview, 3 JSON workload builders. The server's integration tests sharedown()andapp_config()intests/common.HostEntryderivesDefault(a config type).ui/format.rspreview.rsgoes from 452 to 379 lines,ui/mod.rsfrom 332 to 303.views::summary()replaces four copies of links +workload_summary. App links come fromlinks(&Subject::App).AppViewreuses the app's workloads instead of recomputing them.App::apps_iter,app_summaryandhost_summaryreplace the repeated chains. The filter's text for an app moves intofilter.rs.28 files: +287 −521.
No behaviour change: how it was checked
main, 29 files in all. They were captured again after the refactor, with timestamps normalized: byte-identical.AppVieware now problems first and then by key, like everywhere else. Before, they were ordered by key. The view already re-sorts them.Not done, deliberately
workload.rsusinglabel(): it would dim those labels, a visible change.No deploy is needed; the next deploy carries this.