Skip to content

Map: screens that share a parent keep the order the run reached them in - #92

Open
jensdev wants to merge 1 commit into
expo:mainfrom
craftzing:map-sibling-order
Open

jensdev wants to merge 1 commit into
expo:mainfrom
craftzing:map-sibling-order

Conversation

@jensdev

@jensdev jensdev commented Nov 20, 2026 •

Copy link
Copy Markdown

What and why

The Map lays out each layer by where a screen's parents sit (flatPositions), and breaks ties by screen id. Screens that a hub leads to all share that hub as their parent, so they always tie. A tab bar is the common case: a replay that opens each tab from the first tab and goes back. Their order then follows their content-hash ids, which look random. The screens one tap further are placed next to their parents, so in the next layer the edges slant across each other, and the tabs are never in tab-bar order.

Ties now go to the screen the run reached first (screen.firstSeenAt), then to the id as before. For an exploration or a --replay run, that is the order the screens were reached in. With a plan, that means the author can choose the order.

Screenshots

An anonymised copy of a real explore:binary --replay report: generic titles, placeholder screenshots. After onboarding (Step 1–8), "Tab 1" leads to each other tab and back, and three tabs have a detail screen.

Before After
Tabs in id order: Tab 3, Tab 1 › Detail, Tab 4, Tab 2, Tab 5. Their details slant across rows. Tabs in the order the run reached them: Tab 1 › Detail, Tab 2, Tab 3, Tab 4, Tab 5. Tab 2 › Detail and Tab 3 › Detail line up with their tabs.
map-before map-after

No change to colour or the phone layout.

Code examples

No change to usage.

Try it

Open any report whose start or hub screen leads to several screens, such as a replay that visits each tab from the first one. Those screens now stack in the order the run reached them.

Testing

  • npm run typecheck, npx eslint on the changed file, npm run build.
  • npm run test:node: 1709 of 1713 pass. The 3 failures also fail on main on this machine and come from its environment: the doctor temporary-directory check, the executable-bit check after a build, and the help output.
  • By hand: the report above in node dist/cli.js view --dir <report> against npx @expo/explore@0.23.0 view, Map view.

The Map orders each layer by where a screen's parents sit, and broke ties by
screen id. Screens a hub leads to (the tabs of a tab bar) all tie, so their
order followed their content-hash ids and the next layer's edges crossed.
Ties now go to the screen the run reached first, then to the id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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.

1 participant