Preserve focused person across tree/people/detail navigation #35
Reference in New Issue
Block a user
Delete Branch "improve-tree-people-navigation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Tree view, People (Family) view, and person detail page each tracked the current person in independent local state, so moving between them reset you to the home person. The detail page's "← Back to tree" link also pointed at the People view (not the Tree) and carried no person, so it always landed on the default person.
Fix
Make the focused person a URL-encoded concept that travels across views:
?focus=<id>on load and mirror the focused person back into the URL viarouter.replace(no history spam). Leaving and returning keeps you centered where you were; bookmarks/shared links resolve to the right person.?from=tree/?from=people./tree?focus=<id>or "← Back to People" →/?focus=<id>— returns you in place.fromthrough so click-chains keep their anchor.*.tsbuildinfo.Verification
tsc --noEmitclean;next buildpasses (all three routes render dynamically, nouseSearchParams/Suspense issue). Not yet click-tested in a running app.🤖 Generated with Claude Code