Expand DevInsetInspector with DOM layer diagnostics & viewport units#94
Merged
Conversation
Add the metrics that pinpoint which element causes a standalone-PWA fullscreen gap: per-layer rendered heights for <html>, <body>, and #root (html=crimson, body=green, #root=blue), plus 100vh/lvh/svh/dvh probes, docEl.client, screen.availH, iOS version, split nav.standalone vs display-mode flags, and a GAP (innerH − #root.bottom) readout that goes red when the shell doesn't fill the window. Visual layer bottom-edge markers overlay the live screen so a short body line is obvious at a glance, and a Copy button dumps the full report for bug threads. Panel scrolls within an 82vh cap to fit the larger readout. https://claude.ai/code/session_01S9vEqUbyVKdXMWwHB7Vohn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enhanced the developer layout inspector to surface DOM-layer geometry (html, body, #root) and viewport unit measurements alongside existing safe-area insets. This addresses the core debugging need: identifying which DOM element is causing letterbox gaps in standalone PWA mode on iOS.
Key Changes
readLayer()to measuregetBoundingClientRect()for<html>,<body>, and#rootindependently, with color-coded visual markers (crimson/green/blue) overlaid on the screen at each layer's bottom edgemeasureUnits()to resolve actual computed heights for100vh,100lvh,100svh,100dvhby creating hidden test elements—the only reliable way to see what each unit resolves to on a given devicegapmetric (innerHeight − #root.bottom) to quantify the mismatch between window and rendered contentnav.standaloneflag,display-modemedia query,docElement.clientWidth/Height,screen.availHeight, and visual viewport offsetbuildReport()function and UI button to export a plain-text diagnostic dump suitable for pasting into bug reportsImplementation Details
html→ red-emergency (crimson),body→ green-ais,#root→ cyan-adsb (blue)—matches Vertex's existing palettenavigator.userAgent; falls back to "—" if unparseableMath.round()for pixel-perfect integer valueshttps://claude.ai/code/session_01S9vEqUbyVKdXMWwHB7Vohn