Skip to content

Dismiss canvas when leaving a rail surface (CL-6819) - #593

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6819-routine-create-panel-stays-open-after-leaving-routines-via
Sep 4, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-6819-routine-create-panel-stays-open-after-leaving-routines-via

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Leaving Routines (or any other rail surface) via in-app nav now closes the canvas column. The create/edit routine sheet, profile card, and artifact pane all dismiss when the first path segment changes, so a compact layout that hid the column cannot resurrect it after returning to expanded.

Nested detail (/routines → /routines/:id) and query-only changes share a prefix and keep the pane.

Fixes CL-6819

@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Self-review

Verdict: implementation is correct and well-tested — the route-prefix comparison correctly distinguishes a rail leave from nested detail/query-only changes, and the new suite covers all four canvas kinds plus the compact-layout resurrection case. No changes made.

  • Route-prefix logic (inAppRoutePrefix, dismiss effect) — DISMISSED: verified against closeCanvasContent in packages/shell-layout/src/canvas-column-state.ts; correctly closes whichever of profile/artifact/routine is open and drops focus, without racing the tenant-switch effect.
  • Test coverage — DISMISSED: all 6 new scenarios (rail leave for profile/artifact/routine, nested detail, query-only, compact layout) exercise real ShellChromeProvider state, not mocks.
  • Pre-existing test close-canvas fired from a sibling of AppShell closes a canvas AppShell is showing — CONFIRMED-OPEN (not fixed): fails both in the full file and in isolation (bun test test/shell-chrome-wiring.test.tsx -t "close-canvas fired"), unmodified by this diff. Environmental/pre-existing, out of scope for this PR.

Targeted tests:

  • bun test test/shell-chrome-wiring.test.tsx (run from apps/web) — 7 pass, 1 fail (pre-existing, unrelated to this diff)
  • bun run typecheck — pass

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

CL-6819

@TheGreatAxios
TheGreatAxios merged commit 1afed62 into main Sep 4, 2026
7 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.

1 participant