Skip to content

fix(app): route legacy drafts to session page#35808

Merged
Brendonovich merged 1 commit into
anomalyco:devfrom
Hona:legacy-draft-layout
Jul 8, 2026
Merged

fix(app): route legacy drafts to session page#35808
Brendonovich merged 1 commit into
anomalyco:devfrom
Hona:legacy-draft-layout

Conversation

@Hona

@Hona Hona commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • redirect draft URLs to the existing directory session route when redesigned layouts are disabled
  • keep redesigned drafts on the standalone new-session route
  • cover the legacy redirect, titlebar shell, and prompt rendering with Playwright

Fixes #35701

Tests

  • bun typecheck
  • bun run test:e2e -- e2e/regression/legacy-new-session.spec.ts e2e/regression/new-session-panel-corner.spec.ts --project=chromium --workers=1

@Hona Hona requested a review from Brendonovich as a code owner July 7, 2026 23:11
Copilot AI review requested due to automatic review settings July 7, 2026 23:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR ensures draft URLs (/new-session?draftId=...) behave correctly when the redesigned layouts are disabled by redirecting them to the existing legacy directory session route, while keeping the redesigned draft flow unchanged when the new layouts are enabled.

Changes:

  • Add a conditional redirect in DraftRoute to send legacy-layout users from /new-session?draftId=... to /:dir/session.
  • Add a Playwright regression test covering the legacy redirect and key UI affordances (titlebar drag region + prompt input) after navigation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/app/src/app.tsx Routes draft URLs to the legacy directory session page when newLayoutDesigns is disabled; otherwise continues rendering the redesigned draft route.
packages/app/e2e/regression/legacy-new-session.spec.ts Adds an E2E regression test verifying the redirect to the legacy session route and basic shell/prompt rendering.

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

@Brendonovich Brendonovich merged commit 83d633f into anomalyco:dev Jul 8, 2026
12 checks passed
avion23 pushed a commit to avion23/opencode that referenced this pull request Jul 9, 2026
anduimagui pushed a commit to anduimagui/opencode that referenced this pull request Jul 9, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jul 11, 2026
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.

v1.17.14 Desktop can't load main UI.

3 participants