Skip to content

feat: persist timeline expand/collapse state in URL#184

Open
Harshil-Malisetty wants to merge 2 commits intoNetflix:masterfrom
Harshil-Malisetty:fix/timeline-url-state
Open

feat: persist timeline expand/collapse state in URL#184
Harshil-Malisetty wants to merge 2 commits intoNetflix:masterfrom
Harshil-Malisetty:fix/timeline-url-state

Conversation

@Harshil-Malisetty
Copy link
Copy Markdown

@Harshil-Malisetty Harshil-Malisetty commented Mar 18, 2026

Description of the Change

Encodes the explicitly opened steps in the URL as a query param —
e.g. ?timeline=start,train — so shared links restore the same
timeline view for the recipient. Addresses #42.

Alternate Designs

Considered encoding full expand/collapse state for every step,
but encoding only opened steps keeps URLs shorter. Collapsed
state is the default so it doesn't need to be represented.

Considered using history.pushState but replaceState was chosen
so back button behavior stays normal — each expand/collapse
overwrites the current URL entry rather than stacking history.

Possible Drawbacks

If a run has steps with commas in the name, the param encoding
could break. Current Metaflow step names don't allow commas so
this is not a concern in practice.

Verification Process

Verified the app compiles with no errors and no lint warnings (npm run lint is clean)
after the change. logic follows existing URL param
patterns already used in the codebase.

Release Notes

Timeline expand/collapse state is now persisted in the URL,
allowing users to share links that restore the same view.

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