Skip to content

feat: revamp NetworkMock operation sheet UX - #157

Open
MaxMichel2 wants to merge 9 commits into
mainfrom
feat/networkmock-ux-revamp
Open

MaxMichel2 wants to merge 9 commits into
mainfrom
feat/networkmock-ux-revamp

Conversation

@MaxMichel2

@MaxMichel2 MaxMichel2 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Shared TopAppBar divider, animated endpoint lists, and "Mocked first" sorting.
  • Fixed 65% sheet with Responses / Sequence / Failure tabs.
  • Direct preview and comparison; seeded, removable sequence steps.
  • Pretty-printed JSON with unwrapped lines, whole-pane horizontal scrolling, and lazy rows.
  • Cached, bounded comparisons and distinguishable media variants.
  • Aligned sample 404 variants for inline-diff testing. Core and public API unchanged.

Validation

  • Sample build/install, NetworkMock host tests, focused preview device tests, and Detekt passed.
  • Earlier full device suite passed; a later tab iteration had one search-test failure. No full-suite pass established for the latest commit.
  • CI is still running; build, semantic title, and Konsist have passed.
  • Latest scrolling has not been manually inspected; local iOS runtime testing was not performed.
  • Graph update remains blocked by its semantic-node preservation guard.

Follow-ups

#154 runtime overrides, #155 custom mock editor, #156 network logger.

History

Five original checkpoint commits in order, followed by four requested iteration commits.

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking performance concern for large formatted previews.

Findings

  1. P2 Large previews create every row ▶

Summary

This PR replaces the NetworkMock operation sheet with fixed-height Picker, Preview, and Sequence pages.

  • The operation sheet keeps picking responses and failures in a grouped, fixed-height page.
  • Preview pages choose comparisons directly and show formatted response bodies.
  • Sequence editing starts from the active steps and keeps repeats in order.
  • Mocked operations appear before network operations when that sort is selected.
  • NetworkMock list entries animate when filters or sorting change.
  • The shared top app bar now has a divider beneath it.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  List[Operation list] --> Picker[Picker]
  Picker -->|Eye| Preview[Preview]
  Preview -->|Compare with| Compare[Compare]
  Compare -->|Back| Picker
  Preview -->|Back| Picker
  Picker -->|Build or Edit| Sequence[Sequence draft]
  Sequence -->|Cancel or Back| Picker
  Sequence -->|Save| Apply[Apply choice and close]
  Picker -->|Select response or failure| Apply
Loading

Reviews (1) · Last reviewed commit: ":memo: Document NetworkMock sheet revamp" · Reviewed by Greptile

Comment on lines +302 to +304
val lines = remember(key1 = response.content, key2 = response.contentType) {
response.displayContent().lines()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Large previews create every row

Pretty-printing turns a compact JSON array into thousands of lines, but ResponseContentPane still creates every DiffLineRow at once inside a scrolling Column. Opening a large response, including the fallback for oversized comparisons, builds and measures off-screen rows before showing the preview. This adds substantial UI work and can make the page stall. Use a LazyColumn so only visible rows are created.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 35c0740: single/split and inline previews now use finite-width LazyColumn rows inside one pane-level horizontal scroller. Logical lines remain unwrapped and gutters scroll with all rows. Device tests cover 5,000-line lazy composition, synchronized horizontal scrolling, and independent split panes; focused preview tests and Detekt pass.

This branch has not been deployed

No deployments
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.

2 participants