feat: Add tabs Layout#7
Open
DhruvLohar wants to merge 4 commits into
Open
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two quality-of-life features to the database UI: a persistent tabbed interface for working across multiple tables simultaneously, and a one-click copy button on every table
cell.
Tabbed Table Navigation
Opens each table in a tab at the top of the content area, similar to how a database client like TablePlus or DBeaver works.
Behaviour:
localStorage— reloading the page restores your full sessionschema.tablestored internallyFiles added/changed:
src/lib/TabsContext.tsx— React context withlocalStoragehydration,openTab/updateTabHref/closeTabsrc/components/TableTabs.tsx— tab bar UI componentsrc/app/layout.tsx— wraps app inTabsProvider, rendersTableTabsabove main contentsrc/app/[tableName]/TablePageClient.tsx— registers tab on mount, syncs href on every filter/sort/page changeClick-to-Copy on Table Cells
Every cell in every table now has a copy button that appears on row hover.
Behaviour:
"Copied!"tooltip appears for 1.5s, then resets@radix-ui/react-tooltip— no new dependencies addedCopyableCellis wrapped inReact.memoto avoid unnecessary re-renders across large tablesFiles added/changed:
src/components/CopyableCell.tsx— copy button with tooltip feedbacksrc/components/TableDisplay.tsx— rendersCopyableCellfor every cell, added"use client"directiveScreenshots