You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework the devview-networkmock UI so tabs are one-per-spec instead of one-per-group×environment, add a version chip/filter driven by #5's version tag, and add search — the current UI has none, which was tolerable for a handful of hand-written endpoints but won't be once a real OpenAPI spec contributes potentially hundreds of operations.
Current state
NetworkMockScreen.kt (devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockScreen.kt) renders a PrimaryScrollableTabRow (:151-165) with one tab per group×environment combination, labeled "${group.name} — ${environment.name}" (viewmodel/NetworkMockViewModel.kt:98). Each tab's HorizontalPager page (:166-203) shows a flat LazyColumn of EndpointCards (:182-193) — no search, no filter.
NetworkMockViewModel.loadConfiguration() (devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/viewmodel/NetworkMockViewModel.kt:138-193) currently registers and discovers response files for every group × environment × endpoint combination eagerly — this loop simplifies once the environment axis (Feature/feature flip #2) and probing (Feature/analytics #4) are both gone, but double check the resulting complexity here (should now be roughly specs × operations, driven by declared responses rather than probed ones).
EndpointCard.kt, EndpointStateChip.kt — per-row display components that will need a version chip added.
What to build
Tabs become one per spec.PrimaryScrollableTabRow renders ApiSpecUiModel.name (i.e. info.title) per tab, not "group — environment".
Version chip per operation row, using Operation.version from Feature/documentation #5. Operations with version == null show no chip.
Version filter — since one spec's tab can now contain both v1 and v2 operations side by side (per the epic's "one spec = one group" decision), add a filter control (chips or a dropdown) scoped to the currently-visible tab: "All / v1 / v2 / ...", derived from the distinct versions present among that tab's operations.
Search — a search field (likely in the top bar or above the tab row) that filters the visible operation list by name/path/operationId, live as the user types. This is a plain client-side filter over already-loaded data; no new data-loading path needed.
Tabs are one per ApiSpec, no environment axis visible anywhere in the UI.
Each operation row shows a version chip when Operation.version != null.
A version filter narrows the visible operation list within the active tab.
A search field filters the visible operation list by name/path/operationId.
Existing device tests (NetworkMockScreenTest.kt, EndpointCardTest.kt, EndpointStateChipTest.kt) are updated for the new tab/model shape; new tests cover the version filter and search.
Manually verified in the sample app: run sample:androidApp, open DevView → Network Mock, confirm spec tabs (no environment tabs), version chips on the migrated sample's v1/v2 profile operations (see ⬆️ Update kotlin #8), and that search narrows the list as expected.
Part of #72
Depends on #2, #3, #4, #5.
Summary
Rework the
devview-networkmockUI so tabs are one-per-spec instead of one-per-group×environment, add a version chip/filter driven by #5's version tag, and add search — the current UI has none, which was tolerable for a handful of hand-written endpoints but won't be once a real OpenAPI spec contributes potentially hundreds of operations.Current state
NetworkMockScreen.kt(devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockScreen.kt) renders aPrimaryScrollableTabRow(:151-165) with one tab per group×environment combination, labeled"${group.name} — ${environment.name}"(viewmodel/NetworkMockViewModel.kt:98). Each tab'sHorizontalPagerpage (:166-203) shows a flatLazyColumnofEndpointCards (:182-193) — no search, no filter.GroupEnvironmentUiModel(devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/model/GroupEnvironmentUiModel.kt:19-27) carriesgroupId,environmentId,name,url,endpoints— becomesApiSpecUiModelper ✨ Add Renovate config #3, droppingenvironmentId.NetworkMockViewModel.loadConfiguration()(devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/viewmodel/NetworkMockViewModel.kt:138-193) currently registers and discovers response files for everygroup × environment × endpointcombination eagerly — this loop simplifies once the environment axis (Feature/feature flip #2) and probing (Feature/analytics #4) are both gone, but double check the resulting complexity here (should now be roughlyspecs × operations, driven by declared responses rather than probed ones).EndpointCard.kt,EndpointStateChip.kt— per-row display components that will need a version chip added.What to build
PrimaryScrollableTabRowrendersApiSpecUiModel.name(i.e.info.title) per tab, not"group — environment".Operation.versionfrom Feature/documentation #5. Operations withversion == nullshow no chip.Explicitly out of scope here
Acceptance criteria
ApiSpec, no environment axis visible anywhere in the UI.Operation.version != null.NetworkMockScreenTest.kt,EndpointCardTest.kt,EndpointStateChipTest.kt) are updated for the new tab/model shape; new tests cover the version filter and search.sample:androidApp, open DevView → Network Mock, confirm spec tabs (no environment tabs), version chips on the migrated sample's v1/v2 profile operations (see ⬆️ Update kotlin #8), and that search narrows the list as expected.Files likely touched
devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockScreen.ktdevview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/model/GroupEnvironmentUiModel.kt(renamed per ✨ Add Renovate config #3)devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/viewmodel/NetworkMockViewModel.ktdevview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/components/EndpointCard.ktdevview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/components/EndpointStateChip.ktdevview-networkmock/src/androidDeviceTest/...