Skip to content

fix: strip session/ prefix in SessionIndex Navigate href#40

Merged
geier merged 1 commit intomainfrom
issue-34
Mar 4, 2026
Merged

fix: strip session/ prefix in SessionIndex Navigate href#40
geier merged 1 commit intomainfrom
issue-34

Conversation

@geier
Copy link
Contributor

@geier geier commented Mar 4, 2026

Summary

  • Fix doubled session/session/<id> URL when restoring last session across workspace switches
  • SessionIndex now strips the session/ prefix from getLastSessionHref() since it's already at /:dir/session

Closes #34

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a Solid Router relative navigation bug where SessionIndex (mounted at /:dir/session) was navigating to session/<id> and producing an invalid doubled path (/:dir/session/session/<id>), preventing last-session restore when switching workspaces.

Changes:

  • Update SessionIndex to strip the session/ prefix from getLastSessionHref() before passing it to <Navigate />, ensuring the redirect resolves to /:dir/session/<id>.
  • Keep DirectoryIndex behavior unchanged (it still correctly uses session/<id> relative to /:dir).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@geier geier merged commit d0ab154 into main Mar 4, 2026
4 of 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.

fix: SessionIndex doubles session/ prefix in Navigate href, breaking last-session restore

2 participants