Skip to content

Return record breadcrumbs to the view the record was opened from - #122

Merged
mr-kelly merged 3 commits into
mainfrom
cursor/record-source-view-299f
Nov 20, 2026
Merged

mr-kelly merged 3 commits into
mainfrom
cursor/record-source-view-299f

Conversation

@mr-kelly

@mr-kelly mr-kelly commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Verification: 🟢 Fully verified

Problem and fix

A record now retains the view it was opened from as fromView. Its Base breadcrumb and edit/save/cancel/create/delete navigation return to that active view; a missing or archived source falls back to the Base's configured default. Table, gallery, kanban, calendar, and timeline links carry the source, including preview and full-page links.

Builds on the default-view setting merged in #121.

Acceptance also caught a cross-Base leak: an implicit fromView query could select a same-named view in a different Base. Both generic link mergers now treat this as page-local state. Same-record toolbar, activity, create and save navigation opt in explicitly; a missing provider can read the record URL, while an explicit null provider still means no source. Workspace, locale, demo and inbox context continue to travel with links.

Validation

A rendered-component regression failed before correction. The real browser then verified Board → record → edit/cancel/save/activity/back, a generated cross-Base reference without fromView, the other Base opening its own Grid default despite also having Board, and successful record creation retaining its real Board source. Root independently replayed this proof, the complete five-view local story, and the final real Cloud story with no browser errors.

The changed feature paths were exercised in Chromium with genuine Inter/Fraunces fonts, backed by real local databases and HTTP/RPC calls. Busabase Cloud checks used real Better Auth sessions and an isolated migrated PGLite database. Screenshot/video links were fetched successfully after upload.

Verified all five view types against the public source: open record → full page → Base breadcrumb → same view. Also verified preview links, edit cancellation, edit/save/return, new-record cancellation, an invalid source falling back to the configured default, and delete/merge returning to the source timeline. The real authenticated Cloud host passes preview/full-page/edit/save/return too. No browser errors. Focused source-view component tests and scoped typechecks pass.

Known risk: none identified in the tested navigation paths.

Story: finish work on a record and return to the same view

A record opened from Grid view keeps that destination in its Base breadcrumb.

A record opened from Grid view keeps that destination in its Base breadcrumb.

Edit and save, then return to Grid view rather than the configured default.

Edit and save, then return to Grid view rather than the configured default.

Delete and merge from a timeline record and return to that timeline.

Delete and merge from a timeline record and return to that timeline.

Additional view proofs: gallery, kanban, calendar, timeline.

Local browser recording · Cloud browser recording

Follow a reference to another Base without borrowing the current Board.

Follow a reference to another Base without borrowing the current Board.

The other Base opens its own Grid default even though it also has Board.

The other Base opens its own Grid default even though it also has Board.

Successful creation retains the originating Board.

Successful creation retains the originating Board.

Cross-Base and same-record recording

Fixes #95

@mr-kelly
mr-kelly added this pull request to stack #123 November 17, 2026 09:56
@mr-kelly

Copy link
Copy Markdown
Contributor Author

Verification level: 🟡 Partial verification — I independently re-ran the package tests and typecheck, and reviewed the diff, but I could not click through a real dashboard to prove the breadcrumb returns to the source view.

Problem

Opening a record from a saved view, then clicking the Base crumb, did not return to that view. After #92's leftmost/default-view redirect, the crumb went to /base/<slug>, which opens the default view, not the view the record was opened from.

Root cause

Record URLs used /base/<slug>/<recordId> with no carried view, and the Base crumb always pointed at /base/<slug>. The inbox already uses ?view= for its tab, so that query name could not be reused.

Fix

Record, edit, and new-record links from table, gallery, kanban, calendar, and timeline now add ?fromView=<viewSlug>. The Base crumb on those pages goes to /base/<slug>/<viewSlug> when that slug is still an active view, otherwise to /base/<slug>. Edit, save, cancel, and delete keep the same slug. This branch is stacked on #121 because both edit index.tsx; the fromView behavior does not depend on defaultViewSlug. After #121 merges, this PR should be retargeted at main.

Validation

  • Method: I checked out 6696da4 and ran, in packages/busabase-core, the tests named in the PR body (source-view-url.test.ts, calendar/table/gallery/kanban DOM tests, record-detail-dialog.dom.test.tsx, record-views.test.tsx, lookup-cards.dom.test.tsx, inbox.test.ts), then tsc --noEmit. I also read source-view-url.ts, the provider, and the breadcrumb/router changes. I did not start a dashboard or drive a browser.
  • Result: 9 files, 160 tests, all passed. Typecheck passed. The helper tests cover reading fromView, ignoring a blank or archived slug, preserving an existing query string, and building the crumb. The calendar DOM test checks a card href of /base/calendar/rec_calendar?fromView=calendar. I did not find a remaining in-dashboard view type whose record links skip fromView (table, gallery, kanban, calendar, and gantt are all wired). Record links that were never opened from a view correctly stay on /base/<slug>.
  • Verification level: 🟡 Partial verification — the URL helper and component hrefs were exercised in tests, but there is no click-through of "open a record from a non-default view, then use the Base crumb to go back."
  • Known risk / not covered:
    • No live dashboard evidence. This PR's checks did not include a dashboard deploy preview (the Store a Base default view independent of tab order #121 preview is the CMS example site, which cannot prove this breadcrumb).
    • At review time, GitHub test, coverage, e2e, and Docker build were still running. Lint, typecheck, and Email SDK had already passed.
    • Do not merge this onto main until Store a Base default view independent of tab order #121 is in and this PR has been retargeted, or the index.tsx stack will conflict.
    • I did not click through save/cancel/delete in a browser; those paths are only covered as URL construction in code and tests.

No screenshots: verification did not go through a browser.

@cursor
cursor Bot force-pushed the cursor/record-source-view-299f branch 3 times, most recently from 7949392 to 4221c5a Compare November 20, 2026 04:11
Base automatically changed from cursor/default-view-setting-299f to main November 20, 2026 04:39
cursoragent and others added 2 commits November 20, 2026 12:39
Record, edit, and new-record links opened from a view carry fromView.
The Base crumb uses that slug when it still names an active view, and
edit, save, cancel, and delete keep it too.

Co-authored-by: Kelly Peilin Chan <[email protected]>
Opening a record from the grid now keeps fromView, and the Base crumb
follows that view. The history and relation tests were asserting the
old bare paths.

Co-authored-by: Kelly Peilin Chan <[email protected]>
@mr-kelly
mr-kelly force-pushed the cursor/record-source-view-299f branch from 4221c5a to adad204 Compare November 20, 2026 04:39
@mr-kelly
mr-kelly marked this pull request as draft November 20, 2026 04:48
@mr-kelly
mr-kelly marked this pull request as ready for review November 20, 2026 05:18
@mr-kelly
mr-kelly merged commit db0bbd6 into main Nov 20, 2026
9 checks passed
@mr-kelly
mr-kelly deleted the cursor/record-source-view-299f branch November 20, 2026 05:26
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.

Record breadcrumb: return to the view the record was opened from, not the all-records grid

2 participants