Skip to content

Base: let a saved view open by default instead of the all-records grid #92

Closed

Description

@nicklaunches

Problem

/dashboard/<space>/base/<slug> always opens the unsaved all-records table. A Base that is really a kanban board (a Tasks base with a Board view stacked by status) has to be reached through /base/<slug>/board every time: the sidebar entry, breadcrumbs and search results all land on the bare route, and the view switcher resets on every navigation.

Today there is nothing in the model to express "open this view first". viewSchema has no default flag or position, views are listed by createdAt, and selectedBaseView in packages/busabase-core/src/domains/dashboard/index.tsx resolves to null whenever the route has no childId.

Proposal

A per-Base default view, stored as a node setting:

// packages/busabase-contract/src/contract/schemas.ts
export const nodeSettingsSchema = z.strictObject({
  airappEngine: z.enum(["browser", "local", "remote"]).nullish(),
  defaultViewSlug: z.string().nullish(),
});

Behaviour:

  • When the route has no childId and the Base node has settings.defaultViewSlug pointing at an active view, the dashboard opens that view. Redirecting to /base/<slug>/<defaultViewSlug> keeps the URL canonical and the pagination scope logic untouched.
  • childId in the URL always wins, so deep links to other views keep working, and the all-records grid stays reachable from the view switcher.
  • Clearing the setting (null) restores today's behaviour. Archiving or deleting the default view clears it.
  • The existing PATCH /nodes/{nodeId}/settings endpoint and the nodes_update_settings MCP tool pick the new key up with no new surface; agents can set it when they scaffold a Base with its views.
  • UI: a "Default view" select in the Base settings dialog (or the node settings dialog next to the AirApp engine picker), listing the Base's active views plus "All records".

Node settings rather than an isDefault flag on the view row because settings already have a strict schema, a PATCH endpoint, an MCP tool and a dialog, and because the default is a property of how the Base opens, not of the view itself.

Touch points

  • packages/busabase-contract/src/contract/schemas.ts: nodeSettingsSchema, NodeSettings
  • packages/busabase-core/src/db/schema.ts: settings column type
  • packages/busabase-core/src/domains/dashboard/index.tsx: selectedBaseView fallback / redirect
  • packages/busabase-core/src/domains/dashboard/components/base-views.tsx or node-settings-dialog.tsx: the picker
  • view archive/delete path: clear a dangling default
  • MCP tool description for nodes_update_settings

Happy to send a PR for this if the approach works for you.

Activity

  1. mr-kelly commented on Nov 17, 2026

    @mr-kelly
    Contributor

    Thanks for the clear write-up, and sorry this sat unanswered.

    I checked current main (commit dc049a5). The original problem — opening /base/<slug> always landing on the unsaved all-records grid — is no longer what the dashboard does. resolveDefaultViewPath in packages/busabase-core/src/domains/dashboard/helpers/view-order.ts now redirects a bare Base route to the Base's leftmost view (by position, with a history replace). So the sidebar, breadcrumbs and search results that point at /base/<slug> should open that first tab, not the unsaved grid.

    What is not on main is the per-Base setting you proposed (settings.defaultViewSlug on nodeSettingsSchema, plus a "Default view" picker in node settings). nodeSettingsSchema still only has airappEngine. The default today is "the leftmost tab", so changing tab order is how you change which view opens first; there is no independent default-view setting.

    We'll keep the rest of the request — a stored default independent of tab order, and the settings UI — as an open feature request. I don't have a release date to share yet.

    If the leftmost-view redirect already covers what you needed, please say so and we can close this; if you still want a dedicated default-view setting, we'll leave it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions