Skip to content

fix(detail): normalize the three section caps to one DETAIL_SECTION_CAP = 200 - #79

Merged
lance0 merged 1 commit into
masterfrom
fix/detail-section-cap-normalize
Jun 24, 2026
Merged

lance0 merged 1 commit into
masterfrom
fix/detail-section-cap-normalize

Conversation

@lance0

@lance0 lance0 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

What

The detail-view had three caps gating the same concept — "rows in one detail section" — with an unprincipled 4× gap:

was value gated
DEVICE_CAP 200 a device's interfaces/IPs/services, IPs on an interface
SECTION_CAP 50 a prefix's child prefixes/member IPs, a VLAN's referencing prefixes
VRF_SECTION_CAP 200 a VRF's scoped prefixes/addresses

A VRF's addresses showed 200, but a prefix's child IPs — the same kind of data — showed 50, truncating common /24 prefixes (254 hosts) at 50 rows.

Change

Collapse all three into a single DETAIL_SECTION_CAP = 200 (src/domain/detail.rs).

  • Fixes the one cap that bit: prefix/VLAN child rows 50 → 200 (covers the vast majority).
  • Ends the inconsistency: three names, one number, for one concept.
  • Names the cap where it operates: it's a rendering concern (rows in one detail section), so it's named at the rendering/UX layer, not the dcim/ipam domain layer the old doc comments drew.

BROWSE_CAP = 1000 (whole-kind browse, a genuinely different concept) is unchanged. The other unrelated caps (PREFIX_TREE_CAP, CIRCUIT_PATH_CAP, PANEL_FRONT_PORT_CAP, RECENT_CAP, JOURNAL_INLINE_MAX) are untouched.

Scope note (residual)

A full /24 (254 hosts) still truncates at 200. Closing that fully is a targeted --all/fetch-all toggle — deliberately not a cap bump (200 covers the vast majority and ends the inconsistency, which is the win here). The ROADMAP load-more item is reframed accordingly: the 50 outlier it was meant to patch is fixed by this; the residual wants a toggle, not scroll-paging.

Verification

  • Gate: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test --all-features (1107 pass), cargo test --no-default-features (1012 pass) — all green, unchanged counts (the bump is behaviorally invisible to the suite: no test asserts 50-row truncation, and no mock pins limit=50).
  • Live: prefix/device/vlan detail paths return 200 against the 4.6.2 box (ltuller).
  • No test churn: the three caps were private consts in detail.rs (no test referenced them by name); query_tests.rs passes a literal 50 to the client methods (testing filter behavior with count: 1 mocks), isolated from the const.

Docs

  • ROADMAP.md: load-more-on-scroll reframed (50 outlier fixed by normalization; residual = --all toggle).
  • CHANGELOG.md: ## [Unreleased] → ### Changed entry.

Files

  • src/domain/detail.rs — 3 caps → 1 (DETAIL_SECTION_CAP), all 21 call-sites + 3 doc comments updated.
  • ROADMAP.md, CHANGELOG.md — doc updates.

A small, principled normalization PR. Next real chunk (per the plan): fixture-migration pass to pay down the 0.12.0 surface expansion, with the MCP prompts catalog as the differentiator follow-up.

…AP = 200

The detail-view had three caps gating the same concept — "rows in one
detail section" — with an unprincipled 4× gap: DEVICE_CAP=200 (a device's
interfaces/IPs/services), SECTION_CAP=50 (a prefix's child prefixes/member
IPs, a VLAN's referencing prefixes), and VRF_SECTION_CAP=200 (a VRF's scoped
prefixes/addresses). A VRF's addresses showed 200 but a prefix's child IPs —
the same kind of data — showed 50, truncating common /24 prefixes (254 hosts)
at 50 rows.

Collapse all three into a single DETAIL_SECTION_CAP = 200. The cap is a
rendering concern (rows in one detail section), so it's named at that layer,
not the dcim/ipam domain layer the old doc comments drew. This fixes the one
cap that genuinely bit (prefix/VLAN children 50→200, covering the vast
majority) and ends the three-names-one-concept inconsistency.

BROWSE_CAP = 1000 (whole-kind browse, a different concept) is unchanged. A
full /24 (254 hosts) still truncates at 200; closing that fully is a targeted
--all/fetch-all toggle, not a cap bump.

Verified: gate green (1107 all-features / 1012 no-default-features, clippy
-D warnings, fmt); live prefix/device/vlan detail paths return 200. No test
asserts 50-row truncation and no mock pins limit=50, so the bump is
behaviorally invisible to the suite.

ROADMAP: load-more-on-scroll reframed — the 50 outlier it was meant to patch
is fixed by this normalization; the residual (>200 rows) wants a toggle, not
scroll-paging.
@lance0
lance0 merged commit 2572908 into master Jun 24, 2026
4 checks passed
@lance0
lance0 deleted the fix/detail-section-cap-normalize branch June 24, 2026 21:03
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