Skip to content

fix: workspace view search param collides with explore view=pivot and blanks the editor - #9895

Merged
nishantmonu51 merged 2 commits into
mainfrom
nishant/fix-workspace-view-param-collision
Sep 16, 2026
Merged

nishantmonu51 merged 2 commits into
mainfrom
nishant/fix-workspace-view-param-collision

Conversation

@nishantmonu51

@nishantmonu51 nishantmonu51 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Opening an explore file sometimes rendered neither the code editor nor the preview, with no console or network errors. The workspace body was empty because the persisted workspace view was pivot.

  • An explore previewed inside a file workspace writes its URL state onto the file route, including view=pivot / view=tdd. The files route's consumeViewSearchParam treated that as the workspace view, persisted it to localStorage, and ExploreWorkspace has no branch for it. The bad value survived reloads and restarts until the header toggle was clicked.
  • Rename the workspace view search param from view to editor so it cannot collide with the explore's own view param. All links go through getFileHref, so no other call sites change.
  • Only accept known workspace views from the param and from localStorage.
  • ExploreWorkspace now treats any non-code view as the preview, so users who already have a stale pivot/tdd value stored recover on next load.
  • Added workspace-stores.spec.ts covering the localStorage fallback and the param handling.

Repro before the fix: open an explore file, switch to the visual editor, click "Start Pivot", then reload or navigate away and back.

Closes APP-934

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

… and blanks the editor

Explore dashboards previewed inside a file workspace write their own URL state
onto the file route, including `view=pivot`/`view=tdd`. The files route consumed
that as the workspace view, persisted it to localStorage, and the explore
workspace then rendered neither the code editor nor the preview.

- Rename the workspace view search param to `editor`.
- Only accept known workspace views from the param and from localStorage.
- Treat any non-"code" view in ExploreWorkspace as the preview so stale
  persisted values self-heal.
…rop `split`

- Remove the unused `split` view from the type and the allowlist.
- CanvasWorkspace falls back to the preview for views it cannot render,
  matching ExploreWorkspace; correct the comments to say the allowlist is
  the union across workspaces and each workspace coerces.
- Isolate the workspace-stores spec from the module-level singleton.
@nishantmonu51 nishantmonu51 added Type:Bug Something isn't working Area:Dashboard Size:M Medium change: 100-499 lines labels Sep 16, 2026
@nishantmonu51
nishantmonu51 merged commit a1e6990 into main Sep 16, 2026
13 of 14 checks passed
@nishantmonu51
nishantmonu51 deleted the nishant/fix-workspace-view-param-collision branch September 16, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area:Dashboard Size:M Medium change: 100-499 lines Type:Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants