Skip to content

fix: give the traffic list and detail the flexible row again - #12

Merged
ryan-son merged 1 commit into
mainfrom
fix/traffic-grid-rows
Oct 26, 2026
Merged

ryan-son merged 1 commit into
mainfrom
fix/traffic-grid-rows

Conversation

@ryan-son

Copy link
Copy Markdown
Owner

Summary

Fixes a regression from #11: in Necto, the Traffic tab showed no requests and no detail.

#11 removed the registration order warning. Its slot, an always-present div.ml-order-warning, was the first child of .ml-traffic, and the grid still declared three rows (auto auto 1fr). With two children, the split holding the list and the detail moved into the second, auto row. There the list (flex: 1 1 0) and the detail have no height, so only the toolbar and the live strip were drawn, at any window size. jsdom does no layout, so every test passed.

  • style.css: .ml-traffic is grid-template-rows: auto 1fr.
  • A new test pins the tab's row count to the children render() draws, and checks that the split gets the last 1fr row.

Found while filling the 0.2.0 verification rows in #8. Not released: 0.2.0 isn't tagged yet.

Necto 0.2.2, Traffic tab, about 1530 px, Korean, dark Before (main at 99fde5c) After (this branch)
Same app, same data, nothing selected traffic-1200-ko-before.png traffic-1200-ko-after.png

Changelog

None. The regression was never released.

Agent interface

No change. Panel layout only; no operation, input, output or maplocal.state field changes.

Test Plan

  • The new test failed before the fix: "expected [ 'auto', 'auto', '1fr' ] to have a length of 2 but got 3".
  • cd Panel && npx tsc --noEmit: OK. npx vitest run: 1101 passed (1100 plus the new test).
  • script/build-panel regenerated EmbeddedPanel.swift.
  • Measured in Necto 0.2.2 (iPhone SE (3rd generation) simulator, iOS 18.4):
    • The release candidate from chore: prepare the 0.2.0 release #8, rebuilt with only this CSS change: the Traffic tab lists GET /json (mocked, 201) and GET /uuid (passthrough, 200).
    • Selecting /json opens the detail with the mocked body {"mocked":"b"} from Necto's network records.
    • Before the fix, the same build showed only the toolbar, even with the window filling the screen, while Necto's own Network panel listed the same requests.
  • The narrow (stacked) layout after the fix is checked with chore: prepare the 0.2.0 release #8's verification rows.

#11 removed the order warning's slot, the first child of `.ml-traffic`,
but the grid kept three rows (`auto auto 1fr`). The split with the list
and the detail moved into the second, auto row. There the list
(`flex: 1 1 0`) and the detail have no height, so in Necto the Traffic
tab showed only the toolbar and the live strip, at any window size.
jsdom does no layout, so the tests passed.

The grid now has one row per child, and a test pins the row count to
what render() draws.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ryan-son
ryan-son merged commit ce79d2a into main Oct 26, 2026
1 check passed
ryan-son added a commit that referenced this pull request Oct 26, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ryan-son ryan-son mentioned this pull request Oct 26, 2026
6 tasks done
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.

1 participant