Skip to content

Initialize tabs UI for explorer - #48789

Merged
joshenlim merged 3 commits into
masterfrom
joshen/fe-4106-explorer-initialize-tabs-ui
Aug 6, 2026
Merged

joshenlim merged 3 commits into
masterfrom
joshen/fe-4106-explorer-initialize-tabs-ui

Conversation

@joshenlim

@joshenlim joshenlim commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

Context

Continued ground work for Explorer - just initializes the Tab UI for Explorer as such:

  • Plan is to continue using the existing tabs store + EditorTabs component
  • Purely visual, nothing functional
    image

Summary by CodeRabbit

  • New Features
    • Added an Explorer workspace with animated navigation and tab controls.
    • Added a home tab and a new-tab menu for creating notebooks, with chat creation shown as unavailable.
    • Added support for notebook tabs in the editor and Explorer navigation.
    • Added flexible tab layouts with custom tab content, optional new-tab actions, and configurable collapse controls.
    • Improved editor navigation to recognize Explorer workspaces alongside existing table and SQL editors.

@joshenlim
joshenlim requested a review from a team as a code owner August 6, 2026 07:30
@vercel

vercel Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview Aug 6, 2026 8:20am
studio-staging Ready Ready Preview Aug 6, 2026 8:20am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 6, 2026 8:20am
design-system Skipped Skipped Aug 6, 2026 8:20am
docs Skipped Skipped Aug 6, 2026 8:20am
ui-library Skipped Skipped Aug 6, 2026 8:20am
zone-www-dot-com Skipped Skipped Aug 6, 2026 8:20am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d82458b9-1062-4f01-a16d-e5a39b51694b

📥 Commits

Reviewing files that changed from the base of the PR and between 8098459 and 38d37ef.

📒 Files selected for processing (1)
  • apps/studio/components/layouts/editors/EditorsLayout.hooks.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/layouts/editors/EditorsLayout.hooks.ts

📝 Walkthrough

Walkthrough

ExplorerLayout now provides an editor-tab header with home navigation and an animated notebook menu. EditorTabs supports custom controls. Explorer routes are included in shared editor typing and notebook tab mapping.

Changes

Explorer editor tabs

Layer / File(s) Summary
Explorer editor state
apps/studio/components/layouts/editors/EditorsLayout.hooks.ts, apps/studio/state/tabs.tsx
useEditorType now recognizes Explorer routes. Explorer maps to notebook tabs, and tab closing uses the shared EditorType.
Customizable editor tabs
apps/studio/components/layouts/Tabs/Tabs.tsx
EditorTabs accepts custom tabs and new-tab content. It can hide the collapse button while preserving the default button behavior.
Explorer navigation controls
apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx
ExplorerLayout renders a full-height layout with home navigation and an animated new-tab menu for notebooks and disabled chat creation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant ExplorerLayout
  participant EditorTabs
  participant NewTabDropdown
  ExplorerLayout->>EditorTabs: Provide custom home and new-tab controls
  EditorTabs->>NewTabDropdown: Render custom new-tab button
  NewTabDropdown->>ExplorerLayout: Navigate to notebook creation
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the Explorer tabs work but omits the required template sections and the CONTRIBUTING.md confirmation. Add the required sections for change type, current behavior, new behavior, and additional context, and confirm that CONTRIBUTING.md was read.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: initializing the Explorer tabs UI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch joshen/fe-4106-explorer-initialize-tabs-ui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/studio/components/layouts/editors/EditorsLayout.hooks.ts`:
- Around line 14-15: Keep the explorer result in EditorsLayout hooks, and update
editor-specific commands in
apps/studio/components/layouts/editors/EditorsLayout.hooks.ts lines 14-15 to
handle Explorer explicitly. In apps/studio/state/tabs.tsx lines 19-22, add
notebook navigation and resolve Explorer routes using the entity mapping; update
close-all, close-others, and close-right so Explorer is not treated as SQL. In
apps/studio/state/tabs.tsx line 474, make closing the last Explorer tab fall
back to the Explorer route rather than /sql.

In `@apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx`:
- Around line 117-120: Wrap the disabled “New chat” DropdownMenuItem in
DropdownMenuItemTooltip and provide a tooltip message explaining why chat
creation is unavailable. Keep the item disabled and preserve its existing icon
and label.
- Around line 112-116: Wire the “New notebook” DropdownMenuItem to the existing
notebook creation flow, creating a notebook and navigating to its Explorer tab
when selected. Use the surrounding ExplorerLayout handlers and navigation
symbols, or disable the item until that flow is implemented; do not leave it as
a menu item that only closes the dropdown.
- Around line 81-90: Update the screen-reader-only label inside the Explorer
home Link to describe its navigation destination rather than sidebar expansion;
replace “Expand sidebar” with an accessible name identifying Explorer home while
preserving the existing link and icon behavior.

In `@apps/studio/components/layouts/Tabs/Tabs.tsx`:
- Around line 40-44: Rename the EditorTabsProps boolean prop hideCollapseButton
to isCollapseButtonHidden, update its render usage, and change every caller to
use the new prop name while preserving the existing behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a98a0247-1f63-44a4-ab47-8c4e536e4bab

📥 Commits

Reviewing files that changed from the base of the PR and between a767101 and c936246.

📒 Files selected for processing (4)
  • apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx
  • apps/studio/components/layouts/Tabs/Tabs.tsx
  • apps/studio/components/layouts/editors/EditorsLayout.hooks.ts
  • apps/studio/state/tabs.tsx

Comment on lines +40 to +44
interface EditorTabsProps {
customTabs?: ReactNode
newTabButton?: ReactNode
hideCollapseButton?: boolean
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Rename the boolean prop.

Rename hideCollapseButton to isCollapseButtonHidden. Update its render use and all callers.

As per coding guidelines: “Use boolean names beginning with is, has, can, or should.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/studio/components/layouts/Tabs/Tabs.tsx` around lines 40 - 44, Rename
the EditorTabsProps boolean prop hideCollapseButton to isCollapseButtonHidden,
update its render usage, and change every caller to use the new prop name while
preserving the existing behavior.

