Skip to content

Hook browser back/forward to nav state#251

Merged
jkingsman merged 4 commits into
jkingsman:mainfrom
MartinFournier:feature/nav-support
May 16, 2026
Merged

Hook browser back/forward to nav state#251
jkingsman merged 4 commits into
jkingsman:mainfrom
MartinFournier:feature/nav-support

Conversation

@MartinFournier
Copy link
Copy Markdown
Contributor

See #250

Screencast_20260511_022910.webm

Push history on user-initiated navigation so 'Back' moves between views instead of leaving the app.

  • urlHash: add pushUrlHash/pushSettingsHash (pushState variants)
  • useConversationRouter: pushState on nav; popstate resolves hash to conversation without re-pushing; switch over if-chain
  • useAppShell: pushState on settings open; popstate syncs visibility; close via history.back() when we own the entry
  • Tests: popstate coverage in appStartupHash + useAppShell

Claude did that code btw.

MartinFournier and others added 4 commits May 11, 2026 01:53
Push history on user-initiated navigation so 'Back' moves between
views instead of leaving the app.

- urlHash: add pushUrlHash/pushSettingsHash (pushState variants)
- useConversationRouter: pushState on nav; popstate resolves hash
  to conversation without re-pushing; switch over if-chain
- useAppShell: pushState on settings open; popstate syncs
  visibility; close via history.back() when we own the entry
- Tests: popstate coverage in appStartupHash + useAppShell
@jkingsman
Copy link
Copy Markdown
Owner

I've tacked a few minor fixes onto this -- happy for me to merge?

@MartinFournier
Copy link
Copy Markdown
Contributor Author

Of course, thanks!

@jkingsman jkingsman merged commit 2462e40 into jkingsman:main May 16, 2026
5 checks passed
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.

2 participants