Skip to content

fix(app): auto-register direct-route projects#18947

Open
wxt365 wants to merge 3 commits intoanomalyco:devfrom
wxt365:fix-direct-route-sidebar-project-18943
Open

fix(app): auto-register direct-route projects#18947
wxt365 wants to merge 3 commits intoanomalyco:devfrom
wxt365:fix-direct-route-sidebar-project-18943

Conversation

@wxt365
Copy link

@wxt365 wxt365 commented Mar 24, 2026

Issue for this PR

Closes #18943

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Opening a valid /:dir/... route resolved the directory context, but it did not register the project in the sidebar.

This PR triggers the existing project-open flow after the direct-route directory is resolved, so direct routing behaves the same as manually opening a project.

The change is small and reuses the existing idempotent layout.projects.open() path, which already loads sessions and avoids duplicate sidebar entries.

How did you verify your code works?

  • cd packages/app && bun test --preload ./happydom.ts ./src/pages/directory-layout.test.ts
  • cd packages/app && bun test

Screenshots / recordings

Attach a short recording showing that opening /{base64(directory)}/session makes the project appear in the sidebar automatically.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@wxt365 wxt365 requested a review from adamdotdevin as a code owner March 24, 2026 13:20
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential duplicate found:

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.

Direct /:dir/... routes do not register the project in the sidebar

1 participant