Skip to content

feat(ui): enrich DB row context menu — open in tab/window + copy link (CM-3)#166

Merged
eliotlim merged 2 commits into
mainfrom
feat/cm3-row-menu
Jul 14, 2026
Merged

feat(ui): enrich DB row context menu — open in tab/window + copy link (CM-3)#166
eliotlim merged 2 commits into
mainfrom
feat/cm3-row-menu

Conversation

@eliotlim

Copy link
Copy Markdown
Owner

What

Enriches the database row context menu — right-clicking a card (board/gallery) or a
table cell — with proper open targets and a copy-link action, so a database row behaves
like the page it is:

  • Open in new tab and Open in new window join the existing Open (split pane).
  • Copy link (reuses useCopyPageLink, which guards the desktop dead-link case),
    producing a ?page= link that opens the row-as-page.
  • useDatabase gains openRowIn(rowId, 'tab' | 'window'), seeding the page-title hint
    before delegating so a freshly opened surface shows the row's name at once; openRow
    remains the split-pane shorthand.

Applied to both the card-layout RowContextMenu (databaseLayouts.tsx) and the table's
CellContextMenu (DatabaseView.tsx).

Why

A row is a page — but the row menus only offered a bare "Open" plus insert/duplicate/
delete, with no way to open in a new tab/window or grab a shareable link the way the page
menus (CM-2) already do. This closes that parity gap.

Design review (Devon — CLEAR WITH NITS, applied)

The first cut also added an explicit "Open in split view" item. But the bare Open
already routes to the split pane (openRow = the 'split' shorthand), so the two were
functionally identical and stacked adjacent — redundant, and they disagreed on ordering
(Split→Tab→Window here vs Tab→Window→Split elsewhere). Per review, the redundant
"Open in split view" item was dropped from both menus: the default Open keeps
the split behaviour, and only Open in new tab + Open in new window are added as
explicit targets. This also lightens the already-crowded table-cell menu.

Resulting open group: Open · — · Open in new tab · Open in new window · — · Copy link · Insert below · Duplicate · — · Delete.

Before / After

Before = base main (pre-CM-3, minimal menu). After = this branch (open targets + copy
link, no redundant split item).

Surface Before After
Card (board/gallery) right-click
Open · Insert below · Duplicate · Delete

Open · Open in new tab · Open in new window · Copy link · Insert below · Duplicate · Delete — one Open, no duplicate split
Table cell right-click (Status column, fuller property-scoped menu)
Filter/Sort/Group-by header + Open · Insert below · Duplicate · Delete

same header + Open · Open in new tab · Open in new window · Copy link · … — still manageable, no split dupe

Notes / follow-ups

  • Deferred (not this PR): collapsing the open targets into an "Open in ▸" submenu
    for the very dense table-cell case (esp. a date column with an active view). Devon
    flagged this as a separate follow-up, not a blocker for this change.
  • Pre-existing i18n gap: the row/cell menu strings are hardcoded, matching the
    existing sibling menu items (not a regression introduced here).

Verify: build:libs + ui typecheck + ui lint + ui vitest all green (full UI suite
1068/1068). Gate: design (Devon) — CLEAR WITH NITS, applied. Merge owner-gated.

eliotlim and others added 2 commits July 14, 2026 13:04
…ink (CM-3)

Add Open in split view / new tab / new window and Copy link to the database
row context menus (card layouts' RowContextMenu and the table's CellContextMenu),
alongside the existing open / insert / duplicate / delete items. A row is a page,
so the open targets and copied link mirror the page menus exactly.

useDatabase gains openRowIn(rowId, 'split'|'tab'|'window'), seeding the page-title
hint before delegating to openInSplit / openInNew so a freshly opened surface shows
the row's name at once; openRow becomes the 'split' shorthand. Copy link reuses
useCopyPageLink (which guards the desktop dead-link case), producing a ?page= link
that opens the row-as-page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
…ign review)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app.book.pub Ready Ready Preview, Comment Jul 14, 2026 5:19am

Request Review

@eliotlim eliotlim merged commit ee40702 into main Jul 14, 2026
10 checks passed
@eliotlim eliotlim deleted the feat/cm3-row-menu branch July 14, 2026 05:43
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