Summary
NetworkMockEndpointScreen carries an unused previewingResponse state variable and an unused onPreviewClick parameter, both dead leftovers from before the preview bottom sheet (PreviewSheetState) was built. This is independent of the OpenAPI migration (tracked in the epic, #72) and can be picked up any time. Good first issue: small, self-contained, purely a deletion.
Current state
In devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockEndpointScreen.kt:
previewingResponse — declared at :96 (var previewingResponse by remember { mutableStateOf<MockResponse?>(value = null) }) with a comment above it reading // Stub for Step 3 — will be replaced with the preview sheet (:95). The preview sheet (PreviewSheetState, NetworkMockEndpointPreviewBottomSheet) now exists and is fully wired via a separate mechanism (previewSheetState, declared at :129-133, driven by onLongClick at :255-258) — previewingResponse is never read anywhere after its declaration.
onPreviewClick — a parameter on NetworkMockEndpointScreenContent (:113), populated by NetworkMockEndpointScreen at :101 (onPreviewClick = { previewingResponse = it }), and passed again in the @Preview composable at :312 (onPreviewClick = {}). It's declared but never invoked anywhere in the actual UI — no onClick/onLongClick in the file calls it.
What to build
Delete both, and anything that only exists to feed them:
- Remove
previewingResponse (:96) and its explanatory comment (:95).
- Remove the
onPreviewClick parameter from NetworkMockEndpointScreenContent's signature (:113) and from both call sites (:101, :312).
Acceptance criteria
Files likely touched
devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockEndpointScreen.kt
Summary
NetworkMockEndpointScreencarries an unusedpreviewingResponsestate variable and an unusedonPreviewClickparameter, both dead leftovers from before the preview bottom sheet (PreviewSheetState) was built. This is independent of the OpenAPI migration (tracked in the epic, #72) and can be picked up any time. Good first issue: small, self-contained, purely a deletion.Current state
In
devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockEndpointScreen.kt:previewingResponse— declared at:96(var previewingResponse by remember { mutableStateOf<MockResponse?>(value = null) }) with a comment above it reading// Stub for Step 3 — will be replaced with the preview sheet(:95). The preview sheet (PreviewSheetState,NetworkMockEndpointPreviewBottomSheet) now exists and is fully wired via a separate mechanism (previewSheetState, declared at:129-133, driven byonLongClickat:255-258) —previewingResponseis never read anywhere after its declaration.onPreviewClick— a parameter onNetworkMockEndpointScreenContent(:113), populated byNetworkMockEndpointScreenat:101(onPreviewClick = { previewingResponse = it }), and passed again in the@Previewcomposable at:312(onPreviewClick = {}). It's declared but never invoked anywhere in the actual UI — noonClick/onLongClickin the file calls it.What to build
Delete both, and anything that only exists to feed them:
previewingResponse(:96) and its explanatory comment (:95).onPreviewClickparameter fromNetworkMockEndpointScreenContent's signature (:113) and from both call sites (:101,:312).Acceptance criteria
previewingResponseandonPreviewClickno longer exist anywhere inNetworkMockEndpointScreen.kt.previewSheetState) continues to work exactly as before — this is a pure deletion of dead code with zero behavior change.detektFulland existing device tests for this screen still pass.Files likely touched
devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockEndpointScreen.kt