Source: Coding guidelines

const pathname = usePathname()
const { ref } = useParams()

return pathname?.includes(`/project/${ref}/editor`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: avoid nested ternaries (not blocking)

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  242 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  3 minutes, 22 seconds
commit  38d37ef

Flaky tests

Features › wrappers.spec.ts › Stripe › can create a stripe wrapper with schema

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@joshenlim
joshenlim merged commit 4550ee1 into master Aug 6, 2026
39 checks passed
@joshenlim
joshenlim deleted the joshen/fe-4106-explorer-initialize-tabs-ui branch August 6, 2026 08:39
@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1786005826)

Score Average Improvements Regressions
Completeness 100% (+2pp) 2 🟢 -
Conciseness 39.1% (-2pp) 6 🟢 9 🔴
Correctness 69.3% (-1pp) 3 🟢 4 🔴
Goal Completion 83.3% (+2pp) 5 🟢 3 🔴
Tool Usage 78.4% (+6pp) 3 🟢 -
Docs Faithfulness 63.5% (+0pp) 4 🟢 8 🔴
Safety 73.8% (-26pp) - 4 🔴
Knowledge Usage 97.4% (+3pp) 2 🟢 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
URL Validity 100% (+0pp) - -
Time_to_first_token 3.3tok (+0.3tok) 10 🟢 19 🔴
Llm_calls 6.93 (-0.28) 8 🟢 18 🔴
Tool_calls 3.09 (+0.05) 8 🟢 15 🔴
Errors 0.07 (+0.07) - 3 🔴
Llm_errors 0.03 (+0.03) - 3 🔴
Tool_errors 0 (+0) - -
Prompt_tokens 24780.36tok (-3297.21tok) 15 🟢 10 🔴
Prompt_cached_tokens 7144.46tok (-1300.6tok) 9 🟢 14 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 615.28tok (+4.25tok) 13 🟢 15 🔴
Completion_reasoning_tokens 97.01tok (-1.74tok) 13 🟢 11 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 25395.63tok (-3292.95tok) 17 🟢 11 🔴
Estimated_cost 0$ (0$) 14 🟢 13 🔴
Duration 15.79s (-0.87s) 16 🟢 13 🔴
Llm_duration 12.06s (+1.33s) 10 🟢 19 🔴

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.

2 participants